]>
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 | |
6d2010ae | 7 | |
39236c6e | 8 | OBJROOT?=$(shell /bin/pwd) |
6d2010ae | 9 | |
39236c6e | 10 | CC:=xcrun -sdk "$(SDKROOT)" cc |
6d2010ae | 11 | |
39236c6e A |
12 | ifdef RC_ARCHS |
13 | ARCHS:=$(RC_ARCHS) | |
14 | else | |
15 | ifeq "$(Embedded)" "YES" | |
16 | ARCHS:=armv7 armv7s | |
17 | else | |
18 | ARCHS:=x86_64 i386 | |
19 | endif | |
20 | endif | |
21 | ||
22 | ||
23 | ||
24 | DSTROOT?=$(shell /bin/pwd) | |
25 | ||
26 | CFLAGS:=$(patsubst %, -arch %,$(ARCHS)) -g -Wall -Os $(ISYSROOT) | |
27 | ||
28 | all: $(DSTROOT)/jitter | |
29 | ||
30 | $(OBJROOT)/timer_jitter.o: timer_jitter.c | |
6d2010ae A |
31 | $(CC) -c -o $@ $< $(CFLAGS) |
32 | ||
39236c6e | 33 | $(OBJROOT)/cpu_number.o: cpu_number.s |
6d2010ae A |
34 | $(CC) -c -o $@ $< $(CFLAGS) |
35 | ||
39236c6e | 36 | $(DSTROOT)/jitter: $(OBJROOT)/timer_jitter.o $(OBJROOT)/cpu_number.o |
6d2010ae | 37 | $(CC) -o $@ $^ $(CFLAGS) |
39236c6e A |
38 | |
39 | clean: | |
40 | rm -f $(DSTROOT)/jitter $(OBJROOT)/*.o |