Android.mk
author Sam Lantinga <slouken@libsdl.org>
Fri, 29 May 2020 21:26:32 -0700
changeset 13884 ba1ed72249c0
parent 13797 55ec5ae4aa0b
permissions -rwxr-xr-x
Fixed bug 5113 - SDL_UpdateWindowSurfaceRects BitBlt the entire surface on Win32

Ryan C. Gordon

As discussed here:
https://discourse.libsdl.org/t/question-about-implementation-of-sdl-updatewindowsurfacerects/27561

"As you can see this function [WIN_UpdateWindowFramebuffer, in src/video/windows/SDL_windowsframebuffer.c] calls BitBlt on entire screen, even though it accepts the rects. Rects variable is not even used in this function at all. Now my question is why is that the case?"
     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/power/*.c) \
    41 	$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
    42 	$(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \
    43 	$(wildcard $(LOCAL_PATH)/src/sensor/*.c) \
    44 	$(wildcard $(LOCAL_PATH)/src/sensor/android/*.c) \
    45 	$(wildcard $(LOCAL_PATH)/src/render/*.c) \
    46 	$(wildcard $(LOCAL_PATH)/src/render/*/*.c) \
    47 	$(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
    48 	$(wildcard $(LOCAL_PATH)/src/thread/*.c) \
    49 	$(wildcard $(LOCAL_PATH)/src/thread/pthread/*.c) \
    50 	$(wildcard $(LOCAL_PATH)/src/timer/*.c) \
    51 	$(wildcard $(LOCAL_PATH)/src/timer/unix/*.c) \
    52 	$(wildcard $(LOCAL_PATH)/src/video/*.c) \
    53 	$(wildcard $(LOCAL_PATH)/src/video/android/*.c) \
    54 	$(wildcard $(LOCAL_PATH)/src/video/yuv2rgb/*.c) \
    55 	$(wildcard $(LOCAL_PATH)/src/test/*.c))
    56 
    57 LOCAL_SHARED_LIBRARIES := hidapi
    58 
    59 LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
    60 LOCAL_CFLAGS += \
    61 	-Wall -Wextra \
    62 	-Wdocumentation \
    63 	-Wdocumentation-unknown-command \
    64 	-Wmissing-prototypes \
    65 	-Wunreachable-code-break \
    66 	-Wunneeded-internal-declaration \
    67 	-Wmissing-variable-declarations \
    68 	-Wfloat-conversion \
    69 	-Wshorten-64-to-32 \
    70 	-Wunreachable-code-return \
    71 	-Wshift-sign-overflow \
    72 	-Wstrict-prototypes \
    73 	-Wkeyword-macro \
    74 
    75 
    76 # Warnings we haven't fixed (yet)
    77 LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
    78  
    79 
    80 LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
    81 
    82 ifeq ($(NDK_DEBUG),1)
    83     cmd-strip :=
    84 endif
    85 
    86 LOCAL_STATIC_LIBRARIES := cpufeatures
    87 
    88 include $(BUILD_SHARED_LIBRARY)
    89 
    90 ###########################
    91 #
    92 # SDL static library
    93 #
    94 ###########################
    95 
    96 LOCAL_MODULE := SDL2_static
    97 
    98 LOCAL_MODULE_FILENAME := libSDL2
    99 
   100 LOCAL_LDLIBS := 
   101 LOCAL_EXPORT_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
   102 
   103 include $(BUILD_STATIC_LIBRARY)
   104 
   105 ###########################
   106 #
   107 # SDL main static library
   108 #
   109 ###########################
   110 
   111 include $(CLEAR_VARS)
   112 
   113 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
   114 
   115 LOCAL_MODULE := SDL2_main
   116 
   117 LOCAL_MODULE_FILENAME := libSDL2main
   118 
   119 include $(BUILD_STATIC_LIBRARY)
   120 
   121 ###########################
   122 #
   123 # hidapi library
   124 #
   125 ###########################
   126 
   127 include $(CLEAR_VARS)
   128 
   129 LOCAL_CPPFLAGS += -std=c++11
   130 
   131 LOCAL_SRC_FILES := src/hidapi/android/hid.cpp
   132 
   133 LOCAL_MODULE := libhidapi
   134 LOCAL_LDLIBS := -llog
   135 
   136 include $(BUILD_SHARED_LIBRARY)
   137 
   138 $(call import-module,android/cpufeatures)
   139