Merge branch 'android_ndk_modules' of https://github.com/folecr/cocos2d-x into ndk_module

This commit is contained in:
minggo 2012-02-07 10:48:07 +08:00
commit 8770976884
68 changed files with 49 additions and 14 deletions

View File

@ -1,8 +1,10 @@
LOCAL_PATH := $(call my-dir)
# compile cocos2d.so
include $(CLEAR_VARS)
LOCAL_MODULE := libcocos2d
LOCAL_MODULE := cocos2dx_shared
LOCAL_MODULE_FILENAME := libcocos2d
LOCAL_SRC_FILES := \
CCConfiguration.cpp \
@ -93,7 +95,7 @@ text_input_node/CCIMEDispatcher.cpp \
text_input_node/CCTextFieldTTF.cpp \
textures/CCTexture2D.cpp \
textures/CCTextureAtlas.cpp \
textures/CCTextureCache.cpp \
textures/CCTextureCache.cpp \
textures/CCTexturePVR.cpp \
tileMap_parallax_nodes/CCParallaxNode.cpp \
tileMap_parallax_nodes/CCTMXLayer.cpp \
@ -104,21 +106,30 @@ tileMap_parallax_nodes/CCTileMapAtlas.cpp \
touch_dispatcher/CCTouchDispatcher.cpp \
touch_dispatcher/CCTouchHandler.cpp
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/ \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/platform
LOCAL_C_INCLUDES := $(LOCAL_PATH)/ \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/platform \
$(LOCAL_PATH)/platform/third_party/android/iconv \
$(LOCAL_PATH)/platform/third_party/android/libpng \
$(LOCAL_PATH)/platform/third_party/android/libxml2 \
$(LOCAL_PATH)/platform/third_party/android/libjpeg
$(LOCAL_PATH)/platform
LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/platform/third_party/android/libraries/$(TARGET_ARCH_ABI)) \
-lGLESv1_CM -llog -lz \
-lpng \
-lxml2 \
-ljpeg
LOCAL_LDLIBS := -lGLESv1_CM \
-llog \
-lz
LOCAL_STATIC_LIBRARIES := png_static_prebuilt
LOCAL_STATIC_LIBRARIES += xml2_static_prebuilt
LOCAL_STATIC_LIBRARIES += jpeg_static_prebuilt
# define the macro to compile through support/zip_support/ioapi.c
LOCAL_CFLAGS := -DUSE_FILE32API
include $(BUILD_SHARED_LIBRARY)
# 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
$(call import-module,cocos2dx/platform/third_party/android/modules/libpng)
$(call import-module,cocos2dx/platform/third_party/android/modules/libxml2)
$(call import-module,cocos2dx/platform/third_party/android/modules/libjpeg)

View File

@ -0,0 +1,8 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := jpeg_static_prebuilt
LOCAL_MODULE_FILENAME := jpeg
LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/libjpeg.a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_STATIC_LIBRARY)

View File

@ -0,0 +1,8 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := png_static_prebuilt
LOCAL_MODULE_FILENAME := png
LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/libpng.a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_STATIC_LIBRARY)

View File

@ -0,0 +1,8 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := xml2_static_prebuilt
LOCAL_MODULE_FILENAME := xml2
LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/libxml2.a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_STATIC_LIBRARY)