mirror of https://github.com/axmolengine/axmol.git
fixed #970: use modules in the Android NDK build
This commit is contained in:
parent
8770976884
commit
9249328afb
|
@ -1,8 +1,10 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
# compile box2d.a
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := libbox2d
|
||||
|
||||
LOCAL_MODULE := box2d_shared
|
||||
|
||||
LOCAL_MODULE_FILENAME := libbox2d
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Collision/Shapes/b2ChainShape.cpp \
|
||||
|
@ -51,6 +53,8 @@ Dynamics/b2World.cpp \
|
|||
Dynamics/b2WorldCallbacks.cpp \
|
||||
Rope/b2Rope.cpp
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/..
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := cocosdenshion
|
||||
|
||||
LOCAL_MODULE := cocosdenshion_shared
|
||||
|
||||
LOCAL_MODULE_FILENAME := libcocosdenshion
|
||||
|
||||
LOCAL_SRC_FILES := SimpleAudioEngine.cpp \
|
||||
jni/SimpleAudioEngineJni.cpp
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../include
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include
|
||||
|
||||
LOCAL_LDLIBS := -llog
|
||||
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
|
@ -1,18 +1,14 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := game_logic
|
||||
LOCAL_MODULE := game_shared
|
||||
|
||||
LOCAL_MODULE_FILENAME := libgame
|
||||
|
||||
LOCAL_SRC_FILES := AppDelegate.cpp \
|
||||
HelloWorldScene.cpp
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../cocos2dx \
|
||||
$(LOCAL_PATH)/../../cocos2dx/platform \
|
||||
$(LOCAL_PATH)/../../cocos2dx/include \
|
||||
$(LOCAL_PATH)/../../CocosDenshion/include \
|
||||
$(LOCAL_PATH)/../../cocos2dx/lua_support
|
||||
|
||||
LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../android/libs/$(TARGET_ARCH_ABI)) \
|
||||
-lcocos2d -lcocosdenshion \
|
||||
-L$(call host-path, $(LOCAL_PATH)/../../cocos2dx/platform/third_party/android/libraries/$(TARGET_ARCH_ABI)) -lcurl
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := cocos2dx_shared cocosdenshion_shared
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
|
@ -1,4 +1,4 @@
|
|||
APP_STL := gnustl_static
|
||||
APP_CPPFLAGS += -frtti
|
||||
|
||||
APP_MODULES := cocos2d cocosdenshion game_logic helloworld
|
||||
APP_MODULES := cocos2dx_shared cocosdenshion_shared game_shared helloworld_shared
|
|
@ -1,15 +1,13 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := helloworld
|
||||
|
||||
LOCAL_MODULE := helloworld_shared
|
||||
|
||||
LOCAL_MODULE_FILENAME := helloworld
|
||||
|
||||
LOCAL_SRC_FILES := main.cpp
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../cocos2dx \
|
||||
$(LOCAL_PATH)/../../../../cocos2dx/platform \
|
||||
$(LOCAL_PATH)/../../../../cocos2dx/include \
|
||||
$(LOCAL_PATH)/../../../Classes
|
||||
|
||||
LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../../libs/$(TARGET_ARCH_ABI)) \
|
||||
-lcocos2d -llog -lgame_logic
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := cocos2dx_shared game_logic
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
|
@ -1,8 +1,10 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
# compile chipmunk.a
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := libchipmunk
|
||||
|
||||
LOCAL_MODULE := chipmunk_shared
|
||||
|
||||
LOCAL_MODULE_FILENAME := libchipmunk
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
src/chipmunk.c \
|
||||
|
@ -32,6 +34,8 @@ src/cpSpaceQuery.c \
|
|||
src/cpSpaceStep.c \
|
||||
src/cpVect.c
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include/chipmunk
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include/chipmunk
|
||||
LOCAL_CFLAGS := -std=c99
|
||||
|
||||
|
|
|
@ -109,6 +109,10 @@ touch_dispatcher/CCTouchHandler.cpp
|
|||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/ \
|
||||
$(LOCAL_PATH)/include \
|
||||
$(LOCAL_PATH)/platform
|
||||
|
||||
LOCAL_EXPORT_LDLIBS := -llog\
|
||||
-lz \
|
||||
-lGLESv1_CM
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/ \
|
||||
$(LOCAL_PATH)/include \
|
||||
|
@ -127,6 +131,8 @@ LOCAL_CFLAGS := -DUSE_FILE32API
|
|||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
$(call import-add-path,$(LOCAL_PATH)/..)
|
||||
|
||||
# note that the import-module calls are relative to the parent directory
|
||||
# this simplifies makefiles that use this module
|
||||
# it requires only one entry in NDK_MODULE_PATH - the module search path
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := curl_static_prebuilt
|
||||
LOCAL_MODULE_FILENAME := curl
|
||||
LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/libcurl.a
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
|
@ -2,14 +2,10 @@ LOCAL_PATH := $(call my-dir)
|
|||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := game
|
||||
|
||||
LOCAL_MODULE_FILENAME := libgame
|
||||
|
||||
LOCAL_SRC_FILES := main.cpp
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../cocos2dx \
|
||||
$(LOCAL_PATH)/../../../../cocos2dx/platform \
|
||||
$(LOCAL_PATH)/../../../../cocos2dx/include \
|
||||
$(LOCAL_PATH)/../../../Classes
|
||||
|
||||
LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../../libs/$(TARGET_ARCH_ABI)) \
|
||||
-lcocos2d -llog -lgame_logic
|
||||
LOCAL_SHARED_LIBRARIES := cocos2dx_shared game_shared
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
APP_STL := stlport_static
|
||||
APP_CPPFLAGS += -frtti
|
||||
APP_MODULES := cocos2d cocosdenshion game_logic game
|
||||
APP_MODULES := cocos2dx_shared cocosdenshion_shared game_shared game
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := game_logic
|
||||
|
||||
LOCAL_MODULE := game_shared
|
||||
|
||||
LOCAL_MODULE_FILENAME := libgame
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
tests/AccelerometerTest/AccelerometerTest.cpp \
|
||||
|
@ -89,20 +93,13 @@ tests/controller.cpp \
|
|||
tests/testBasic.cpp \
|
||||
AppDelegate.cpp
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../cocos2dx \
|
||||
$(LOCAL_PATH)/../cocos2dx/include \
|
||||
$(LOCAL_PATH)/../cocos2dx/platform \
|
||||
$(LOCAL_PATH)/../cocos2dx/platform/third_party/android/ \
|
||||
$(LOCAL_PATH)/../chipmunk/include/chipmunk \
|
||||
$(LOCAL_PATH)/../CocosDenshion/include \
|
||||
$(LOCAL_PATH)/..
|
||||
|
||||
|
||||
LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/test.android/libs/$(TARGET_ARCH_ABI)) \
|
||||
-lGLESv1_CM \
|
||||
-lcocos2d -llog -lcocosdenshion \
|
||||
-lbox2d -lchipmunk \
|
||||
-L$(call host-path, $(LOCAL_PATH)/../cocos2dx/platform/third_party/android/libraries/$(TARGET_ARCH_ABI)) -lcurl
|
||||
LOCAL_STATIC_LIBRARIES := curl_static_prebuilt
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := cocos2dx_shared cocosdenshion_shared box2d_shared chipmunk_shared
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
$(call import-module,cocos2dx/platform/third_party/android/modules/libcurl)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
APP_STL := gnustl_static
|
||||
APP_CPPFLAGS += -frtti
|
||||
|
||||
APP_MODULES := cocos2d cocosdenshion chipmunk box2d game_logic tests
|
||||
APP_MODULES := cocos2dx_shared cocosdenshion_shared chipmunk_shared box2d_shared game_shared tests_shared
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := tests
|
||||
|
||||
LOCAL_MODULE := tests_shared
|
||||
|
||||
LOCAL_MODULE_FILENAME := libtests
|
||||
|
||||
LOCAL_SRC_FILES := main.cpp
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../cocos2dx \
|
||||
$(LOCAL_PATH)/../../../../cocos2dx/platform \
|
||||
$(LOCAL_PATH)/../../../../cocos2dx/include \
|
||||
$(LOCAL_PATH)/../../..
|
||||
|
||||
|
||||
LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../../libs/$(TARGET_ARCH_ABI)) \
|
||||
-lGLESv1_CM \
|
||||
-lcocos2d -llog -lgame_logic
|
||||
LOCAL_SHARED_LIBRARIES := cocos2dx_shared game_shared
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
|
|
Loading…
Reference in New Issue