]>
Commit | Line | Data |
---|---|---|
39236c6e A |
1 | SDKROOT ?= / |
2 | ifeq "$(RC_TARGET_CONFIG)" "iPhone" | |
3 | Embedded?=YES | |
4 | else | |
5 | Embedded?=$(shell echo $(SDKROOT) | grep -iq iphoneos && echo YES || echo NO) | |
6 | endif | |
b0d623f7 | 7 | |
39236c6e | 8 | CC:=xcrun -sdk "$(SDKROOT)" cc |
b0d623f7 | 9 | |
39236c6e A |
10 | ifdef RC_ARCHS |
11 | ARCHS:=$(RC_ARCHS) | |
12 | else | |
13 | ifeq "$(Embedded)" "YES" | |
14 | ARCHS:=armv7 armv7s | |
15 | else | |
16 | ARCHS:=x86_64 i386 | |
17 | endif | |
18 | endif | |
19 | ||
20 | CFLAGS :=-g $(patsubst %, -arch %,$(ARCHS)) | |
21 | ||
22 | DSTROOT?=$(shell /bin/pwd) | |
23 | SYMROOT?=$(shell /bin/pwd) | |
24 | ||
25 | all: $(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 | ||
35 | clean: | |
36 | rm -rf $(DSTROOT)/file_tests $(DSTROOT)/timer_tests $(SYMROOT)/*.dSYM $(SYMROOT)/file_tests $(SYMROOT)/timer_tests |