aboutsummaryrefslogtreecommitdiff
path: root/net/tgt/patches/020-usr_Makefile.patch
blob: 99c0d82bb88be2ccf6f0fefedba942a3a9cebdb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- 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,7 +25,7 @@ ifneq ($(SD_NOTIFY),)
 CFLAGS += -DUSE_SYSTEMD
 endif
 
-ifneq ($(shell test -e /usr/include/sys/eventfd.h && test -e /usr/include/libaio.h && echo 1),)
+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
@@ -55,7 +55,7 @@ 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 \
@@ -82,14 +82,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