020-usr_Makefile.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. -ifneq ($(shell test -e /usr/include/linux/signalfd.h && echo 1),)
  9. +ifneq ($(shell test -n $(shell find $(STAGING_DIR)/usr/include -name "signalfd.h" | head -n1) && echo 1),)
  10. CFLAGS += -DUSE_SIGNALFD
  11. endif
  12. -ifneq ($(shell test -n $(shell find /usr/include -name "timerfd.h" | head -n1) && echo 1),)
  13. +ifneq ($(shell test -n $(shell find $(STAGING_DIR)/usr/include -name "timerfd.h" | head -n1) && echo 1),)
  14. CFLAGS += -DUSE_TIMERFD
  15. endif
  16. @@ -25,7 +25,7 @@ ifneq ($(SD_NOTIFY),)
  17. CFLAGS += -DUSE_SYSTEMD
  18. endif
  19. -ifneq ($(shell test -e /usr/include/sys/eventfd.h && test -e /usr/include/libaio.h && echo 1),)
  20. +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),)
  21. CFLAGS += -DUSE_EVENTFD
  22. TGTD_OBJS += bs_aio.o
  23. LIBS += -laio
  24. @@ -55,7 +55,7 @@ ifneq ($(SD_NOTIFY),)
  25. LIBS += -lsystemd
  26. endif
  27. -PROGRAMS += tgtd tgtadm tgtimg
  28. +PROGRAMS += tgtd tgtadm
  29. TGTD_OBJS += tgtd.o mgmt.o target.o scsi.o log.o driver.o util.o work.o \
  30. concat_buf.o parser.o spc.o sbc.o mmc.o osd.o scc.o smc.o \
  31. ssc.o libssc.o bs_rdwr.o bs_ssc.o \
  32. @@ -82,14 +82,6 @@ tgtadm: $(TGTADM_OBJS)
  33. -include $(TGTADM_DEP)
  34. -TGTIMG_OBJS = tgtimg.o libssc.o libcrc32c.o
  35. -TGTIMG_DEP = $(TGTIMG_OBJS:.o=.d)
  36. -
  37. -tgtimg: $(TGTIMG_OBJS)
  38. - $(CC) $^ -o $@
  39. -
  40. --include $(TGTIMG_DEP)
  41. -
  42. %.o: %.c
  43. $(CC) -c $(CFLAGS) $*.c -o $*.o
  44. @$(CC) -MM $(CFLAGS) -MF $*.d -MT $*.o $*.c