Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

102 Zeilen
3.3 KiB

  1. #**************************************************************************************************
  2. #
  3. # raylib for Android
  4. #
  5. # Game template makefile
  6. #
  7. # Copyright (c) 2014 Ramon Santamaria (Ray San - raysan@raysanweb.com)
  8. #
  9. # This software is provided "as-is", without any express or implied warranty. In no event
  10. # will the authors be held liable for any damages arising from the use of this software.
  11. #
  12. # Permission is granted to anyone to use this software for any purpose, including commercial
  13. # applications, and to alter it and redistribute it freely, subject to the following restrictions:
  14. #
  15. # 1. The origin of this software must not be misrepresented; you must not claim that you
  16. # wrote the original software. If you use this software in a product, an acknowledgment
  17. # in the product documentation would be appreciated but is not required.
  18. #
  19. # 2. Altered source versions must be plainly marked as such, and must not be misrepresented
  20. # as being the original software.
  21. #
  22. # 3. This notice may not be removed or altered from any source distribution.
  23. #
  24. #**************************************************************************************************
  25. # Path of the current directory (i.e. the directory containing the Android.mk file itself)
  26. LOCAL_PATH := $(call my-dir)
  27. # OpenAL module (prebuilt static library)
  28. # NOTE: Shared library brokes the build! Why?
  29. #--------------------------------------------------------------------
  30. include $(CLEAR_VARS)
  31. # Module name
  32. LOCAL_MODULE := openal
  33. # Precompiled lib
  34. LOCAL_SRC_FILES := libs/libopenal.a
  35. # Export headers
  36. LOCAL_EXPORT_C_INCLUDES := include
  37. # Build static library
  38. #include $(PREBUILT_SHARED_LIBRARY)
  39. include $(PREBUILT_STATIC_LIBRARY)
  40. #--------------------------------------------------------------------
  41. # raylib module (prebuilt static library)
  42. #--------------------------------------------------------------------
  43. include $(CLEAR_VARS)
  44. # Module name
  45. LOCAL_MODULE := raylib
  46. # Precompiled lib
  47. LOCAL_SRC_FILES := libs/libraylib.a
  48. # Export headers
  49. LOCAL_EXPORT_C_INCLUDES := include
  50. # Static library dependency
  51. LOCAL_STATIC_LIBRARIES := android_native_app_glue
  52. # Build static library
  53. include $(PREBUILT_STATIC_LIBRARY)
  54. #--------------------------------------------------------------------
  55. # raylib game module (shared library)
  56. #--------------------------------------------------------------------
  57. # Makefile that will clear many LOCAL_XXX variables for you
  58. include $(CLEAR_VARS)
  59. # Module name
  60. LOCAL_MODULE := raylib_game
  61. # Module source files
  62. LOCAL_SRC_FILES := basic_game.c
  63. # Required includes paths (.h)
  64. # NOTE: raylib header and openal headers are included using LOCAL_EXPORT_C_INCLUDES
  65. LOCAL_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/include
  66. # Required flags for compilation: defines PLATFORM_ANDROID
  67. LOCAL_CFLAGS := -Wall -std=c99 -g -DPLATFORM_ANDROID
  68. # Linker required libraries (not many...)
  69. LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv2 -lOpenSLES
  70. # Required static library
  71. LOCAL_STATIC_LIBRARIES := android_native_app_glue raylib openal
  72. # Required shared library
  73. # NOTE: It brokes the build, using static library instead
  74. #LOCAL_SHARED_LIBRARIES := openal
  75. # Build the shared library libraylib_game.so
  76. include $(BUILD_SHARED_LIBRARY)
  77. $(call import-module,android/native_app_glue)
  78. #--------------------------------------------------------------------