]> git.saurik.com Git - apple/xnu.git/blame - tools/tests/superpages/Makefile
xnu-2782.10.72.tar.gz
[apple/xnu.git] / tools / tests / superpages / 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
7
8DSTROOT?=$(shell /bin/pwd)
9TARGETS := $(addprefix $(DSTROOT)/, measure_tlbs testsp)
fe8ab488 10CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc)
39236c6e
A
11
12ifdef RC_ARCHS
13 ARCHS:=$(RC_ARCHS)
14 else
15 ifeq "$(Embedded)" "YES"
fe8ab488 16 ARCHS:=armv7 armv7s arm64
39236c6e
A
17 else
18 ARCHS:=x86_64 i386
19 endif
20endif
21
22ifneq ($(ARCHS),)
23CFLAGS += $(patsubst %, -arch %, $(ARCHS))
24endif
25
26all: $(TARGETS)
27
28clean:
29 rm -f $(TARGETS)
30
31$(TARGETS): $(DSTROOT)/%: %.c
32 $(CC) $(CFLAGS) -o $@ $<