]> git.saurik.com Git - apple/xnu.git/blame_incremental - tools/tests/MPMMTest/Makefile
xnu-7195.101.1.tar.gz
[apple/xnu.git] / tools / tests / MPMMTest / Makefile
... / ...
CommitLineData
1include ../Makefile.common
2
3CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc)
4
5SYMROOT?=$(shell /bin/pwd)
6
7CFLAGS := -g -O2 -isysroot $(SDKROOT) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
8CFLAGS += -Wno-deprecated-declarations
9CFLAGS += -Wl,-sectcreate,__INFO_FILTER,__disable,/dev/null
10
11# $(ARCH_CONFIGS) is set by Makefile.common
12
13DSTROOT?=$(shell /bin/pwd)
14
15ARCH_32_TARGETS := MPMMtest KQMPMMtest KQMPMMtestD
16ARCH_64_TARGETS := MPMMtest_64 KQMPMMtest_64 KQMPMMtest_64D
17TARGETS := MPMMtest_perf.sh $(if $(ARCH_CONFIGS_64), $(ARCH_64_TARGETS)) $(if $(ARCH_CONFIGS_32), $(ARCH_32_TARGETS))
18
19all: $(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
49clean:
50 rm -rf $(addprefix $(DSTROOT)/,$(TARGETS)) $(addprefix $(SYMROOT)/,$(TARGETS)) $(SYMROOT)/*.dSYM