1 include ../Makefile.common
3 CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc)
5 SYMROOT?=$(shell /bin/pwd)
10 ifeq "$(Embedded)" "YES"
11 ARCHS:=armv7 armv7s arm64
17 ARCH_32 := $(filter-out %64, $(ARCHS))
18 ARCH_32_FLAGS := $(patsubst %, -arch %, $(ARCH_32))
19 ARCH_64 := $(filter %64, $(ARCHS))
20 ARCH_64_FLAGS := $(patsubst %, -arch %, $(ARCH_64))
22 CFLAGS :=-g -isysroot $(SDKROOT) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
24 DSTROOT?=$(shell /bin/pwd)
25 SRCROOT?=$(shell /bin/pwd)
27 SOURCES := sets.c pool.c tags.c
28 ARCH_32_TARGETS := $(addprefix $(DSTROOT)/, sets pool tags)
29 ARCH_64_TARGETS := $(addprefix $(DSTROOT)/, sets64 pool64 tags64)
31 TARGETS := $(if $(ARCH_64), $(ARCH_64_TARGETS)) $(if $(ARCH_32), $(ARCH_32_TARGETS))
36 $(ARCH_32_TARGETS): $(DSTROOT)/%: $(SRCROOT)/%.c
37 $(CC) $(CFLAGS) $(ARCH_32_FLAGS) $< -o $(SYMROOT)/$(notdir $@) # 32-bit fat
38 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
41 $(ARCH_64_TARGETS): $(DSTROOT)/%: $(SRCROOT)/$$(subst 64,,%).c
42 $(CC) $(CFLAGS) $(ARCH_64_FLAGS) $< -o $(SYMROOT)/$(notdir $@) # 64-bit fat
43 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
47 rm -rf $(SYMROOT)/*.dSYM