27499895f7
This allows building two versions for different architectures at the same time, without the built files clobbering each other. This is very helpful when trying to track down differences between two build configurations. To build outside of the source tree, create the other directory to use for building (either outside of the openh264 directory, or as a subdirectory), enter that directory, and do "make -f path/to/openh264/Makefile".
18 lines
564 B
Makefile
18 lines
564 B
Makefile
ARCH = armv7
|
|
include $(SRC_PATH)build/platform-darwin.mk
|
|
CXX = clang++
|
|
CC = clang
|
|
ifneq ($(filter %86 x86_64, $(ARCH)),)
|
|
SDKTYPE = iPhoneSimulator
|
|
else
|
|
SDKTYPE = iPhoneOS
|
|
endif
|
|
SDK = $(shell xcrun --sdk $(shell echo $(SDKTYPE) | tr A-Z a-z) --show-sdk-version)
|
|
SDK_MIN = 5.1
|
|
|
|
XCODE=$(shell xcode-select -p)
|
|
SDKROOT = $(XCODE)/Platforms/$(SDKTYPE).platform/Developer/SDKs/$(SDKTYPE)$(SDK).sdk
|
|
CFLAGS += -arch $(ARCH) -isysroot $(SDKROOT) -miphoneos-version-min=$(SDK_MIN) -DAPPLE_IOS
|
|
LDFLAGS += -arch $(ARCH) -isysroot $(SDKROOT) -miphoneos-version-min=$(SDK_MIN)
|
|
|