]> git.saurik.com Git - apple/xnu.git/blame - tools/tests/kqueue_tests/Makefile
xnu-2782.1.97.tar.gz
[apple/xnu.git] / tools / tests / kqueue_tests / Makefile
CommitLineData
39236c6e
A
1SDKROOT ?= /
2ifeq "$(RC_TARGET_CONFIG)" "iPhone"
3Embedded?=YES
4else
5Embedded?=$(shell echo $(SDKROOT) | grep -iq iphoneos && echo YES || echo NO)
6endif
b0d623f7 7
fe8ab488 8CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc)
b0d623f7 9
39236c6e
A
10ifdef RC_ARCHS
11 ARCHS:=$(RC_ARCHS)
12 else
13 ifeq "$(Embedded)" "YES"
fe8ab488 14 ARCHS:=armv7 armv7s arm64
39236c6e
A
15 else
16 ARCHS:=x86_64 i386
17 endif
18endif
19
20CFLAGS :=-g $(patsubst %, -arch %,$(ARCHS))
21
22DSTROOT?=$(shell /bin/pwd)
23SYMROOT?=$(shell /bin/pwd)
24
25all: $(addprefix $(DSTROOT)/, file timer)
26
27$(DSTROOT)/file:
28 $(CC) $(CFLAGS) -o $(SYMROOT)/file_tests kqueue_file_tests.c
29 if [ ! -e $(DSTROOT)/file_tests ]; then ditto $(SYMROOT)/file_tests $(DSTROOT)/file_tests; fi
30
31$(DSTROOT)/timer:
32 $(CC) $(CFLAGS) -o $(SYMROOT)/timer_tests kqueue_timer_tests.c
33 if [ ! -e $(DSTROOT)/timer_tests ]; then ditto $(SYMROOT)/timer_tests $(DSTROOT)/timer_tests; fi
34
35clean:
36 rm -rf $(DSTROOT)/file_tests $(DSTROOT)/timer_tests $(SYMROOT)/*.dSYM $(SYMROOT)/file_tests $(SYMROOT)/timer_tests