lutin/Makefile.MacOs.mk

80 lines
2.9 KiB
Makefile

# Setup macros definitions
include $(EWOL_FOLDER)/Build/core/defs.mk
# include generic makefile :
include $(EWOL_FOLDER)/Build/core/check-project-variable.mk
# for MAcOSX we need to FORCE CLANG
CLANG:=1
# ewemple of a cross compiler :
# http://biolpc22.york.ac.uk/pub/linux-mac-cross/
# http://devs.openttd.org/~truebrain/compile-farm/apple-darwin9.txt
TARGET_OUT_FOLDER_BINARY := MacOS
TARGET_OUT_FOLDER_LIBRAIRY := lib
TARGET_OUT_FOLDER_DATA := Resources
TARGET_OUT_FOLDER_DOC := doc
TARGET_OUT_PREFIX_LIBRAIRY :=
# include generic makefile :
include $(EWOL_FOLDER)/Build/core/main.mk
FINAL_FOLDER= $(TARGET_OUT_FINAL)/$(PROJECT_NAME).app/Contents
FINAL_FOLDER_BIN= $(FINAL_FOLDER)/MacOS
FINAL_FOLDER_DATA= $(FINAL_FOLDER)/Resources
FINAL_FILE_INFO=$(FINAL_FOLDER)/Info.plist
# http://www.sandroid.org/imcross/#Deployment
final:
@echo ------------------------------------------------------------------------
@echo Final
@echo ------------------------------------------------------------------------
@echo 'Create Folders ...'
@mkdir -p $(FINAL_FOLDER)
@mkdir -p $(FINAL_FOLDER_BIN)
@mkdir -p $(FINAL_FOLDER_DATA)
# Create the info file
@echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $(FINAL_FILE_INFO)
@echo "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">" >> $(FINAL_FILE_INFO)
@echo "<plist version=\"1.0\">" >> $(FINAL_FILE_INFO)
@echo " <dict>" >> $(FINAL_FILE_INFO)
@echo " <key>CFBundleExecutableFile</key>" >> $(FINAL_FILE_INFO)
@echo " <string>"$(PROJECT_NAME)"</string>" >> $(FINAL_FILE_INFO)
@echo " <key>CFBundleName</key>" >> $(FINAL_FILE_INFO)
@echo " <string>"$(PROJECT_NAME)"</string>" >> $(FINAL_FILE_INFO)
@echo " <key>CFBundleIdentifier</key>" >> $(FINAL_FILE_INFO)
@echo " <string>com."$(PROJECT_VENDOR)"."$(PROJECT_NAME)"</string>" >> $(FINAL_FILE_INFO)
@echo " <key>CFBundleIconFile</key>" >> $(FINAL_FILE_INFO)
@echo " <string>"$(PROJECT_NAME)".icns</string>" >> $(FINAL_FILE_INFO)
@echo " </dict>" >> $(FINAL_FILE_INFO)
@echo "</plist>" >> $(FINAL_FILE_INFO)
@echo "" >> $(FINAL_FILE_INFO)
# copy program and data :
@cp -f $(TARGET_OUT_STAGING)/usr/bin/* $(FINAL_FOLDER_BIN)
$(if $(wildcard ./share/*), cp -rf share/* $(FINAL_FOLDER_DATA))
@echo pachage : TARBALL
@cd $(TARGET_OUT_FINAL)/; tar -cf $(PROJECT_NAME).tar $(PROJECT_NAME).app
@cd $(TARGET_OUT_FINAL)/; tar -czf $(PROJECT_NAME).tar.gz $(PROJECT_NAME).app
install: final
@echo ------------------------------------------------------------------------
@echo Install : ????
@echo ------------------------------------------------------------------------
uninstall:
@echo ------------------------------------------------------------------------
@echo UnInstall : ????
@echo ------------------------------------------------------------------------