2 ifeq "$(RC_TARGET_CONFIG)" "iPhone"
5 Embedded?=$(shell echo $(SDKROOT) | grep -iq iphoneos && echo YES || echo NO)
8 CC:=xcrun -sdk "$(SDKROOT)" cc
10 SYMROOT?=$(shell /bin/pwd)
15 ifeq "$(Embedded)" "YES"
22 ARCH_32 := $(filter-out %64, $(ARCHS))
23 ARCH_32_FLAGS := $(patsubst %, -arch %, $(ARCH_32))
24 ARCH_64 := $(filter %64, $(ARCHS))
25 ARCH_64_FLAGS := $(patsubst %, -arch %, $(ARCH_64))
29 DSTROOT?=$(shell /bin/pwd)
30 SRCROOT?=$(shell /bin/pwd)
32 SOURCES := sets.c pool.c tags.c
33 ARCH_32_TARGETS := $(addprefix $(DSTROOT)/, sets pool tags)
34 ARCH_64_TARGETS := $(addprefix $(DSTROOT)/, sets64 pool64 tags64)
36 TARGETS := $(if $(ARCH_64), $(ARCH_64_TARGETS)) $(if $(ARCH_32), $(ARCH_32_TARGETS))
41 $(ARCH_32_TARGETS): $(DSTROOT)/%: $(SRCROOT)/%.c
42 $(CC) $(CFLAGS) $(ARCH_32_FLAGS) $< -o $(SYMROOT)/$(notdir $@) # 32-bit fat
43 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
46 $(ARCH_64_TARGETS): $(DSTROOT)/%: $(SRCROOT)/$$(subst 64,,%).c
47 $(CC) $(CFLAGS) $(ARCH_64_FLAGS) $< -o $(SYMROOT)/$(notdir $@) # 64-bit fat
48 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
52 rm -rf $(SYMROOT)/*.dSYM