mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 19:14:30 +04:00
- bump the version - make aio support optional, enabled by default - make sheepdog support optional, disabled by default Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
65 lines
1.9 KiB
Diff
65 lines
1.9 KiB
Diff
--- a/usr/Makefile
|
|
+++ b/usr/Makefile
|
|
@@ -1,11 +1,11 @@
|
|
sbindir ?= $(PREFIX)/sbin
|
|
libdir ?= $(PREFIX)/lib/tgt
|
|
|
|
-ifneq ($(shell test -e /usr/include/linux/signalfd.h && echo 1),)
|
|
+ifneq ($(shell test -n $(shell find $(STAGING_DIR)/usr/include -name "signalfd.h" | head -n1) && echo 1),)
|
|
CFLAGS += -DUSE_SIGNALFD
|
|
endif
|
|
|
|
-ifneq ($(shell test -n $(shell find /usr/include -name "timerfd.h" | head -n1) && echo 1),)
|
|
+ifneq ($(shell test -n $(shell find $(STAGING_DIR)/usr/include -name "timerfd.h" | head -n1) && echo 1),)
|
|
CFLAGS += -DUSE_TIMERFD
|
|
endif
|
|
|
|
@@ -25,11 +25,17 @@ ifneq ($(SD_NOTIFY),)
|
|
CFLAGS += -DUSE_SYSTEMD
|
|
endif
|
|
|
|
-ifneq ($(shell test -e /usr/include/sys/eventfd.h && test -e /usr/include/libaio.h && echo 1),)
|
|
+ifeq ($(WITHOUT_AIO),)
|
|
+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),)
|
|
CFLAGS += -DUSE_EVENTFD
|
|
TGTD_OBJS += bs_aio.o
|
|
LIBS += -laio
|
|
endif
|
|
+endif
|
|
+
|
|
+ifeq ($(WITHOUT_SHEEPDOG),)
|
|
+TGTD_OBJS += bs_sheepdog.o
|
|
+endif
|
|
|
|
ifneq ($(ISCSI_RDMA),)
|
|
TGTD_OBJS += iscsi/iser.o iscsi/iser_text.o
|
|
@@ -56,11 +62,11 @@ ifneq ($(SD_NOTIFY),)
|
|
LIBS += -lsystemd
|
|
endif
|
|
|
|
-PROGRAMS += tgtd tgtadm tgtimg
|
|
+PROGRAMS += tgtd tgtadm
|
|
TGTD_OBJS += tgtd.o mgmt.o target.o scsi.o log.o driver.o util.o work.o \
|
|
concat_buf.o parser.o spc.o sbc.o mmc.o osd.o scc.o smc.o \
|
|
ssc.o libssc.o bs_rdwr.o bs_ssc.o \
|
|
- bs_null.o bs_sg.o bs.o libcrc32c.o bs_sheepdog.o
|
|
+ bs_null.o bs_sg.o bs.o libcrc32c.o
|
|
|
|
TGTD_DEP = $(TGTD_OBJS:.o=.d)
|
|
|
|
@@ -83,14 +89,6 @@ tgtadm: $(TGTADM_OBJS)
|
|
|
|
-include $(TGTADM_DEP)
|
|
|
|
-TGTIMG_OBJS = tgtimg.o libssc.o libcrc32c.o
|
|
-TGTIMG_DEP = $(TGTIMG_OBJS:.o=.d)
|
|
-
|
|
-tgtimg: $(TGTIMG_OBJS)
|
|
- $(CC) $^ -o $@
|
|
-
|
|
--include $(TGTIMG_DEP)
|
|
-
|
|
%.o: %.c
|
|
$(CC) -c $(CFLAGS) $*.c -o $*.o
|
|
@$(CC) -MM $(CFLAGS) -MF $*.d -MT $*.o $*.c
|