Android.mk
author David Ludwig <dludwig@pobox.com>
Sat, 20 Aug 2016 13:46:45 -0400
changeset 10277 29d7289e9055
parent 9592 ba866f4ec675
permissions -rwxr-xr-x
WinRT: fixed bug where Win10 GameBar, when shown + hidden, might not restore a cursor's hidden state The repro steps were this: 1. run an sdl2 winrt/uwp app, on Win10, v10.0.10586.0 or higher 2. hide the cursor, via a call to SDL_ShowCursor(0) 3. make the Win10 game bar appear, by pressing the Windows + G hotkey 4. observe that the mouse cursor appears, in order to interact with the game bar (this is expected behavior) 5. make the Win10 game bar disappear, either by pressing the Windows + G hotkey again, or clicking somewhere in the app EXPECTED RESULT: cursor disappears, as game bar disappears ACTUAL RESULT: cursor didn't always disappear
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4964
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     1
LOCAL_PATH := $(call my-dir)
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     2
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     3
###########################
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     4
#
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     5
# SDL shared library
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     6
#
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     7
###########################
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     8
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     9
include $(CLEAR_VARS)
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    10
6270
0cf2443a0b17 Updated Android Makefile for SDL2
Sam Lantinga <slouken@libsdl.org>
parents: 6208
diff changeset
    11
LOCAL_MODULE := SDL2
4964
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    12
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    13
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    14
7311
56e66417dcee Improved include paths for projects using SDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 6448
diff changeset
    15
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
56e66417dcee Improved include paths for projects using SDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 6448
diff changeset
    16
5090
327f181542f1 Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
    17
LOCAL_SRC_FILES := \
4964
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    18
	$(subst $(LOCAL_PATH)/,, \
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    19
	$(wildcard $(LOCAL_PATH)/src/*.c) \
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    20
	$(wildcard $(LOCAL_PATH)/src/audio/*.c) \
5090
327f181542f1 Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
    21
	$(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
327f181542f1 Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
    22
	$(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
5003
3a95a2b93eb3 Updated the atomic API for better use cases
Sam Lantinga <slouken@libsdl.org>
parents: 4964
diff changeset
    23
	$(LOCAL_PATH)/src/atomic/SDL_atomic.c \
3a95a2b93eb3 Updated the atomic API for better use cases
Sam Lantinga <slouken@libsdl.org>
parents: 4964
diff changeset
    24
	$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
7501
b27825bb5879 Android: Removed all unnecessary dependencies on C++.
Eric Wing <ewing . public |-at-| gmail . com>
parents: 7311
diff changeset
    25
	$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
4964
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    26
	$(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \
8097
d4e916b1c135 Add Dynamic API to Android makefile.
Ryan C. Gordon <icculus@icculus.org>
parents: 7804
diff changeset
    27
	$(wildcard $(LOCAL_PATH)/src/dynapi/*.c) \
4964
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    28
	$(wildcard $(LOCAL_PATH)/src/events/*.c) \
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    29
	$(wildcard $(LOCAL_PATH)/src/file/*.c) \
5090
327f181542f1 Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
    30
	$(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
327f181542f1 Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
    31
	$(wildcard $(LOCAL_PATH)/src/haptic/dummy/*.c) \
4964
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    32
	$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
5090
327f181542f1 Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
    33
	$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
5092
ed1d54f1290a Fixed Android build
Sam Lantinga <slouken@libsdl.org>
parents: 5090
diff changeset
    34
	$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
5090
327f181542f1 Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
    35
	$(wildcard $(LOCAL_PATH)/src/power/*.c) \
6448
64a6297a8b93 Fixed bug 1606 - SDL does not implement SDL_GetPowerInfo() for Android.
Sam Lantinga <slouken@libsdl.org>
parents: 6270
diff changeset
    36
	$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
9054
18d34edc79ac Implemented SDL_GetPrefPath() on Android - it returns the path used by SDL_AndroidGetInternalStoragePath()
Sam Lantinga <slouken@libsdl.org>
parents: 8864
diff changeset
    37
	$(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \
5161
1bd1e62e648d Fixed building for Android
Sam Lantinga <slouken@libsdl.org>
parents: 5092
diff changeset
    38
	$(wildcard $(LOCAL_PATH)/src/render/*.c) \
5204
daa5463466c5 Fixed building on Android, added SDL_opengles2.h, removed unnecessary SDL_glesfuncs.h
Sam Lantinga <slouken@libsdl.org>
parents: 5161
diff changeset
    39
	$(wildcard $(LOCAL_PATH)/src/render/*/*.c) \
4964
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    40
	$(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    41
	$(wildcard $(LOCAL_PATH)/src/thread/*.c) \
5090
327f181542f1 Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
    42
	$(wildcard $(LOCAL_PATH)/src/thread/pthread/*.c) \
4964
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    43
	$(wildcard $(LOCAL_PATH)/src/timer/*.c) \
5090
327f181542f1 Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
    44
	$(wildcard $(LOCAL_PATH)/src/timer/unix/*.c) \
4964
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    45
	$(wildcard $(LOCAL_PATH)/src/video/*.c) \
7793
6463a850229d Adds test framework to Android.mk and a simple utility to build Android projects
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7667
diff changeset
    46
	$(wildcard $(LOCAL_PATH)/src/video/android/*.c) \
9592
ba866f4ec675 Android: Replaced spaces with tab in Android.mk file.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 9054
diff changeset
    47
	$(wildcard $(LOCAL_PATH)/src/test/*.c))
4964
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    48
6208
291fea716f09 David Carre cpasjuste@gmail.com
Sam Lantinga <slouken@libsdl.org>
parents: 5204
diff changeset
    49
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
7659
ac4ce59c40e7 Fixes bug #2037, common EGL code for Android and X11
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7501
diff changeset
    50
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
4964
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    51
6c645018741e Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    52
include $(BUILD_SHARED_LIBRARY)
7804
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    53
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    54
###########################
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    55
#
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    56
# SDL static library
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    57
#
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    58
###########################
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    59
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    60
LOCAL_MODULE := SDL2_static
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    61
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    62
LOCAL_MODULE_FILENAME := libSDL2
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    63
8864
81198d739376 Fixed Android error on static lib build, if relative NDK_MODULE_PATH used
Sam Lantinga <slouken@libsdl.org>
parents: 8097
diff changeset
    64
LOCAL_SRC_FILES += $(subst $(LOCAL_PATH)/,,$(LOCAL_PATH)/src/main/android/SDL_android_main.c)
7804
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    65
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    66
LOCAL_LDLIBS := 
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    67
LOCAL_EXPORT_LDLIBS := -Wl,--undefined=Java_org_libsdl_app_SDLActivity_nativeInit -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    68
1f85fb33694b Fixed bug 2146 - Enable static linking of libSDL on Android
Sam Lantinga <slouken@libsdl.org>
parents: 7793
diff changeset
    69
include $(BUILD_STATIC_LIBRARY)