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