]> git.saurik.com Git - apple/xnu.git/blame - tools/tests/zero-to-n/Makefile
xnu-2422.1.72.tar.gz
[apple/xnu.git] / tools / tests / zero-to-n / 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
A
8CC:=xcrun -sdk "$(SDKROOT)" cc
9
10ifdef 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
18endif
19
20CFLAGS := -g $(patsubst %, -arch %, $(ARCHS))
21
22DSTROOT?=$(shell /bin/pwd)
23SYMROOT?=$(shell /bin/pwd)
24
25DEBUG:=0
26
27$(DSTROOT)/zn: zero-to-n.c
28 $(CC) $(CFLAGS) -Wall zero-to-n.c -o $(SYMROOT)/$(notdir $@) -DDEBUG=$(DEBUG) -ggdb
29 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
30
31clean:
32 rm -rf $(DSTROOT)/zn $(SYMROOT)/*.dSYM $(SYMROOT)/zn