`
song020cn
  • 浏览: 61718 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Cocos2dx android build shell file

阅读更多

./jni/Android.mk

 

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := game_shared

LOCAL_MODULE_FILENAME := libgame

LOCAL_SRC_FILES := hellocpp/main.cpp

define all-cpp-files-under
$(patsubst ./%,%, \
  $(shell cd $(LOCAL_PATH) ; \
          find ../../Classes -name "*.cpp" -and -not -name ".*") \
 )
endef

define all-subdir-cpp-files
$(call all-cpp-files-under,.)
endef

LOCAL_SRC_FILES += $(call all-subdir-cpp-files)
                   
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes                   

LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static cocos_extension_static
            
include $(BUILD_SHARED_LIBRARY)

$(call import-module,CocosDenshion/android) \
$(call import-module,cocos2dx) \
$(call import-module,extensions)

 

主要是修改 LOCAL_SRC_FILES 部分

原内容为

LOCAL_SRC_FILES := hellocpp/main.cpp \
                   ../../Classes/AppDelegate.cpp \
                   ../../Classes/HelloWorldScene.cpp

 

修改后

LOCAL_SRC_FILES := hellocpp/main.cpp

define all-cpp-files-under
$(patsubst ./%,%, \
  $(shell cd $(LOCAL_PATH) ; \
          find ../../Classes -name "*.cpp" -and -not -name ".*") \
 )
endef

define all-subdir-cpp-files
$(call all-cpp-files-under,.)
endef

LOCAL_SRC_FILES += $(call all-subdir-cpp-files)

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics