]> git.saurik.com Git - apple/xnu.git/blob - tools/tests/MPMMTest/Makefile
xnu-7195.50.7.100.1.tar.gz
[apple/xnu.git] / tools / tests / MPMMTest / Makefile
1 include ../Makefile.common
2
3 CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc)
4
5 SYMROOT?=$(shell /bin/pwd)
6
7 CFLAGS := -g -O2 -isysroot $(SDKROOT) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
8 CFLAGS += -Wno-deprecated-declarations
9 CFLAGS += -Wl,-sectcreate,__INFO_FILTER,__disable,/dev/null
10
11 # $(ARCH_CONFIGS) is set by Makefile.common
12
13 DSTROOT?=$(shell /bin/pwd)
14
15 ARCH_32_TARGETS := MPMMtest KQMPMMtest KQMPMMtestD
16 ARCH_64_TARGETS := MPMMtest_64 KQMPMMtest_64 KQMPMMtest_64D
17 TARGETS := MPMMtest_perf.sh $(if $(ARCH_CONFIGS_64), $(ARCH_64_TARGETS)) $(if $(ARCH_CONFIGS_32), $(ARCH_32_TARGETS))
18
19 all: $(addprefix $(DSTROOT)/, $(TARGETS))
20
21 $(DSTROOT)/MPMMtest: MPMMtest.c
22 ${CC} ${CFLAGS} ${ARCH_FLAGS_32} -o $(SYMROOT)/$(notdir $@) $?
23 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
24
25 $(DSTROOT)/MPMMtest_64: MPMMtest.c
26 ${CC} ${CFLAGS} ${ARCH_FLAGS_64} -o $(SYMROOT)/$(notdir $@) $?
27 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
28
29 $(DSTROOT)/KQMPMMtest: KQMPMMtest.c
30 ${CC} ${CFLAGS} ${ARCH_FLAGS_32} -o $(SYMROOT)/$(notdir $@) $?
31 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
32
33 $(DSTROOT)/KQMPMMtest_64: KQMPMMtest.c
34 ${CC} ${CFLAGS} ${ARCH_FLAGS_64} -o $(SYMROOT)/$(notdir $@) $?
35 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
36
37 $(DSTROOT)/KQMPMMtestD: KQMPMMtest.c
38 ${CC} ${CFLAGS} ${ARCH_FLAGS_32} -DDIRECT_MSG_RCV=1 -o $(SYMROOT)/$(notdir $@) $?
39 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
40
41 $(DSTROOT)/KQMPMMtest_64D: KQMPMMtest.c
42 ${CC} ${CFLAGS} ${ARCH_FLAGS_64} -DDIRECT_MSG_RCV=1 -o $(SYMROOT)/$(notdir $@) $?
43 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
44
45 $(DSTROOT)/MPMMtest_perf.sh: MPMMtest_run.sh
46 cp $? $@
47 chmod +x $@
48
49 clean:
50 rm -rf $(addprefix $(DSTROOT)/,$(TARGETS)) $(addprefix $(SYMROOT)/,$(TARGETS)) $(SYMROOT)/*.dSYM