🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139 lines
3.5 KiB

  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. $(wildcard $(LOCAL_PATH)/src/audio/openslES/*.c) \
  18. $(LOCAL_PATH)/src/atomic/SDL_atomic.c.arm \
  19. $(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
  20. $(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
  21. $(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \
  22. $(wildcard $(LOCAL_PATH)/src/dynapi/*.c) \
  23. $(wildcard $(LOCAL_PATH)/src/events/*.c) \
  24. $(wildcard $(LOCAL_PATH)/src/file/*.c) \
  25. $(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
  26. $(wildcard $(LOCAL_PATH)/src/haptic/android/*.c) \
  27. $(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
  28. $(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
  29. $(wildcard $(LOCAL_PATH)/src/joystick/hidapi/*.c) \
  30. $(wildcard $(LOCAL_PATH)/src/joystick/virtual/*.c) \
  31. $(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
  32. $(wildcard $(LOCAL_PATH)/src/locale/*.c) \
  33. $(wildcard $(LOCAL_PATH)/src/locale/android/*.c) \
  34. $(wildcard $(LOCAL_PATH)/src/power/*.c) \
  35. $(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
  36. $(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \
  37. $(wildcard $(LOCAL_PATH)/src/sensor/*.c) \
  38. $(wildcard $(LOCAL_PATH)/src/sensor/android/*.c) \
  39. $(wildcard $(LOCAL_PATH)/src/render/*.c) \
  40. $(wildcard $(LOCAL_PATH)/src/render/*/*.c) \
  41. $(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
  42. $(wildcard $(LOCAL_PATH)/src/thread/*.c) \
  43. $(wildcard $(LOCAL_PATH)/src/thread/pthread/*.c) \
  44. $(wildcard $(LOCAL_PATH)/src/timer/*.c) \
  45. $(wildcard $(LOCAL_PATH)/src/timer/unix/*.c) \
  46. $(wildcard $(LOCAL_PATH)/src/video/*.c) \
  47. $(wildcard $(LOCAL_PATH)/src/video/android/*.c) \
  48. $(wildcard $(LOCAL_PATH)/src/video/yuv2rgb/*.c) \
  49. $(wildcard $(LOCAL_PATH)/src/test/*.c))
  50. LOCAL_SHARED_LIBRARIES := hidapi
  51. LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
  52. LOCAL_CFLAGS += \
  53. -Wall -Wextra \
  54. -Wdocumentation \
  55. -Wdocumentation-unknown-command \
  56. -Wmissing-prototypes \
  57. -Wunreachable-code-break \
  58. -Wunneeded-internal-declaration \
  59. -Wmissing-variable-declarations \
  60. -Wfloat-conversion \
  61. -Wshorten-64-to-32 \
  62. -Wunreachable-code-return \
  63. -Wshift-sign-overflow \
  64. -Wstrict-prototypes \
  65. -Wkeyword-macro \
  66. # Warnings we haven't fixed (yet)
  67. LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
  68. LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
  69. ifeq ($(NDK_DEBUG),1)
  70. cmd-strip :=
  71. endif
  72. LOCAL_STATIC_LIBRARIES := cpufeatures
  73. include $(BUILD_SHARED_LIBRARY)
  74. ###########################
  75. #
  76. # SDL static library
  77. #
  78. ###########################
  79. LOCAL_MODULE := SDL2_static
  80. LOCAL_MODULE_FILENAME := libSDL2
  81. LOCAL_LDLIBS :=
  82. LOCAL_EXPORT_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
  83. include $(BUILD_STATIC_LIBRARY)
  84. ###########################
  85. #
  86. # SDL main static library
  87. #
  88. ###########################
  89. include $(CLEAR_VARS)
  90. LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
  91. LOCAL_MODULE := SDL2_main
  92. LOCAL_MODULE_FILENAME := libSDL2main
  93. include $(BUILD_STATIC_LIBRARY)
  94. ###########################
  95. #
  96. # hidapi library
  97. #
  98. ###########################
  99. include $(CLEAR_VARS)
  100. LOCAL_CPPFLAGS += -std=c++11
  101. LOCAL_SRC_FILES := src/hidapi/android/hid.cpp
  102. LOCAL_MODULE := libhidapi
  103. LOCAL_LDLIBS := -llog
  104. include $(BUILD_SHARED_LIBRARY)
  105. $(call import-module,android/cpufeatures)