Skip to content

Commit

Permalink
build ios executable
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmaclarty committed Feb 11, 2016
1 parent 66b8d9c commit 834180f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
12 changes: 9 additions & 3 deletions Common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ else ifeq ($(TARGET_PLATFORM),ios32)
SDK_PATH = $(XCODE_PATH)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(SDK_VERSION).sdk
TARGET_CFLAGS += -arch armv7 -isysroot $(SDK_PATH) -miphoneos-version-min=5.0
XCFLAGS += -ObjC++
XLDFLAGS = -lm -liconv -Wl,-framework,OpenGLES -lobjc \
XLDFLAGS = $(TARGET_CFLAGS) -lm -liconv -Wl,-framework,OpenGLES -lobjc \
-Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox \
-Wl,-framework,UIKit -Wl,-framework,QuartzCore \
-Wl,-framework,CoreMotion -Wl,-framework,Foundation \
Expand All @@ -161,7 +161,7 @@ else ifeq ($(TARGET_PLATFORM),ios64)
SDK_PATH = $(XCODE_PATH)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(SDK_VERSION).sdk
TARGET_CFLAGS += -arch arm64 -isysroot $(SDK_PATH) -miphoneos-version-min=5.0
XCFLAGS += -ObjC++
XLDFLAGS = -lm -liconv -Wl,-framework,OpenGLES -lobjc \
XLDFLAGS = $(TARGET_CFLAGS) -lm -liconv -Wl,-framework,OpenGLES -lobjc \
-Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox \
-Wl,-framework,UIKit -Wl,-framework,QuartzCore \
-Wl,-framework,CoreMotion -Wl,-framework,Foundation \
Expand All @@ -177,7 +177,7 @@ else ifeq ($(TARGET_PLATFORM),iossim)
SDK_PATH = $(XCODE_PATH)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$(SDK_VERSION).sdk
TARGET_CFLAGS += -arch x86_64 -isysroot $(SIM_SDK_PATH) -miphoneos-version-min=5.0
XCFLAGS += -ObjC++
XLDFLAGS = -lm -liconv -Wl,-framework,OpenGLES -lobjc \
XLDFLAGS = $(TARGET_CFLAGS) -lm -liconv -Wl,-framework,OpenGLES -lobjc \
-Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox \
-Wl,-framework,UIKit -Wl,-framework,QuartzCore \
-Wl,-framework,CoreMotion -Wl,-framework,Foundation \
Expand Down Expand Up @@ -288,6 +288,12 @@ else
else ifeq ($(TARGET_PLATFORM),osx)
GRADE_CFLAGS = -O3 -DNDEBUG
GRADE_LDFLAGS =
else ifeq ($(TARGET_PLATFORM),ios32)
GRADE_CFLAGS = -O3 -DNDEBUG
GRADE_LDFLAGS =
else ifeq ($(TARGET_PLATFORM),ios64)
GRADE_CFLAGS = -O3 -DNDEBUG
GRADE_LDFLAGS =
else
GRADE_CFLAGS = -O3 -DNDEBUG
GRADE_LDFLAGS = -s
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ $(AMULET): $(DEP_ALIBS) $(AM_OBJ_FILES) $(EMSCRIPTEN_LIBS) $(EMSCRIPTEN_PREJS) |
$(LINK) $(AM_OBJ_FILES) $(AM_LDFLAGS) $(EXE_OUT_OPT)$@
@$(PRINT_BUILD_DONE_MSG)
else ifdef IOS
# Just build the static library for iOS. Building the executable works,
# but I don't know how to import that into Xcode.
# Also build the static library for iOS for use in Xcode.
$(AMULET): $(DEP_ALIBS) $(AM_OBJ_FILES) $(EXTRA_PREREQS) | $(BUILD_BIN_DIR)
rm -f $(AR_OUT_OPT)$@$(ALIB_EXT)
rm -f $@$(ALIB_EXT)
$(AR) $(AR_OPTS) $(AR_OUT_OPT)$@$(ALIB_EXT) $(AM_OBJ_FILES)
$(LINK) $(AM_OBJ_FILES) $(AM_LDFLAGS) $(EXE_OUT_OPT)$@
@$(PRINT_BUILD_DONE_MSG)
else ifdef WINDOWS
# build both console and windows versions
Expand Down

0 comments on commit 834180f

Please sign in to comment.