Android.mk
author Sam Lantinga <slouken@libsdl.org>
Fri, 18 Oct 2019 08:56:54 -0700
changeset 13146 d7af4858793e
parent 13040 58a4430a9492
permissions -rw-r--r--
Fixed whitespace
     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/loadso/dlopen/*.c) \
    37 	$(wildcard $(LOCAL_PATH)/src/power/*.c) \
    38 	$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
    39 	$(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \
    40 	$(wildcard $(LOCAL_PATH)/src/sensor/*.c) \
    41 	$(wildcard $(LOCAL_PATH)/src/sensor/android/*.c) \
    42 	$(wildcard $(LOCAL_PATH)/src/render/*.c) \
    43 	$(wildcard $(LOCAL_PATH)/src/render/*/*.c) \
    44 	$(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
    45 	$(wildcard $(LOCAL_PATH)/src/thread/*.c) \
    46 	$(wildcard $(LOCAL_PATH)/src/thread/pthread/*.c) \
    47 	$(wildcard $(LOCAL_PATH)/src/timer/*.c) \
    48 	$(wildcard $(LOCAL_PATH)/src/timer/unix/*.c) \
    49 	$(wildcard $(LOCAL_PATH)/src/video/*.c) \
    50 	$(wildcard $(LOCAL_PATH)/src/video/android/*.c) \
    51 	$(wildcard $(LOCAL_PATH)/src/video/yuv2rgb/*.c) \
    52 	$(wildcard $(LOCAL_PATH)/src/test/*.c))
    53 
    54 LOCAL_SHARED_LIBRARIES := hidapi
    55 
    56 LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
    57 LOCAL_CFLAGS += \
    58 	-Wall -Wextra \
    59 	-Wdocumentation \
    60 	-Wdocumentation-unknown-command \
    61 	-Wmissing-prototypes \
    62 	-Wunreachable-code-break \
    63 	-Wunneeded-internal-declaration \
    64 	-Wmissing-variable-declarations \
    65 	-Wfloat-conversion \
    66 	-Wshorten-64-to-32 \
    67 	-Wunreachable-code-return \
    68 	-Wshift-sign-overflow \
    69 	-Wunused-macros \
    70 	-Wstrict-prototypes \
    71 	-Wkeyword-macro \
    72 
    73 
    74 # Warnings we haven't fixed (yet)
    75 LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
    76  
    77 
    78 LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
    79 
    80 ifeq ($(NDK_DEBUG),1)
    81     cmd-strip :=
    82 endif
    83 
    84 LOCAL_STATIC_LIBRARIES := cpufeatures
    85 
    86 include $(BUILD_SHARED_LIBRARY)
    87 
    88 ###########################
    89 #
    90 # SDL static library
    91 #
    92 ###########################
    93 
    94 LOCAL_MODULE := SDL2_static
    95 
    96 LOCAL_MODULE_FILENAME := libSDL2
    97 
    98 LOCAL_LDLIBS := 
    99 LOCAL_EXPORT_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
   100 
   101 include $(BUILD_STATIC_LIBRARY)
   102 
   103 ###########################
   104 #
   105 # SDL main static library
   106 #
   107 ###########################
   108 
   109 include $(CLEAR_VARS)
   110 
   111 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
   112 
   113 LOCAL_MODULE := SDL2_main
   114 
   115 LOCAL_MODULE_FILENAME := libSDL2main
   116 
   117 include $(BUILD_STATIC_LIBRARY)
   118 
   119 ###########################
   120 #
   121 # hidapi library
   122 #
   123 ###########################
   124 
   125 include $(CLEAR_VARS)
   126 
   127 LOCAL_CPPFLAGS += -std=c++11
   128 
   129 LOCAL_SRC_FILES := src/hidapi/android/hid.cpp
   130 
   131 LOCAL_MODULE := libhidapi
   132 LOCAL_LDLIBS := -llog
   133 
   134 include $(BUILD_SHARED_LIBRARY)
   135 
   136 $(call import-module,android/cpufeatures)
   137