Advertisement
Guest User

Untitled

a guest
Oct 12th, 2016
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 1.16 KB | None | 0 0
  1. LOCAL_PATH := $(call my-dir)
  2.  
  3. include $(CLEAR_VARS)
  4.  
  5. LOCAL_MODULE := game_shared
  6.  
  7. LOCAL_MODULE_FILENAME := libgame
  8.  
  9. #traverse all the directory and subdirectory
  10. define walk
  11.   $(wildcard $(1)) $(foreach e, $(wildcard $(1)/*), $(call walk, $(e)))
  12. endef
  13.  
  14. #find all the file recursively under jni/
  15. ALLFILES = $(call walk, $(LOCAL_PATH)/../../Classes/)
  16.  
  17. LOCAL_SRC_FILES := androidMain.cpp
  18. GAME_SRCs := $(filter %.cpp, $(ALLFILES))
  19. LOCAL_SRC_FILES += $(patsubst jni/%,%, $(GAME_SRCs))
  20.  
  21.  
  22. LOCAL_C_INCLUDES := \
  23.     $(LOCAL_PATH)/../../Classes \
  24.     $(LOCAL_PATH)/../../external/SDL/include \
  25.     $(LOCAL_PATH)/../../external/Box2d \
  26.     $(LOCAL_PATH)/../../external/KazMath/src \
  27.     $(LOCAL_PATH)/../../external/libpng/src \
  28.     $(LOCAL_PATH)/../../external/SDL_Image/src \
  29.     $(LOCAL_PATH)/../../external/zlib/src
  30.  
  31. LOCAL_STATIC_LIBRARIES := \
  32.     Box2d_static \
  33.     KazMath_static \
  34.     SDL2_Image_static
  35. LCOAL_STATIC_WHOLE_LIBRARIES := SDL2_static
  36.    
  37. LOCAL_LDLIBS := -llog -landroid -lEGL
  38.  
  39. include $(BUILD_SHARED_LIBRARY)
  40.  
  41. $(call import-module, Box2D)
  42. $(call import-module, glew)
  43. $(call import-module, KazMath)
  44. $(call import-module, SDL)
  45. $(call import-module, SDL_Image)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement