Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LOCAL_PATH := $(call my-dir)
- include $(CLEAR_VARS)
- LOCAL_MODULE := game_shared
- LOCAL_MODULE_FILENAME := libgame
- #traverse all the directory and subdirectory
- define walk
- $(wildcard $(1)) $(foreach e, $(wildcard $(1)/*), $(call walk, $(e)))
- endef
- #find all the file recursively under jni/
- ALLFILES = $(call walk, $(LOCAL_PATH)/../../Classes/)
- LOCAL_SRC_FILES := androidMain.cpp
- GAME_SRCs := $(filter %.cpp, $(ALLFILES))
- LOCAL_SRC_FILES += $(patsubst jni/%,%, $(GAME_SRCs))
- LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../../Classes \
- $(LOCAL_PATH)/../../external/SDL/include \
- $(LOCAL_PATH)/../../external/Box2d \
- $(LOCAL_PATH)/../../external/KazMath/src \
- $(LOCAL_PATH)/../../external/libpng/src \
- $(LOCAL_PATH)/../../external/SDL_Image/src \
- $(LOCAL_PATH)/../../external/zlib/src
- LOCAL_STATIC_LIBRARIES := \
- Box2d_static \
- KazMath_static \
- SDL2_Image_static
- LCOAL_STATIC_WHOLE_LIBRARIES := SDL2_static
- LOCAL_LDLIBS := -llog -landroid -lEGL
- include $(BUILD_SHARED_LIBRARY)
- $(call import-module, Box2D)
- $(call import-module, glew)
- $(call import-module, KazMath)
- $(call import-module, SDL)
- $(call import-module, SDL_Image)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement