]> git.saurik.com Git - apple/xnu.git/blob - tools/tests/jitter/Makefile
xnu-2782.10.72.tar.gz
[apple/xnu.git] / tools / tests / jitter / Makefile
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
7
8 OBJROOT?=$(shell /bin/pwd)
9
10 CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc)
11
12 ifdef RC_ARCHS
13 ARCHS:=$(RC_ARCHS)
14 else
15 ifeq "$(Embedded)" "YES"
16 ARCHS:=armv7 armv7s arm64
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 -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
27
28 all: $(DSTROOT)/jitter
29
30 $(OBJROOT)/timer_jitter.o: timer_jitter.c
31 $(CC) -c -o $@ $< $(CFLAGS)
32
33 $(OBJROOT)/cpu_number.o: cpu_number.s
34 $(CC) -c -o $@ $< $(CFLAGS)
35
36 $(DSTROOT)/jitter: $(OBJROOT)/timer_jitter.o $(OBJROOT)/cpu_number.o
37 $(CC) -o $@ $^ $(CFLAGS)
38
39 clean:
40 rm -f $(DSTROOT)/jitter $(OBJROOT)/*.o