2012-03-01 02:51:58 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2012-02-29 17:48:45 +08:00
|
|
|
FILE=$1
|
2013-06-04 22:21:41 +08:00
|
|
|
USE_BOX2D=$2
|
|
|
|
USE_CHIPMUNK=$3
|
|
|
|
USE_LUA=$4
|
2012-02-29 17:48:45 +08:00
|
|
|
|
2012-07-23 16:42:07 +08:00
|
|
|
LOCAL_STATIC_LIBRARIES="LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static cocos_extension_static"
|
|
|
|
MODULES_TO_CALL="\$(call import-module,CocosDenshion/android) \\
|
|
|
|
\$(call import-module,cocos2dx) \\
|
|
|
|
\$(call import-module,extensions)"
|
|
|
|
|
2012-07-23 14:56:40 +08:00
|
|
|
LOCAL_SRC_FILES="LOCAL_SRC_FILES := hellocpp/main.cpp \\
|
2012-05-02 17:29:16 +08:00
|
|
|
../../Classes/AppDelegate.cpp \\
|
|
|
|
../../Classes/HelloWorldScene.cpp"
|
2012-02-29 17:48:45 +08:00
|
|
|
|
2013-06-04 22:21:41 +08:00
|
|
|
if [ $USE_BOX2D = "true" ];then
|
2012-05-02 17:29:16 +08:00
|
|
|
LOCAL_STATIC_LIBRARIES=$LOCAL_STATIC_LIBRARIES" box2d_static"
|
2012-07-23 14:56:40 +08:00
|
|
|
MODULES_TO_CALL=$MODULES_TO_CALL" \$(call import-module,external/Box2D)"
|
2012-02-29 17:48:45 +08:00
|
|
|
fi
|
|
|
|
|
2013-06-04 22:21:41 +08:00
|
|
|
if [ $USE_CHIPMUNK = "true" ]; then
|
2012-05-02 17:29:16 +08:00
|
|
|
LOCAL_STATIC_LIBRARIES=$LOCAL_STATIC_LIBRARIES" chipmunk_static"
|
2012-07-23 14:56:40 +08:00
|
|
|
MODULES_TO_CALL=$MODULES_TO_CALL" \$(call import-module,external/chipmunk)"
|
2012-02-29 17:48:45 +08:00
|
|
|
fi
|
|
|
|
|
2013-06-04 22:21:41 +08:00
|
|
|
if [ $USE_LUA = "true" ]; then
|
2012-05-02 17:29:16 +08:00
|
|
|
LOCAL_STATIC_LIBRARIES=$LOCAL_STATIC_LIBRARIES" cocos_lua_static"
|
2013-04-16 17:34:58 +08:00
|
|
|
MODULES_TO_CALL=$MODULES_TO_CALL" \$(call import-module,scripting/lua/proj.android)"
|
2012-02-29 17:48:45 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
cat > $FILE << EOF
|
|
|
|
LOCAL_PATH := \$(call my-dir)
|
|
|
|
|
|
|
|
include \$(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := game_shared
|
|
|
|
|
|
|
|
LOCAL_MODULE_FILENAME := libgame
|
|
|
|
|
2012-05-02 17:29:16 +08:00
|
|
|
$LOCAL_SRC_FILES
|
|
|
|
|
|
|
|
LOCAL_C_INCLUDES := \$(LOCAL_PATH)/../../Classes
|
2012-02-29 17:48:45 +08:00
|
|
|
|
2012-05-02 17:29:16 +08:00
|
|
|
$LOCAL_STATIC_LIBRARIES
|
2012-02-29 17:48:45 +08:00
|
|
|
|
|
|
|
include \$(BUILD_SHARED_LIBRARY)
|
|
|
|
|
2012-05-02 17:29:16 +08:00
|
|
|
$MODULES_TO_CALL
|
2012-03-01 02:51:58 +08:00
|
|
|
EOF
|