1 diff --git a/usr/Makefile b/usr/Makefile
2 index d4e3eaf..ec1c9a3 100644
6 sbindir ?= $(PREFIX)/sbin
7 libdir ?= $(PREFIX)/lib/tgt
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
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
19 @@ -25,7 +25,7 @@ ifneq ($(SD_NOTIFY),)
20 CFLAGS += -DUSE_SYSTEMD
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
28 @@ -55,7 +55,7 @@ ifneq ($(SD_NOTIFY),)
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)
39 -include $(TGTADM_DEP)
41 -TGTIMG_OBJS = tgtimg.o libssc.o libcrc32c.o
42 -TGTIMG_DEP = $(TGTIMG_OBJS:.o=.d)
44 -tgtimg: $(TGTIMG_OBJS)
47 --include $(TGTIMG_DEP)
50 $(CC) -c $(CFLAGS) $*.c -o $*.o
51 @$(CC) -MM $(CFLAGS) -MF $*.d -MT $*.o $*.c