🛠️🐜 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.

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