]> git.saurik.com Git - apple/xnu.git/blame_incremental - tools/tests/affinity/Makefile
xnu-7195.101.1.tar.gz
[apple/xnu.git] / tools / tests / affinity / Makefile
... / ...
CommitLineData
1include ../Makefile.common
2
3CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc)
4
5SYMROOT?=$(shell /bin/pwd)
6
7CFLAGS :=-g -isysroot $(SDKROOT) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
8CFLAGS += -Wl,-sectcreate,__INFO_FILTER,__disable,/dev/null
9
10DSTROOT?=$(shell /bin/pwd)
11SRCROOT?=$(shell /bin/pwd)
12
13SOURCES := sets.c pool.c tags.c
14ARCH_32_TARGETS := $(addprefix $(DSTROOT)/, sets pool tags)
15ARCH_64_TARGETS := $(addprefix $(DSTROOT)/, sets64 pool64 tags64)
16
17TARGETS := $(if $(ARCH_CONFIGS_64), $(ARCH_64_TARGETS)) $(if $(ARCH_CONFIGS_32), $(ARCH_32_TARGETS))
18
19
20all: $(TARGETS)
21
22$(ARCH_32_TARGETS): $(DSTROOT)/%: $(SRCROOT)/%.c
23 $(CC) $(CFLAGS) $(ARCH_FLAGS_32) $< -o $(SYMROOT)/$(notdir $@) # 32-bit fat
24 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
25
26.SECONDEXPANSION:
27$(ARCH_64_TARGETS): $(DSTROOT)/%: $(SRCROOT)/$$(subst 64,,%).c
28 $(CC) $(CFLAGS) $(ARCH_FLAGS_64) $< -o $(SYMROOT)/$(notdir $@) # 64-bit fat
29 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
30
31clean:
32 rm -f $(TARGETS)
33 rm -rf $(SYMROOT)/*.dSYM