]> git.saurik.com Git - apple/xnu.git/blob - tools/tests/superpages/Makefile
xnu-2422.1.72.tar.gz
[apple/xnu.git] / tools / tests / superpages / 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 DSTROOT?=$(shell /bin/pwd)
9 TARGETS := $(addprefix $(DSTROOT)/, measure_tlbs testsp)
10 CC:=xcrun -sdk "$(SDKROOT)" cc
11
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 ifneq ($(ARCHS),)
23 CFLAGS += $(patsubst %, -arch %, $(ARCHS))
24 endif
25
26 all: $(TARGETS)
27
28 clean:
29 rm -f $(TARGETS)
30
31 $(TARGETS): $(DSTROOT)/%: %.c
32 $(CC) $(CFLAGS) -o $@ $<