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
13 ifeq "$(Embedded)" "YES"
14 ARCHS:=armv7 armv7s arm64
20 ARCH_32 := $(filter-out %64, $(ARCHS))
21 ARCH_32_FLAGS := $(patsubst %, -arch %, $(ARCH_32))
22 ARCH_64 := $(filter %64, $(ARCHS))
23 ARCH_64_FLAGS := $(patsubst %, -arch %, $(ARCH_64))
25 DSTROOT?=$(shell /bin/pwd)
27 ARCH_32_TARGETS := MPMMtest KQMPMMtest KQMPMMtestD
28 ARCH_64_TARGETS := MPMMtest_64 KQMPMMtest_64 KQMPMMtest_64D
29 TARGETS := $(if $(ARCH_64), $(ARCH_64_TARGETS)) $(if $(ARCH_32), $(ARCH_32_TARGETS))
31 all: $(addprefix $(DSTROOT)/, $(TARGETS))
33 $(DSTROOT)/MPMMtest: MPMMtest.c
34 ${CC} ${CFLAGS} ${ARCH_32_FLAGS} -o $(SYMROOT)/$(notdir $@) $?
35 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
37 $(DSTROOT)/MPMMtest_64: MPMMtest.c
38 ${CC} ${CFLAGS} ${ARCH_64_FLAGS} -o $(SYMROOT)/$(notdir $@) $?
39 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
41 $(DSTROOT)/KQMPMMtest: KQMPMMtest.c
42 ${CC} ${CFLAGS} ${ARCH_32_FLAGS} -o $(SYMROOT)/$(notdir $@) $?
43 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
45 $(DSTROOT)/KQMPMMtest_64: KQMPMMtest.c
46 ${CC} ${CFLAGS} ${ARCH_64_FLAGS} -o $(SYMROOT)/$(notdir $@) $?
47 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
49 $(DSTROOT)/KQMPMMtestD: KQMPMMtest.c
50 ${CC} ${CFLAGS} ${ARCH_32_FLAGS} -DDIRECT_MSG_RCV=1 -o $(SYMROOT)/$(notdir $@) $?
51 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
53 $(DSTROOT)/KQMPMMtest_64D: KQMPMMtest.c
54 ${CC} ${CFLAGS} ${ARCH_64_FLAGS} -DDIRECT_MSG_RCV=1 -o $(SYMROOT)/$(notdir $@) $?
55 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
58 rm -rf $(addprefix $(DSTROOT)/,$(TARGETS)) $(addprefix $(SYMROOT)/,$(TARGETS)) $(SYMROOT)/*.dSYM