]>
Commit | Line | Data |
---|---|---|
3e170ce0 | 1 | include ../Makefile.common |
2d21ac55 | 2 | |
fe8ab488 | 3 | CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc) |
2d21ac55 | 4 | |
39236c6e | 5 | SYMROOT?=$(shell /bin/pwd) |
2d21ac55 | 6 | |
39037602 | 7 | CFLAGS :=-g -isysroot $(SDKROOT) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders |
f427ee49 | 8 | CFLAGS += -Wl,-sectcreate,__INFO_FILTER,__disable,/dev/null |
39236c6e A |
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 | ||
f427ee49 | 17 | TARGETS := $(if $(ARCH_CONFIGS_64), $(ARCH_64_TARGETS)) $(if $(ARCH_CONFIGS_32), $(ARCH_32_TARGETS)) |
39236c6e A |
18 | |
19 | ||
20 | all: $(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 | |
31 | clean: | |
39037602 | 32 | rm -f $(TARGETS) |
39236c6e | 33 | rm -rf $(SYMROOT)/*.dSYM |