android.mk를 아래와 같이 수정한다.

 

* for build_native.sh

CLASSES_DIRECTORY := $(LOCAL_PATH)/../../Classes

SOURCE_FILES := $(shell find $(CLASSES_DIRECTORY) -name *.cpp)
SOURCE_FILES := $(sort $(SOURCE_FILES))
SOURCE_FILES := $(subst $(LOCAL_PATH)/,,$(SOURCE_FILES))

LOCAL_SRC_FILES := hellocpp/main.cpp \
                   $(SOURCE_FILES)

 

 

* for build_native.py  

FILE_LIST := $(wildcard $(LOCAL_PATH)/../../Classes/*.cpp)

LOCAL_SRC_FILES := hellocpp/main.cpp \
      $(FILE_LIST:$(LOCAL_PATH)/%=%)

 

 

출처 : http://westwoodforever.blogspot.kr/2013/12/cocos2d-x-androidmk-localsrcfiles.html

Posted by 자갈공명 zagalnet

댓글을 달아 주세요