Cocos2d-x中android.mk檔案中cpp檔案的自動產生

來源:互聯網
上載者:User

標籤:cocos2d-x   android.mk   

1、這段代碼下載自子龍山人,雖然沒看懂,應該是通用版的。https://gist.github.com/andyque/6060595

LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := game_shared LOCAL_MODULE_FILENAME := libgame #traverse all the directory and subdirectorydefine walk  $(wildcard $(1)) $(foreach e, $(wildcard $(1)/*), $(call walk, $(e)))endef #traverse Classes DirectoryALLFILES = $(call walk, $(LOCAL_PATH)/../../Classes) FILE_LIST := hellocpp/main.cppFILE_LIST += $(filter %.cpp, $(ALLFILES)) FILE_INCLUDES := $(shell find $(LOCAL_PATH)/../../Classes -type d) #source file will be compiledLOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)                    LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../external/Box2D/ $(FILE_INCLUDES)    LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static cocos_extension_static box2d_static            include $(BUILD_SHARED_LIBRARY) $(call import-module,CocosDenshion/android) $(call import-module,cocos2dx) $(call import-module,extensions) $(call import-module,external/Box2D)

2、我自己的

LOCAL_PATH := $(call my-dir)include $(CLEAR_VARS)LOCAL_MODULE := cocos2dcpp_sharedLOCAL_MODULE_FILENAME := libcocos2dcpp#traverse all the directory and subdirectorydefine walk  $(wildcard $(1)) $(foreach e, $(wildcard $(1)/*), $(call walk, $(e)))endef #traverse Classes DirectoryALLFILES = $(call walk, $(LOCAL_PATH)/../../Classes) FILE_LIST := hellocpp/main.cppFILE_LIST += $(filter %.cpp, $(ALLFILES))FILE_LIST += $(filter %.c, $(ALLFILES)) FILE_INCLUDES := $(shell find $(LOCAL_PATH)/../../Classes -type d) #source file will be compiledLOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)                    LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../external/Box2D/ $(FILE_INCLUDES) LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static cocos_extension_static box2d_staticinclude $(BUILD_SHARED_LIBRARY)$(call import-module,.)$(call import-module,audio/android)# $(call import-module,Box2D)# $(call import-module,editor-support/cocosbuilder)# $(call import-module,editor-support/spine)# $(call import-module,editor-support/cocostudio)# $(call import-module,network)# $(call import-module,extensions)


Cocos2d-x中android.mk檔案中cpp檔案的自動產生

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.