Android.mk
author Steven M. Vascellaro <svascellaro@gmail.com>
Mon, 22 Oct 2018 10:55:18 -0400
changeset 12379 5dc13016cf34
parent 12365 09e3ef028bc8
child 12387 2f02c753a5dc
permissions -rw-r--r--
joystick: Add Linux mappings for "Xbox One Wireless Controller (Model 1708)"

Adds controller bindings to support the "Xbox One Wireless Controller
(Model 1708)" on Linux. The Model 1708 was released in 2016 alongside the
Xbox One S. It is the current model being sold by Microsoft as of writing.
(October 22, 2018)
     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/sensor/*.c) \
    40 	$(wildcard $(LOCAL_PATH)/src/sensor/android/*.c) \
    41 	$(wildcard $(LOCAL_PATH)/src/render/*.c) \
    42 	$(wildcard $(LOCAL_PATH)/src/render/*/*.c) \
    43 	$(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
    44 	$(wildcard $(LOCAL_PATH)/src/thread/*.c) \
    45 	$(wildcard $(LOCAL_PATH)/src/thread/pthread/*.c) \
    46 	$(wildcard $(LOCAL_PATH)/src/timer/*.c) \
    47 	$(wildcard $(LOCAL_PATH)/src/timer/unix/*.c) \
    48 	$(wildcard $(LOCAL_PATH)/src/video/*.c) \
    49 	$(wildcard $(LOCAL_PATH)/src/video/android/*.c) \
    50 	$(wildcard $(LOCAL_PATH)/src/video/yuv2rgb/*.c) \
    51 	$(wildcard $(LOCAL_PATH)/src/test/*.c))
    52 
    53 LOCAL_SHARED_LIBRARIES := hidapi
    54 
    55 LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
    56 LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
    57 
    58 ifeq ($(NDK_DEBUG),1)
    59     cmd-strip :=
    60 endif
    61 
    62 include $(BUILD_SHARED_LIBRARY)
    63 
    64 ###########################
    65 #
    66 # SDL static library
    67 #
    68 ###########################
    69 
    70 LOCAL_MODULE := SDL2_static
    71 
    72 LOCAL_MODULE_FILENAME := libSDL2
    73 
    74 LOCAL_LDLIBS := 
    75 LOCAL_EXPORT_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
    76 
    77 include $(BUILD_STATIC_LIBRARY)
    78 
    79 ###########################
    80 #
    81 # SDL main static library
    82 #
    83 ###########################
    84 
    85 include $(CLEAR_VARS)
    86 
    87 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
    88 
    89 LOCAL_MODULE := SDL2_main
    90 
    91 LOCAL_MODULE_FILENAME := libSDL2main
    92 
    93 include $(BUILD_STATIC_LIBRARY)
    94 
    95 ###########################
    96 #
    97 # hidapi library
    98 #
    99 ###########################
   100 
   101 include $(CLEAR_VARS)
   102 
   103 LOCAL_CPPFLAGS += -std=c++11
   104 
   105 LOCAL_SRC_FILES := src/hidapi/android/hid.cpp
   106 
   107 LOCAL_MODULE := libhidapi
   108 LOCAL_LDLIBS := -llog
   109 
   110 include $(BUILD_SHARED_LIBRARY)