]> git.saurik.com Git - apple/xnu.git/blob - tools/tests/Makefile
xnu-3247.1.106.tar.gz
[apple/xnu.git] / tools / tests / Makefile
1 include Makefile.common
2
3 ifndef SRCROOT
4 export SRCROOT := $(shell /bin/pwd)
5 endif
6 ifndef OBJROOT
7 export OBJROOT = $(SRCROOT)/BUILD/obj
8 endif
9 ifndef DSTROOT
10 export DSTROOT = $(SRCROOT)/BUILD/dst
11 endif
12 ifndef SYMROOT
13 export SYMROOT = $(SRCROOT)/BUILD/sym
14 endif
15
16 ifdef RC_ProjectName
17 DSTSUBPATH = $(DSTROOT)/AppleInternal/CoreOS/tests/xnu
18 BATS_CONFIG_PATH = $(DSTROOT)/AppleInternal/CoreOS
19 else
20 DSTSUBPATH = $(DSTROOT)
21 BATS_CONFIG_PATH = $(DSTROOT)
22 endif
23
24 COMMON_TARGETS = unit_tests \
25 MPMMTest \
26 affinity \
27 execperf \
28 kqueue_tests \
29 superpages \
30 zero-to-n \
31 jitter \
32 perf_index
33
34 IPHONE_TARGETS =
35
36 MAC_TARGETS =
37
38
39 BATS_TARGET = $(BATS_CONFIG_PATH)/BATS
40
41 ifeq "$(Embedded)" "YES"
42 TARGETS = $(addprefix $(DSTSUBPATH)/, $(COMMON_TARGETS) $(IPHONE_TARGETS))
43 else
44 TARGETS = $(addprefix $(DSTSUBPATH)/, $(COMMON_TARGETS) $(MAC_TARGETS))
45 endif
46
47 all: $(BATS_TARGET) $(TARGETS)
48
49 $(BATS_TARGET) $(DSTSUBPATH)/%:
50 mkdir -p $@
51 mkdir -p $(OBJROOT)/$(notdir $@)
52 mkdir -p $(SYMROOT)
53 $(MAKE) -C $(SRCROOT)/$(notdir $@) SRCROOT=$(SRCROOT)/$(notdir $@) DSTROOT=$@ OBJROOT=$(OBJROOT)/$(notdir $@) SDKROOT=$(SDKROOT)