lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

020-usr_Makefile.patch (1663B)


      1 diff --git a/usr/Makefile b/usr/Makefile
      2 index d4e3eaf..ec1c9a3 100644
      3 --- a/usr/Makefile
      4 +++ b/usr/Makefile
      5 @@ -1,11 +1,11 @@
      6  sbindir ?= $(PREFIX)/sbin
      7  libdir ?= $(PREFIX)/lib/tgt
      8  
      9 -ifneq ($(shell test -e /usr/include/linux/signalfd.h && echo 1),)
     10 +ifneq ($(shell test -n $(shell find $(STAGING_DIR)/usr/include -name "signalfd.h" | head -n1) && echo 1),)
     11  CFLAGS += -DUSE_SIGNALFD
     12  endif
     13  
     14 -ifneq ($(shell test -n $(shell find /usr/include -name "timerfd.h" | head -n1) && echo 1),)
     15 +ifneq ($(shell test -n $(shell find $(STAGING_DIR)/usr/include -name "timerfd.h" | head -n1) && echo 1),)
     16  CFLAGS += -DUSE_TIMERFD
     17  endif
     18  
     19 @@ -25,7 +25,7 @@ ifneq ($(SD_NOTIFY),)
     20  CFLAGS += -DUSE_SYSTEMD
     21  endif
     22  
     23 -ifneq ($(shell test -e /usr/include/sys/eventfd.h && test -e /usr/include/libaio.h && echo 1),)
     24 +ifneq ($(shell test -n $(shell find $(STAGING_DIR)/usr/include -name "eventfd.h" | head -n1) && test -n $(shell find $(STAGING_DIR)/usr/include -name "libaio.h" | head -n1) && echo 1),)
     25  CFLAGS += -DUSE_EVENTFD
     26  TGTD_OBJS += bs_aio.o
     27  LIBS += -laio
     28 @@ -55,7 +55,7 @@ ifneq ($(SD_NOTIFY),)
     29  LIBS += -lsystemd
     30  endif
     31  
     32 -PROGRAMS += tgtd tgtadm tgtimg
     33 +PROGRAMS += tgtd tgtadm
     34  TGTD_OBJS += tgtd.o mgmt.o target.o scsi.o log.o driver.o util.o work.o \
     35  		concat_buf.o parser.o spc.o sbc.o mmc.o osd.o scc.o smc.o \
     36  		ssc.o libssc.o bs_rdwr.o bs_ssc.o \
     37 @@ -82,14 +82,6 @@ tgtadm: $(TGTADM_OBJS)
     38  
     39  -include $(TGTADM_DEP)
     40  
     41 -TGTIMG_OBJS = tgtimg.o libssc.o libcrc32c.o
     42 -TGTIMG_DEP = $(TGTIMG_OBJS:.o=.d)
     43 -
     44 -tgtimg: $(TGTIMG_OBJS)
     45 -	$(CC) $^ -o $@
     46 -
     47 --include $(TGTIMG_DEP)
     48 -
     49  %.o: %.c
     50  	$(CC) -c $(CFLAGS) $*.c -o $*.o
     51  	@$(CC) -MM $(CFLAGS) -MF $*.d -MT $*.o $*.c