]>
Commit | Line | Data |
---|---|---|
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 | packetdrill \ | |
27 | affinity \ | |
28 | execperf \ | |
29 | kqueue_tests \ | |
30 | superpages \ | |
31 | zero-to-n \ | |
32 | jitter \ | |
33 | perf_index \ | |
34 | darwintests \ | |
35 | unixconf | |
36 | ||
37 | IPHONE_TARGETS = | |
38 | ||
39 | MAC_TARGETS = | |
40 | ||
41 | BATS_TARGET = $(BATS_CONFIG_PATH)/BATS | |
42 | ||
43 | ifeq "$(Embedded)" "YES" | |
44 | TARGETS = $(addprefix $(DSTSUBPATH)/, $(COMMON_TARGETS) $(IPHONE_TARGETS)) | |
45 | else | |
46 | TARGETS = $(addprefix $(DSTSUBPATH)/, $(COMMON_TARGETS) $(MAC_TARGETS)) | |
47 | endif | |
48 | ||
49 | all: $(BATS_TARGET) $(TARGETS) | |
50 | ||
51 | .PHONY: always | |
52 | ||
53 | always: | |
54 | ||
55 | $(DSTSUBPATH)/%: always | |
56 | $(_v)echo Building $@ | |
57 | $(_v)mkdir -p $@ | |
58 | $(_v)mkdir -p $(OBJROOT)/$(notdir $@) | |
59 | $(_v)mkdir -p $(SYMROOT)/$(notdir $@) | |
60 | $(_v)$(MAKE) -C $(SRCROOT)/$(notdir $@) SRCROOT=$(SRCROOT)/$(notdir $@) DSTROOT=$@ OBJROOT=$(OBJROOT)/$(notdir $@) SYMROOT=$(SYMROOT)/$(notdir $@) SDKROOT=$(SDKROOT) BASEDSTROOT=$(DSTROOT) | |
61 | ||
62 | $(BATS_TARGET): $(TARGETS) | |
63 | $(_v)mkdir -p $@ | |
64 | $(_v)mkdir -p $(OBJROOT)/$(notdir $@) | |
65 | $(_v)mkdir -p $(SYMROOT) | |
66 | $(_v)$(MAKE) -C $(SRCROOT)/$(notdir $@) SRCROOT=$(SRCROOT)/$(notdir $@) DSTROOT=$@ OBJROOT=$(OBJROOT)/$(notdir $@) SDKROOT=$(SDKROOT) BASEDSTROOT=$(DSTROOT) |