]> git.saurik.com Git - apple/xnu.git/blob - tools/tests/Makefile
xnu-2422.1.72.tar.gz
[apple/xnu.git] / tools / tests / Makefile
1 ifdef RC_ProjectName
2 DSTSUBPATH = $(DSTROOT)/AppleInternal/CoreOS
3 else
4 DSTSUBPATH = $(DSTROOT)
5 endif
6
7 OBJROOT?=$(shell /bin/pwd)
8
9 ifeq "$(RC_TARGET_CONFIG)" "iPhone"
10 Embedded?=YES
11 else
12 Embedded?=$(shell echo $(SDKROOT) | grep -iq iphoneos && echo YES || echo NO)
13 endif
14
15 COMMON_TARGETS = xnu_quick_test \
16 MPMMTest \
17 affinity \
18 kqueue_tests \
19 superpages \
20 zero-to-n \
21 jitter \
22 perf_index \
23 unit_tests
24
25 IPHONE_TARGETS = memorystatus
26
27 MAC_TARGETS =
28
29 ifeq "$(Embedded)" "YES"
30 TARGETS = $(addprefix $(DSTSUBPATH)/, $(COMMON_TARGETS) $(IPHONE_TARGETS))
31 else
32 TARGETS = $(addprefix $(DSTSUBPATH)/, $(COMMON_TARGETS) $(MAC_TARGETS))
33 endif
34
35 all: $(TARGETS)
36
37 $(DSTSUBPATH)/%:
38 mkdir -p $@
39 mkdir -p $(OBJROOT)/$(notdir $@)
40 $(MAKE) -C $(SRCROOT)/$(notdir $@) SRCROOT=$(SRCROOT)/$(notdir $@) DSTROOT=$@ OBJROOT=$(OBJROOT)/$(notdir $@)