]> git.saurik.com Git - apple/xnu.git/blob - tools/tests/zero-to-n/Makefile
xnu-4570.1.46.tar.gz
[apple/xnu.git] / tools / tests / zero-to-n / Makefile
1 include ../Makefile.common
2
3 CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc)
4
5 ifdef RC_ARCHS
6 ARCHS:=$(RC_ARCHS)
7 else
8 ifeq "$(Embedded)" "YES"
9 ARCHS:=armv7 armv7s arm64 armv7k
10 else
11 ARCHS:=x86_64 i386
12 endif
13 endif
14
15 CFLAGS := -Os -g $(patsubst %, -arch %, $(ARCHS)) -isysroot $(SDKROOT) -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
16
17 DSTROOT?=$(shell /bin/pwd)
18 SYMROOT?=$(shell /bin/pwd)
19
20 DEBUG:=0
21
22 $(DSTROOT)/zn: zero-to-n.c
23 $(CC) $(CFLAGS) -Wall zero-to-n.c -o $(SYMROOT)/$(notdir $@) -DDEBUG=$(DEBUG) -ggdb
24 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
25
26 clean:
27 rm -rf $(DSTROOT)/zn $(SYMROOT)/*.dSYM $(SYMROOT)/zn