]> git.saurik.com Git - apple/xnu.git/blame - tools/tests/MPMMTest/Makefile
xnu-3248.20.55.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
b0d623f7 9
39236c6e
A
10ifdef RC_ARCHS
11 ARCHS:=$(RC_ARCHS)
12 else
13 ifeq "$(Embedded)" "YES"
fe8ab488 14 ARCHS:=armv7 armv7s arm64
39236c6e
A
15 else
16 ARCHS:=x86_64 i386
17 endif
18endif
b0d623f7 19
39236c6e
A
20ARCH_32 := $(filter-out %64, $(ARCHS))
21ARCH_32_FLAGS := $(patsubst %, -arch %, $(ARCH_32))
22ARCH_64 := $(filter %64, $(ARCHS))
23ARCH_64_FLAGS := $(patsubst %, -arch %, $(ARCH_64))
b0d623f7 24
39236c6e 25DSTROOT?=$(shell /bin/pwd)
b0d623f7 26
39236c6e
A
27ARCH_32_TARGETS := MPMMtest KQMPMMtest KQMPMMtestD
28ARCH_64_TARGETS := MPMMtest_64 KQMPMMtest_64 KQMPMMtest_64D
29TARGETS := $(if $(ARCH_64), $(ARCH_64_TARGETS)) $(if $(ARCH_32), $(ARCH_32_TARGETS))
b0d623f7 30
39236c6e
A
31all: $(addprefix $(DSTROOT)/, $(TARGETS))
32
33$(DSTROOT)/MPMMtest: MPMMtest.c
34 ${CC} ${CFLAGS} ${ARCH_32_FLAGS} -o $(SYMROOT)/$(notdir $@) $?
35 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
36
37$(DSTROOT)/MPMMtest_64: MPMMtest.c
38 ${CC} ${CFLAGS} ${ARCH_64_FLAGS} -o $(SYMROOT)/$(notdir $@) $?
39 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
40
41$(DSTROOT)/KQMPMMtest: KQMPMMtest.c
42 ${CC} ${CFLAGS} ${ARCH_32_FLAGS} -o $(SYMROOT)/$(notdir $@) $?
43 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
44
45$(DSTROOT)/KQMPMMtest_64: KQMPMMtest.c
46 ${CC} ${CFLAGS} ${ARCH_64_FLAGS} -o $(SYMROOT)/$(notdir $@) $?
47 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
48
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
52
53$(DSTROOT)/KQMPMMtest_64D: KQMPMMtest.c
3e170ce0 54 ${CC} ${CFLAGS} ${ARCH_64_FLAGS} -DDIRECT_MSG_RCV=1 -o $(SYMROOT)/$(notdir $@) $?
39236c6e 55 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
b0d623f7
A
56
57clean:
39236c6e 58 rm -rf $(addprefix $(DSTROOT)/,$(TARGETS)) $(addprefix $(SYMROOT)/,$(TARGETS)) $(SYMROOT)/*.dSYM