1 include ../Makefile.common
3 CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc)
5 SYMROOT?=$(shell /bin/pwd)
7 CFLAGS := -g -O2 -isysroot $(SDKROOT) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
12 ifeq "$(Embedded)" "YES"
13 ARCHS:=armv7 armv7s arm64
19 ARCH_32 := $(filter-out %64, $(ARCHS))
20 ARCH_64 := $(filter %64, $(ARCHS))
22 ARCH_32_FLAGS := $(patsubst %, -arch %, $(ARCH_32))
23 ARCH_64_FLAGS := $(patsubst %, -arch %, $(ARCH_64))
24 ARCH_FLAGS := $(if $(ARCH_64), $(ARCH_64_FLAGS)) $(if $(ARCH_32), $(ARCH_32_FLAGS))
26 DSTROOT?=$(shell /bin/pwd)
28 TARGETS := persona_mgr persona_spawn
30 all: $(addprefix $(DSTROOT)/, $(TARGETS))
32 $(DSTROOT)/persona_%: persona_%.c persona_test.h Makefile
33 ${CC} ${CFLAGS} ${ARCH_FLAGS} -o $(SYMROOT)/$(notdir $@) $<
34 if [ ! -e $@ ]; then ditto $(SYMROOT)/$(notdir $@) $@; fi
37 rm -rf $(addprefix $(DSTROOT)/,$(TARGETS)) $(addprefix $(SYMROOT)/,$(TARGETS)) $(SYMROOT)/*.dSYM