summaryrefslogtreecommitdiff
path: root/Android.mk
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2014-06-15 13:01:10 -0700
committerSam Lantinga <slouken@libsdl.org>2014-06-15 13:01:10 -0700
commitc907d7eeb50b242c579740c13946ea71af5bb47f (patch)
tree55b73427208d557f81f53d1fe21fd836e85be852 /Android.mk
parentdbb4ee9942abcecbe6e107ed2fa29bd29256ef9a (diff)
downloadsdl-c907d7eeb50b242c579740c13946ea71af5bb47f.tar.gz
Fixed Android error on static lib build, if relative NDK_MODULE_PATH used
Stefan P?schel if the variable NDK_MODULE_PATH is set to a relative path (like "../"), compiling of a static SDL lib fails with an error similar to this: make: *** No rule to make target `..//android_libs/SDL/..//android_libs/SDL/src/main/android/SDL_android_main.c', needed by `obj/local/armeabi/objs/SDL2_static/__//android_libs/SDL/src/main/android/SDL_android_main.o'. Stop. Regarding the shared lib, this is already prevented by a "subst" command in the /Android.mk, which removes all occurences of "$(LOCAL_PATH)/". The attached patch does the same with the additional "SDL_android_main.c", which is included for build the static SDL lib.
Diffstat (limited to 'Android.mk')
-rwxr-xr-xAndroid.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/Android.mk b/Android.mk
index 4f9408204..7541443c9 100755
--- a/Android.mk
+++ b/Android.mk
@@ -61,7 +61,7 @@ LOCAL_MODULE := SDL2_static
LOCAL_MODULE_FILENAME := libSDL2
-LOCAL_SRC_FILES += $(LOCAL_PATH)/src/main/android/SDL_android_main.c
+LOCAL_SRC_FILES += $(subst $(LOCAL_PATH)/,,$(LOCAL_PATH)/src/main/android/SDL_android_main.c)
LOCAL_LDLIBS :=
LOCAL_EXPORT_LDLIBS := -Wl,--undefined=Java_org_libsdl_app_SDLActivity_nativeInit -ldl -lGLESv1_CM -lGLESv2 -llog -landroid