I'm having some trouble with porting the ttf library to android.
I installed the source/header/android.mk file in it's own SDL2_ttf folder in jni (sdl2/androidprojects/jni/sdl2_ttf). So glfont.c , sdl_ttf.c, sdl_ttf.h,showfont.c , and ft2build.h inside sdl2_ttf. Then inside the sdl2_ttf directory I added the freetype folder with the config , internal , and src folders .
I added the src folder to the freetype folder , as I think that was needed. it was first in the external folder?
i changed the jni/src/android.mk to include the local paths:
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include $(LOCAL_PATH)/../SDL2_image $(LOCAL_PATH)/$(SDL_PATH)/include $(LOCAL_PATH)/../SDL2_mixer $(LOCAL_PATH)/$(SDL_PATH)/include $(LOCAL_PATH)/../SDL2_ttf
and local shared libraries:
LOCAL_SHARED_LIBRARIES := SDL2 SDL2_image SDL2_mixer SDL2_ttf
I also updated the android.mk file in jni/sdl2_ttf :
FREETYPE_LIBRARY_PATH := ../freetype
But I get this error when running ndk-build:
no rule to make target /src/autofit/autofit.c , needed by obj/local/armeabi/objs/SDl2_ttf //src/autofit/autofit.o stop.
autofit.c is in the sdl2/androidprojects/jni/sdl2_ttf/freetype/src/autofit folder
I don't think I added an extra slash , how could something like that happen?
When I do this it's usually caused by trying to build a path using macros - something like ${FOO}/bar.txt
but ${FOO} ends with a trailing slash by mistake, or is empty.
As it is right now make is looking for autofit.c in /src/autofit/ -- this is an absolute path.
There is a similar problem in the error message you reported: //src/autofit/autofit.o