]>
Commit | Line | Data |
---|---|---|
1 | include ../Makefile.common | |
2 | ||
3 | CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc) | |
4 | ||
5 | ifdef RC_ARCHS | |
6 | ARCHS:=$(RC_ARCHS) | |
7 | else | |
8 | ifeq "$(Embedded)" "YES" | |
9 | ARCHS:=armv7 armv7s arm64 | |
10 | else | |
11 | ARCHS:=x86_64 i386 | |
12 | endif | |
13 | endif | |
14 | ||
15 | CFLAGS :=-g $(patsubst %, -arch %,$(ARCHS)) -isysroot $(SDKROOT) | |
16 | ||
17 | DSTROOT?=$(shell /bin/pwd) | |
18 | SYMROOT?=$(shell /bin/pwd) | |
19 | ||
20 | all: $(addprefix $(DSTROOT)/, file timer) | |
21 | ||
22 | $(DSTROOT)/file: | |
23 | $(CC) $(CFLAGS) -o $(SYMROOT)/file_tests kqueue_file_tests.c | |
24 | if [ ! -e $(DSTROOT)/file_tests ]; then ditto $(SYMROOT)/file_tests $(DSTROOT)/file_tests; fi | |
25 | ||
26 | $(DSTROOT)/timer: | |
27 | $(CC) $(CFLAGS) -o $(SYMROOT)/timer_tests kqueue_timer_tests.c | |
28 | if [ ! -e $(DSTROOT)/timer_tests ]; then ditto $(SYMROOT)/timer_tests $(DSTROOT)/timer_tests; fi | |
29 | ||
30 | clean: | |
31 | rm -rf $(DSTROOT)/file_tests $(DSTROOT)/timer_tests $(SYMROOT)/*.dSYM $(SYMROOT)/file_tests $(SYMROOT)/timer_tests |