2 ifeq "$(RC_TARGET_CONFIG)" "iPhone"
5 Embedded?=$(shell echo $(SDKROOT) | grep -iq iphoneos && echo YES || echo NO)
8 CC:=xcrun -sdk "$(SDKROOT)" cc
10 SYMROOT?=$(shell /bin/pwd)
17 ifeq "$(Embedded)" "YES"
24 ARCH_32 := $(filter-out %64, $(ARCHS))
25 ARCH_32_FLAGS := $(patsubst %, -arch %, $(ARCH_32))
26 ARCH_64 := $(filter %64, $(ARCHS))
27 ARCH_64_FLAGS := $(patsubst %, -arch %, $(ARCH_64))
29 DSTROOT?=$(shell /bin/pwd)
31 ARCH_32_TARGETS := MPMMtest KQMPMMtest KQMPMMtestD
32 ARCH_64_TARGETS := MPMMtest_64 KQMPMMtest_64 KQMPMMtest_64D
33 TARGETS := $(if $(ARCH_64), $(ARCH_64_TARGETS)) $(if $(ARCH_32), $(ARCH_32_TARGETS))
35 all: $(addprefix $(DSTROOT)/, $(TARGETS))
37 $(DSTROOT)/MPMMtest: MPMMtest.c
38 ${CC} ${CFLAGS} ${ARCH_32_FLAGS} -o $(SYMROOT)/$(notdir $@) $?
39 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
41 $(DSTROOT)/MPMMtest_64: MPMMtest.c
42 ${CC} ${CFLAGS} ${ARCH_64_FLAGS} -o $(SYMROOT)/$(notdir $@) $?
43 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
45 $(DSTROOT)/KQMPMMtest: KQMPMMtest.c
46 ${CC} ${CFLAGS} ${ARCH_32_FLAGS} -o $(SYMROOT)/$(notdir $@) $?
47 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
49 $(DSTROOT)/KQMPMMtest_64: KQMPMMtest.c
50 ${CC} ${CFLAGS} ${ARCH_64_FLAGS} -o $(SYMROOT)/$(notdir $@) $?
51 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
53 $(DSTROOT)/KQMPMMtestD: KQMPMMtest.c
54 ${CC} ${CFLAGS} ${ARCH_32_FLAGS} -DDIRECT_MSG_RCV=1 -o $(SYMROOT)/$(notdir $@) $?
55 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
57 $(DSTROOT)/KQMPMMtest_64D: KQMPMMtest.c
58 ${CC} ${CFLAG} ${ARCH_64_FLAGS} -DDIRECT_MSG_RCV=1 -o $(SYMROOT)/$(notdir $@) $?
59 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
62 rm -rf $(addprefix $(DSTROOT)/,$(TARGETS)) $(addprefix $(SYMROOT)/,$(TARGETS)) $(SYMROOT)/*.dSYM