You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.6 KiB

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