LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := cocos2dcpp_shared
LOCAL_MODULE_FILENAME := libcocos2dcpp
#traverse all the directory and subdirectory
define walk
$(wildcard $(
1
)) $(foreach e,$(wildcard $(
)/*),$(call walk,$(e)))
endef
#traverse Classes Directory
ALLFILES = $(call walk,$(LOCAL_PATH)/../../Classes)
FILE_LIST := hellocpp/main.cpp
FILE_LIST += $(filter %.cpp,$(ALLFILES))
FILE_LIST += $(filter %.c,$(ALLFILES))
FILE_INCLUDES := $(shell find $(LOCAL_PATH)/../../Classes -type d)
#source file will be compiled
LOCAL_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,.)
dio/android)
# $(call
Box2D)
dio)
原文链接:https://www.f2er.com/cocos2dx/343084.html