configure: Cleanup MacOS and iOS build settings

Makes it easy for users to select which compiler to use.
This commit is contained in:
Andrew Johnson
2012-02-27 14:40:07 -06:00
parent 3dec8f8c78
commit 140845fb14
4 changed files with 27 additions and 24 deletions

View File

@@ -42,10 +42,6 @@ ARCH_DEP_LDFLAGS += $(ARCH_DEP_FLAGS)
# Operating system flags
OP_SYS_CFLAGS += -isysroot $(SDK_DIR) -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200
#--------------------------------------------------
# Don't try to use precompiled headers when converting sequencer files
CPPSNCFLAGS += -no-cpp-precomp
#--------------------------------------------------
# Always compile in debugging symbol table information
#
@@ -54,13 +50,20 @@ OPT_CXXFLAGS_YES += -g
#-------------------------------------------------------
# Compiler definitions:
# Use clang instead of gcc
CC = $(GNU_BIN)/clang
CCC = $(GNU_BIN)/clang++
GNU_LDLIBS_YES =
CC_GNU = gcc
CCC_GNU = g++
CC_LLVM = llvm-gcc
CCC_LLVM = llvm-g++
CC_CLANG = clang
CCC_CLANG = clang++
CC = $(firstword $(wildcard $(GNU_BIN)/$(CC_$(COMPILER))) $(CC_$(COMPILER)))
CCC = $(firstword $(wildcard $(GNU_BIN)/$(CCC_$(COMPILER))) $(CCC_$(COMPILER)))
#-------------------------------------------------------
# Linker flags
GNU_LDLIBS_YES =
OP_SYS_LDFLAGS += -dynamic -Z -L$(SDK_DIR)/usr/lib -L$(SDK_DIR)/usr/lib/system
#-------------------------------------------------------

View File

@@ -36,11 +36,6 @@ ARCH_DEP_LDFLAGS += $(ARCH_DEP_FLAGS)
#
OP_SYS_CFLAGS += -fno-common
#
# Don't try to use precompiled headers when converting sequencer files
#
CPPSNCFLAGS += -no-cpp-precomp
#
# Darwin os definition
#

View File

@@ -19,10 +19,3 @@
ARCH_CLASS = armv7
#ARCH_CLASS = armv6 armv7
#ARCH_CLASS = armv6
# Uncomment these two definitions to use g++ instead of clang++
# which may be needed in some circumstances:
#
#CCC = $(GNU_BIN)/c++
#GNU_LDLIBS_YES = -lgcc

View File

@@ -10,17 +10,29 @@
#IOS_VERSION = 3.2
#IOS_VERSION = 4.1
#IOS_VERSION = 4.2
#IOS_VERSION = 4.3
IOS_VERSION = 5.0
# Most sites will want shared libraries
# Which compiler to use:
# CLANG is preferred for recent versions of Xcode
# LLVM uses the llvm-gcc and llvm-g++ compilers
# GNU is needed for older versions of Xcode
STATIC_BUILD=NO
SHARED_LIBRARIES=YES
COMPILER = CLANG
#COMPILER = LLVM
#COMPILER = GNU
# Platform path, this is probably correct
# Most sites will want to build shared libraries (which is the
# default), but if you get an error from ld while building libCom,
# try uncommenting this, which is needed for some compiler versions:
#SHARED_LIBRARIES = NO
# Get platform path from OS, these are usually correct:
XCODE_PATH := $(shell xcode-select -print-path)
PLATFORM_DIR = $(XCODE_PATH)/Platforms/$(IOS_PLATFORM).platform