-SDKROOT ?= /
-ifeq "$(RC_TARGET_CONFIG)" "iPhone"
-Embedded?=YES
-else
-Embedded?=$(shell echo $(SDKROOT) | grep -iq iphoneos && echo YES || echo NO)
-endif
-
-ifdef RC_ARCHS
- ARCHS:=$(RC_ARCHS)
- else
- ifeq "$(Embedded)" "YES"
- ARCHS:=armv7 armv7s arm64
- else
- ARCHS:=x86_64 i386
- endif
-endif
+include ../Makefile.common
CC = $(shell xcrun -sdk "$(SDKROOT)" -find cc)
STRIP = $(shell xcrun -sdk "$(SDKROOT)" -find strip)
CODESIGN = $(shell xcrun -sdk "$(SDKROOT)" -find codesign)
export CODESIGN_ALLOCATE := $(shell xcrun -sdk "$(SDKROOT)" -find codesign_allocate)
DSYMUTIL = $(shell xcrun -sdk "$(SDKROOT)" -find dsymutil)
CC = $(shell xcrun -sdk "$(SDKROOT)" -find cc)
STRIP = $(shell xcrun -sdk "$(SDKROOT)" -find strip)
CODESIGN = $(shell xcrun -sdk "$(SDKROOT)" -find codesign)
export CODESIGN_ALLOCATE := $(shell xcrun -sdk "$(SDKROOT)" -find codesign_allocate)
DSYMUTIL = $(shell xcrun -sdk "$(SDKROOT)" -find dsymutil)
-CFLAGS = -O0 -g -isysroot $(SDKROOT) $(patsubst %, -arch %,$(ARCHS))
+CFLAGS = -O0 -g -isysroot $(SDKROOT) $(ARCH_FLAGS)
+CFLAGS += -Wl,-sectcreate,__INFO_FILTER,__disable,/dev/null