Created
May 27, 2011 19:34
-
-
Save gre/995971 to your computer and use it in GitHub Desktop.
Web App Maker - Makefile sample (used by Same Game Gravity - Android version)
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
# Same Game Gravity - Android full version # | |
### ~ Web App Builder ~ ### | |
# a Makefile to compile a web project. # | |
# designed for web project with different devices # | |
# (mobile, tablet, desktop) but with common code. # | |
### by @greweb - http://greweb.fr/ ### | |
# BUILD_DIR : PATH to Web App Builder /build directory (the directory containing all build tools) | |
BUILD_DIR = ../build | |
# SRC_DIR : the source directory | |
SRC_DIR = ../app | |
# DIST_DIR : the dist directory (ex: assets for android, www for iphone) | |
DIST_DIR = assets | |
# RESOURCES : Your assets (images, sounds, fonts... and other static files) | |
# You can rename dist file by prefix newname= ( ex: index.html=iphone_version.html ) | |
RESOURCES = Chewy.ttf logo.png background.jpg pop.mp3 swosh.mp3 gravity_exemple.png | |
# VIEWS : Views will be interpreted by Mustache.js | |
# You can pass arguments with JSON format. | |
# Example: index.html:"{key1:value1,key2:value2,...}" <= no spaces! | |
VIEWS = index.html=mobile.html:"{versionType:'',version:'1.0',platform:'mobile',android:true,free:false}" | |
### SCRIPTS : all javascripts | |
# - You can pass an URL to retrieve | |
# - if you want to minimize the JS, prefix with '!' | |
# - to mix scripts, concat them with a comma ',' | |
# - to set the destination name, you can prefix scripts with 'myname.js=' else the first script name is used ( exemple: all.js=util.js,ui.js,main.js ). | |
SCRIPTS = game.min.js=!game.js,!game.mobile.js,!md5.js \ | |
phonegap.min.js=!phonegap.js,!phonegap.webintent.js \ | |
jquery.min.js=http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js,jquery.ba-hashchange.min.js,jquery.tmpl.min.js | |
### STYLES : all styles : CSS or SASS | |
# - For .sass files, we compile them to css | |
# - Like before, you can mix styles with ',' and you can name your target by prefixing 'name=' | |
STYLES = game.css=mobile.sass | |
######################################################################## | |
all: welcome clean assets_views assets_scripts assets_styles assets_files | |
welcome: | |
@@${BUILD_DIR}/welcome.sh | |
assets_base: | |
@@mkdir -p ${DIST_DIR} | |
assets_views: assets_base | |
@@${BUILD_DIR}/compile_views.sh ${SRC_DIR} ${DIST_DIR} ${VIEWS} | |
assets_scripts: assets_base | |
@@${BUILD_DIR}/compile_scripts.sh ${SRC_DIR} ${DIST_DIR} ${SCRIPTS} | |
assets_styles: assets_base | |
@@${BUILD_DIR}/compile_styles.sh ${SRC_DIR} ${DIST_DIR} ${STYLES} | |
assets_files: assets_base | |
@@${BUILD_DIR}/copy_resources.sh ${SRC_DIR} ${DIST_DIR} ${RESOURCES} | |
clean: | |
@@rm -rf ${DIST_DIR} | |
.PHONY: welcome clean assets_views assets_scripts assets_styles assets_files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment