]> git.saurik.com Git - apple/xnu.git/blame - tools/tests/jitter/Makefile
xnu-2422.1.72.tar.gz
[apple/xnu.git] / tools / tests / jitter / 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
6d2010ae 7
39236c6e 8OBJROOT?=$(shell /bin/pwd)
6d2010ae 9
39236c6e 10CC:=xcrun -sdk "$(SDKROOT)" cc
6d2010ae 11
39236c6e
A
12ifdef 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
20endif
21
22
23
24DSTROOT?=$(shell /bin/pwd)
25
26CFLAGS:=$(patsubst %, -arch %,$(ARCHS)) -g -Wall -Os $(ISYSROOT)
27
28all: $(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
39clean:
40 rm -f $(DSTROOT)/jitter $(OBJROOT)/*.o