]>
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 -O2 -isysroot $(SDKROOT) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders | |
8 | ||
9 | ifdef RC_ARCHS | |
10 | ARCHS:=$(RC_ARCHS) | |
11 | else | |
12 | ifeq "$(Embedded)" "YES" | |
13 | ARCHS:=armv7 armv7s arm64 | |
14 | else | |
15 | ARCHS:=x86_64 i386 | |
16 | endif | |
17 | endif | |
18 | ||
19 | ARCH_32 := $(filter-out %64, $(ARCHS)) | |
20 | ARCH_64 := $(filter %64, $(ARCHS)) | |
21 | ||
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)) | |
25 | ||
26 | DSTROOT?=$(shell /bin/pwd) | |
27 | ||
28 | TARGETS := persona_mgr persona_spawn | |
29 | ||
30 | all: $(addprefix $(DSTROOT)/, $(TARGETS)) | |
31 | ||
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 | |
35 | ||
36 | clean: | |
37 | rm -rf $(addprefix $(DSTROOT)/,$(TARGETS)) $(addprefix $(SYMROOT)/,$(TARGETS)) $(SYMROOT)/*.dSYM |