]>
Commit | Line | Data |
---|---|---|
1 | include ../Makefile.common | |
2 | ||
3 | CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc) | |
4 | ||
5 | SYMROOT?=$(shell /bin/pwd) | |
6 | ||
7 | CFLAGS :=-g -isysroot $(SDKROOT) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders | |
8 | CFLAGS += -Wl,-sectcreate,__INFO_FILTER,__disable,/dev/null | |
9 | ||
10 | DSTROOT?=$(shell /bin/pwd) | |
11 | SRCROOT?=$(shell /bin/pwd) | |
12 | ||
13 | SOURCES := sets.c pool.c tags.c | |
14 | ARCH_32_TARGETS := $(addprefix $(DSTROOT)/, sets pool tags) | |
15 | ARCH_64_TARGETS := $(addprefix $(DSTROOT)/, sets64 pool64 tags64) | |
16 | ||
17 | TARGETS := $(if $(ARCH_CONFIGS_64), $(ARCH_64_TARGETS)) $(if $(ARCH_CONFIGS_32), $(ARCH_32_TARGETS)) | |
18 | ||
19 | ||
20 | all: $(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 | ||
31 | clean: | |
32 | rm -f $(TARGETS) | |
33 | rm -rf $(SYMROOT)/*.dSYM |