]> git.saurik.com Git - apple/xnu.git/blame - tools/tests/affinity/Makefile
xnu-7195.101.1.tar.gz
[apple/xnu.git] / tools / tests / affinity / Makefile
CommitLineData
3e170ce0 1include ../Makefile.common
2d21ac55 2
fe8ab488 3CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc)
2d21ac55 4
39236c6e 5SYMROOT?=$(shell /bin/pwd)
2d21ac55 6
39037602 7CFLAGS :=-g -isysroot $(SDKROOT) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
f427ee49 8CFLAGS += -Wl,-sectcreate,__INFO_FILTER,__disable,/dev/null
39236c6e
A
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
f427ee49 17TARGETS := $(if $(ARCH_CONFIGS_64), $(ARCH_64_TARGETS)) $(if $(ARCH_CONFIGS_32), $(ARCH_32_TARGETS))
39236c6e
A
18
19
20all: $(TARGETS)
21
22$(ARCH_32_TARGETS): $(DSTROOT)/%: $(SRCROOT)/%.c
f427ee49 23 $(CC) $(CFLAGS) $(ARCH_FLAGS_32) $< -o $(SYMROOT)/$(notdir $@) # 32-bit fat
39236c6e
A
24 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
25
26.SECONDEXPANSION:
27$(ARCH_64_TARGETS): $(DSTROOT)/%: $(SRCROOT)/$$(subst 64,,%).c
f427ee49 28 $(CC) $(CFLAGS) $(ARCH_FLAGS_64) $< -o $(SYMROOT)/$(notdir $@) # 64-bit fat
39236c6e 29 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
2d21ac55
A
30
31clean:
39037602 32 rm -f $(TARGETS)
39236c6e 33 rm -rf $(SYMROOT)/*.dSYM