]>
Commit | Line | Data |
---|---|---|
39236c6e A |
1 | SDKROOT ?= / |
2 | ifeq "$(RC_TARGET_CONFIG)" "iPhone" | |
3 | Embedded?=YES | |
4 | else | |
5 | Embedded?=$(shell echo $(SDKROOT) | grep -iq iphoneos && echo YES || echo NO) | |
6 | endif | |
7 | ||
8 | DSTROOT?=$(shell /bin/pwd) | |
9 | TARGETS := $(addprefix $(DSTROOT)/, measure_tlbs testsp) | |
fe8ab488 | 10 | CC:=$(shell xcrun -sdk "$(SDKROOT)" -find cc) |
39236c6e A |
11 | |
12 | ifdef RC_ARCHS | |
13 | ARCHS:=$(RC_ARCHS) | |
14 | else | |
15 | ifeq "$(Embedded)" "YES" | |
fe8ab488 | 16 | ARCHS:=armv7 armv7s arm64 |
39236c6e A |
17 | else |
18 | ARCHS:=x86_64 i386 | |
19 | endif | |
20 | endif | |
21 | ||
22 | ifneq ($(ARCHS),) | |
23 | CFLAGS += $(patsubst %, -arch %, $(ARCHS)) | |
24 | endif | |
25 | ||
26 | all: $(TARGETS) | |
27 | ||
28 | clean: | |
29 | rm -f $(TARGETS) | |
30 | ||
31 | $(TARGETS): $(DSTROOT)/%: %.c | |
32 | $(CC) $(CFLAGS) -o $@ $< |