-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build scripts to successfully build iPhone application bundle …
…(added many missing frameworks). Include architecture and sysroot settings when linking on OS X.
- Loading branch information
1 parent
450e6d9
commit 433e6f6
Showing
3 changed files
with
61 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,59 @@ | ||
#################### | ||
# Android Settings # | ||
#################### | ||
ANDROID_SDK_ROOT = $(HOME)/Development/Tools/android-sdk-macosx | ||
ANDROID_NDK_ROOT = $(HOME)/Development/Tools/android-ndk-r9d | ||
ANDROID_TOOLCHAIN_ROOT = $(HOME)/Development/Tools/android-toolchain | ||
ALLEGRO_SRC_ROOT = $(HOME)/Development/Libraries/allegro5 | ||
CC = i586-mingw32msvc-gcc | ||
CFLAGS = $(GLOBAL_CFLAGS) $(APP_CFLAGS) $(MINGW_CROSS_CFLAGS) | ||
LFLAGS = -mwindows | ||
LIB_SUFFIX = -static | ||
PLATFORM_OBJECTS = t3f/menu.o t3f/windows.o icon.o $(MINGW_CROSS_PLATFORM_OBJECTS) | ||
PLATFORM_LIBS = -lallegro_dialog$(LIB_SUFFIX) $(MINGW_CROSS_PLATFORM_LIBS) | ||
DEPEND_LIBS = $(MINGW_CROSS_DEPEND_LIBS) -luuid -lkernel32 -lwinmm -lpsapi\ | ||
-lopengl32 -lglu32 -luser32 -lcomdlg32 -lgdi32 -lshell32 -lole32\ | ||
-ladvapi32 -lws2_32 -lshlwapi -lvorbisfile -lvorbis -logg -ldumb\ | ||
-lfreetype -lpng -lz -ld3d9 -ldsound -lstdc++ | ||
DEL_COMMAND = rm -f | ||
DEL_FOLDER_COMMAND = rm -rf | ||
SED_COMMAND = sed -i | ||
EXE_SUFFIX = .exe | ||
COPY_COMMAND = cp | ||
PATH_SEPARATOR = / | ||
|
||
##################### | ||
# Mac OS X Settings # | ||
##################### | ||
MACOSX_ARCHITECURES = -arch i386 -arch x86_64 | ||
MACOSX_SYS_ROOT = -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk | ||
MACOSX_MIN_VERSION = -mmacosx-version-min=10.6 | ||
MACOSX_COMPILER_SETTINGS = -I/usr/local/include | ||
MACOSX_LINKER_SETTINGS = -L/usr/local/lib | ||
MACOSX_CC = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc | ||
MACOSX_CXX = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ | ||
include makefile.common | ||
|
||
#################### | ||
# Windows Settings # | ||
#################### | ||
INNO_SETUP_COMPILER = ~/.wine/drive_c/Program\ Files/Inno\ Setup\ 5/Compil32.exe | ||
#DLLS_DIR = | ||
icon.o : ../icons/windows_icon.ico ../win32/icon.rc | ||
i586-mingw32msvc-windres --include-dir=../icons -o icon.o ../win32/icon.rc | ||
|
||
################### | ||
# iPhone Settings # | ||
################### | ||
IPHONE_ARCHITECTURES = -arch armv7 -arch arm64 | ||
IPHONE_SYS_ROOT = -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk | ||
IPHONE_MIN_VERSION = -miphoneos-version-min=10.6 | ||
IPHONE_COMPILER_SETTINGS = -I/usr/local/iphone/include | ||
IPHONE_LINKER_SETTINGS = -L/usr/local/iphone/lib | ||
../win32/info_fixer: ../win32/info_fixer.o | ||
$(CC) $(GLOBAL_CFLAGS) ../win32/info_fixer.o -o ../win32/info_fixer | ||
|
||
#making a Windows package automatically requires adding some extra variables through the command line | ||
#DLLS_DIR is the location of the DLLs that are to be included in the installer | ||
#INNO_SETUP_COMPILER is the path to the compiler executable | ||
windows_package: $(APP_EXE_NAME) ../win32/info_fixer | ||
ifndef INNO_SETUP_COMPILER | ||
@echo Usage: "make windows_package INNO_SETUP_COMPILER=path_to_compiler" | ||
else | ||
@cp ../win32/installer.iss installer_final.iss | ||
@sed -i "s|T3F_APP_NAME|$(APP_TITLE)|" installer_final.iss | ||
@sed -i "s|T3F_APP_VERSION|$(APP_VERSION)|" installer_final.iss | ||
@sed -i "s|T3F_APP_COPYRIGHT|$(APP_COPYRIGHT)|" installer_final.iss | ||
@sed -i "s|T3F_APP_PUBLISHER|$(APP_PUBLISHER)|" installer_final.iss | ||
@sed -i "s|T3F_APP_URL|$(APP_URL)|" installer_final.iss | ||
@../win32/info_fixer ../docs/copyright ../win32/copyright | ||
@../win32/info_fixer ../docs/README ../win32/README | ||
@sed -i "s|T3F_APP_LICENSE_FILE|../win32/copyright|" installer_final.iss | ||
@sed -i "s|T3F_APP_README_FILE|../win32/README|" installer_final.iss | ||
@sed -i "s|T3F_APP_INSTALLER_DIR|../|" installer_final.iss | ||
@sed -i "s|T3F_APP_INSTALLER_NAME|$(APP_PACKAGE_NAME)-installer|" installer_final.iss | ||
@sed -i "s|T3F_APP_DATA_DIR|../bin/data|" installer_final.iss | ||
@sed -i "s|T3F_APP_DOCS_DIR|../docs|" installer_final.iss | ||
@sed -i "s|T3F_APP_LIBS_DIR|$(DLLS_DIR)|" installer_final.iss | ||
@sed -i "s|T3F_APP_USER_LIBS_DIR|$(USER_DLLS_DIR)|" installer_final.iss | ||
@sed -i "s|T3F_APP_EXECUTABLE|$(APP_NAME)$(EXE_SUFFIX)|" installer_final.iss | ||
@wine $(INNO_SETUP_COMPILER) /cc installer_final.iss | ||
@rm installer_final.iss | ||
@rm ../win32/copyright | ||
@rm ../win32/README | ||
@rm ../win32/info_fixer | ||
endif | ||
|
||
windows_zip: $(APP_EXE_NAME) | ||
@cd ../bin; zip -9 -r ../$(APP_NAME)-$(APP_VERSION)-windows.zip *; cd ..; cp -a docs win32; cd win32/docs; mv changelog history.txt; mv README readme.txt; mv copyright license.txt; cd ..; zip -9 -r ../$(APP_NAME)-$(APP_VERSION)-windows.zip docs; rm -rf docs | ||
@echo Windows package created! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters