Skip to content
Browse files

Fixed Android error on static lib build, if relative NDK_MODULE_PATH …


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
needed by

Regarding the shared lib, this is already prevented by a "subst" command
in the /, 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.
  • Loading branch information
slouken committed Jun 15, 2014
1 parent ab4f1aa commit b9d1f9edd8d1fccb9bd6dcf3b229369f4dd3f708
Showing with 1 addition and 1 deletion.
  1. +1 −1
@@ -61,7 +61,7 @@ LOCAL_MODULE := SDL2_static


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_EXPORT_LDLIBS := -Wl,--undefined=Java_org_libsdl_app_SDLActivity_nativeInit -ldl -lGLESv1_CM -lGLESv2 -llog -landroid

0 comments on commit b9d1f9e

Please sign in to comment.