Android.mk
author Sam Lantinga <slouken@libsdl.org>
Thu, 09 Aug 2018 16:00:17 -0700
changeset 12088 399cc39583cc
parent 12032 a1fde7f4230f
child 12130 24142c5073a4
permissions -rwxr-xr-x
Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms.
Added SDL_GameControllerRumble() and SDL_JoystickRumble() for simple force feedback outside of the SDL haptics API
     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 	$(LOCAL_PATH)/src/atomic/SDL_atomic.c.arm \
    24 	$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
    25 	$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
    26 	$(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \
    27 	$(wildcard $(LOCAL_PATH)/src/dynapi/*.c) \
    28 	$(wildcard $(LOCAL_PATH)/src/events/*.c) \
    29 	$(wildcard $(LOCAL_PATH)/src/file/*.c) \
    30 	$(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
    31 	$(wildcard $(LOCAL_PATH)/src/haptic/android/*.c) \
    32 	$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
    33 	$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
    34 	$(wildcard $(LOCAL_PATH)/src/joystick/hidapi/*.c) \
    35 	$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
    36 	$(wildcard $(LOCAL_PATH)/src/power/*.c) \
    37 	$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
    38 	$(wildcard $(LOCAL_PATH)/src/filesystem/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 
    51 LOCAL_SHARED_LIBRARIES := hidapi
    52 
    53 LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
    54 LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
    55 
    56 ifeq ($(NDK_DEBUG),1)
    57     cmd-strip :=
    58 endif
    59 
    60 include $(BUILD_SHARED_LIBRARY)
    61 
    62 ###########################
    63 #
    64 # SDL static library
    65 #
    66 ###########################
    67 
    68 LOCAL_MODULE := SDL2_static
    69 
    70 LOCAL_MODULE_FILENAME := libSDL2
    71 
    72 LOCAL_LDLIBS := 
    73 LOCAL_EXPORT_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
    74 
    75 include $(BUILD_STATIC_LIBRARY)
    76 
    77 ###########################
    78 #
    79 # SDL main static library
    80 #
    81 ###########################
    82 
    83 include $(CLEAR_VARS)
    84 
    85 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
    86 
    87 LOCAL_MODULE := SDL2_main
    88 
    89 LOCAL_MODULE_FILENAME := libSDL2main
    90 
    91 include $(BUILD_STATIC_LIBRARY)
    92 
    93 ###########################
    94 #
    95 # hidapi library
    96 #
    97 ###########################
    98 
    99 include $(CLEAR_VARS)
   100 
   101 LOCAL_CPPFLAGS += -std=c++11
   102 
   103 LOCAL_SRC_FILES := $(LOCAL_PATH)/src/hidapi/android/hid.cpp
   104 
   105 LOCAL_MODULE := libhidapi
   106 LOCAL_LDLIBS := -llog
   107 
   108 include $(BUILD_SHARED_LIBRARY)