1 include ../Makefile.common
3 CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc)
5 SYMROOT?=$(shell /bin/pwd)
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
11 # $(ARCH_CONFIGS) is set by Makefile.common
13 DSTROOT?=$(shell /bin/pwd)
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))
19 all: $(addprefix $(DSTROOT)/, $(TARGETS))
21 $(DSTROOT)/MPMMtest: MPMMtest.c
22 ${CC} ${CFLAGS} ${ARCH_FLAGS_32} -o $(SYMROOT)/$(notdir $@) $?
23 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
25 $(DSTROOT)/MPMMtest_64: MPMMtest.c
26 ${CC} ${CFLAGS} ${ARCH_FLAGS_64} -o $(SYMROOT)/$(notdir $@) $?
27 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
29 $(DSTROOT)/KQMPMMtest: KQMPMMtest.c
30 ${CC} ${CFLAGS} ${ARCH_FLAGS_32} -o $(SYMROOT)/$(notdir $@) $?
31 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
33 $(DSTROOT)/KQMPMMtest_64: KQMPMMtest.c
34 ${CC} ${CFLAGS} ${ARCH_FLAGS_64} -o $(SYMROOT)/$(notdir $@) $?
35 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
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
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
45 $(DSTROOT)/MPMMtest_perf.sh: MPMMtest_run.sh
50 rm -rf $(addprefix $(DSTROOT)/,$(TARGETS)) $(addprefix $(SYMROOT)/,$(TARGETS)) $(SYMROOT)/*.dSYM