Android.mk 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. LOCAL_PATH := $(call my-dir)
  2. ###########################
  3. #
  4. # SDL shared library
  5. #
  6. ###########################
  7. include $(CLEAR_VARS)
  8. LOCAL_MODULE := SDL2
  9. LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
  10. LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
  11. LOCAL_SRC_FILES := \
  12. $(subst $(LOCAL_PATH)/,, \
  13. $(wildcard $(LOCAL_PATH)/src/*.c) \
  14. $(wildcard $(LOCAL_PATH)/src/audio/*.c) \
  15. $(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
  16. $(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
  17. $(LOCAL_PATH)/src/atomic/SDL_atomic.c \
  18. $(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
  19. $(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
  20. $(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \
  21. $(wildcard $(LOCAL_PATH)/src/dynapi/*.c) \
  22. $(wildcard $(LOCAL_PATH)/src/events/*.c) \
  23. $(wildcard $(LOCAL_PATH)/src/file/*.c) \
  24. $(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
  25. $(wildcard $(LOCAL_PATH)/src/haptic/dummy/*.c) \
  26. $(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
  27. $(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
  28. $(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
  29. $(wildcard $(LOCAL_PATH)/src/power/*.c) \
  30. $(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
  31. $(wildcard $(LOCAL_PATH)/src/filesystem/dummy/*.c) \
  32. $(wildcard $(LOCAL_PATH)/src/render/*.c) \
  33. $(wildcard $(LOCAL_PATH)/src/render/*/*.c) \
  34. $(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
  35. $(wildcard $(LOCAL_PATH)/src/thread/*.c) \
  36. $(wildcard $(LOCAL_PATH)/src/thread/pthread/*.c) \
  37. $(wildcard $(LOCAL_PATH)/src/timer/*.c) \
  38. $(wildcard $(LOCAL_PATH)/src/timer/unix/*.c) \
  39. $(wildcard $(LOCAL_PATH)/src/video/*.c) \
  40. $(wildcard $(LOCAL_PATH)/src/video/android/*.c) \
  41. $(wildcard $(LOCAL_PATH)/src/test/*.c))
  42. LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
  43. LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
  44. include $(BUILD_SHARED_LIBRARY)
  45. ###########################
  46. #
  47. # SDL static library
  48. #
  49. ###########################
  50. LOCAL_MODULE := SDL2_static
  51. LOCAL_MODULE_FILENAME := libSDL2
  52. LOCAL_SRC_FILES += $(LOCAL_PATH)/src/main/android/SDL_android_main.c
  53. LOCAL_LDLIBS :=
  54. LOCAL_EXPORT_LDLIBS := -Wl,--undefined=Java_org_libsdl_app_SDLActivity_nativeInit -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
  55. include $(BUILD_STATIC_LIBRARY)