Android.mk
author Ryan C. Gordon
Sat, 31 Oct 2020 11:32:40 -0400
changeset 14210 2b1cce20e59b
parent 14066 7d7a72e4f9b6
permissions -rw-r--r--
coreaudio: Remove unnecessary include of CoreServices.h
     1 LOCAL_PATH := $(call my-dir)
     2 
     3 ###########################
     4 #
     5 # SDL shared library
     6 #
     7 ###########################
     8 
     9 include $(CLEAR_VARS)
    10 
    11 LOCAL_MODULE := SDL2
    12 
    13 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
    14 
    15 LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
    16 
    17 LOCAL_SRC_FILES := \
    18 	$(subst $(LOCAL_PATH)/,, \
    19 	$(wildcard $(LOCAL_PATH)/src/*.c) \
    20 	$(wildcard $(LOCAL_PATH)/src/audio/*.c) \
    21 	$(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
    22 	$(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
    23 	$(wildcard $(LOCAL_PATH)/src/audio/openslES/*.c) \
    24 	$(LOCAL_PATH)/src/atomic/SDL_atomic.c.arm \
    25 	$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
    26 	$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
    27 	$(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \
    28 	$(wildcard $(LOCAL_PATH)/src/dynapi/*.c) \
    29 	$(wildcard $(LOCAL_PATH)/src/events/*.c) \
    30 	$(wildcard $(LOCAL_PATH)/src/file/*.c) \
    31 	$(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
    32 	$(wildcard $(LOCAL_PATH)/src/haptic/android/*.c) \
    33 	$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
    34 	$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
    35 	$(wildcard $(LOCAL_PATH)/src/joystick/hidapi/*.c) \
    36 	$(wildcard $(LOCAL_PATH)/src/joystick/virtual/*.c) \
    37 	$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
    38 	$(wildcard $(LOCAL_PATH)/src/locale/*.c) \
    39 	$(wildcard $(LOCAL_PATH)/src/locale/android/*.c) \
    40 	$(wildcard $(LOCAL_PATH)/src/misc/*.c) \
    41 	$(wildcard $(LOCAL_PATH)/src/misc/android/*.c) \
    42 	$(wildcard $(LOCAL_PATH)/src/power/*.c) \
    43 	$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
    44 	$(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \
    45 	$(wildcard $(LOCAL_PATH)/src/sensor/*.c) \
    46 	$(wildcard $(LOCAL_PATH)/src/sensor/android/*.c) \
    47 	$(wildcard $(LOCAL_PATH)/src/render/*.c) \
    48 	$(wildcard $(LOCAL_PATH)/src/render/*/*.c) \
    49 	$(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
    50 	$(wildcard $(LOCAL_PATH)/src/thread/*.c) \
    51 	$(wildcard $(LOCAL_PATH)/src/thread/pthread/*.c) \
    52 	$(wildcard $(LOCAL_PATH)/src/timer/*.c) \
    53 	$(wildcard $(LOCAL_PATH)/src/timer/unix/*.c) \
    54 	$(wildcard $(LOCAL_PATH)/src/video/*.c) \
    55 	$(wildcard $(LOCAL_PATH)/src/video/android/*.c) \
    56 	$(wildcard $(LOCAL_PATH)/src/video/yuv2rgb/*.c) \
    57 	$(wildcard $(LOCAL_PATH)/src/test/*.c))
    58 
    59 LOCAL_SHARED_LIBRARIES := hidapi
    60 
    61 LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
    62 LOCAL_CFLAGS += \
    63 	-Wall -Wextra \
    64 	-Wdocumentation \
    65 	-Wdocumentation-unknown-command \
    66 	-Wmissing-prototypes \
    67 	-Wunreachable-code-break \
    68 	-Wunneeded-internal-declaration \
    69 	-Wmissing-variable-declarations \
    70 	-Wfloat-conversion \
    71 	-Wshorten-64-to-32 \
    72 	-Wunreachable-code-return \
    73 	-Wshift-sign-overflow \
    74 	-Wstrict-prototypes \
    75 	-Wkeyword-macro \
    76 
    77 
    78 # Warnings we haven't fixed (yet)
    79 LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
    80  
    81 
    82 LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
    83 
    84 ifeq ($(NDK_DEBUG),1)
    85     cmd-strip :=
    86 endif
    87 
    88 LOCAL_STATIC_LIBRARIES := cpufeatures
    89 
    90 include $(BUILD_SHARED_LIBRARY)
    91 
    92 ###########################
    93 #
    94 # SDL static library
    95 #
    96 ###########################
    97 
    98 LOCAL_MODULE := SDL2_static
    99 
   100 LOCAL_MODULE_FILENAME := libSDL2
   101 
   102 LOCAL_LDLIBS := 
   103 LOCAL_EXPORT_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
   104 
   105 include $(BUILD_STATIC_LIBRARY)
   106 
   107 ###########################
   108 #
   109 # SDL main static library
   110 #
   111 ###########################
   112 
   113 include $(CLEAR_VARS)
   114 
   115 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
   116 
   117 LOCAL_MODULE := SDL2_main
   118 
   119 LOCAL_MODULE_FILENAME := libSDL2main
   120 
   121 include $(BUILD_STATIC_LIBRARY)
   122 
   123 ###########################
   124 #
   125 # hidapi library
   126 #
   127 ###########################
   128 
   129 include $(CLEAR_VARS)
   130 
   131 LOCAL_CPPFLAGS += -std=c++11
   132 
   133 LOCAL_SRC_FILES := src/hidapi/android/hid.cpp
   134 
   135 LOCAL_MODULE := libhidapi
   136 LOCAL_LDLIBS := -llog
   137 
   138 include $(BUILD_SHARED_LIBRARY)
   139 
   140 $(call import-module,android/cpufeatures)
   141