Static libraries: "No rule to make target"

Put problems with the Android NDK in this forum.

Static libraries: "No rule to make target"

Postby paulscode » Thu Jan 27, 2011 2:32 am

I am trying to compile a project I cloned from a git repository (https://github.com/Cpasjuste/droid64), which others have cloned and built without problem. But I can't seem to get it to work though. The main Android.mk creates an executable, and it is supposed to create three static libraries.

When I run "ndk-build", I get errors like this for the static libraries:
Code: Select all
make: *** No rule to make target `/home/paul/workspace/droid64/obj/local/armeabi-v7a/libandroid_video.a', needed by `/home/paul/workspace/droid64/obj/local/armeabi-v7a/mupen64plus'.  Stop.


My main Android.mk file, located in "/home/paul/workspace/droid64/jni/" looks like this:
Code: Select all
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_ARM_MODE := arm
TARGET_ARCH_ABI := armeabi-v7a
LOCAL_MODULE    := mupen64plus
LOCAL_CFLAGS   := -D__LINUX__ -DNEW_DYNAREC -DDYNAREC -D__arm__ -g -O3 -D__ANDROID__ -DNO_GUI=1 -pipe -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing -mfpu=vfp -mfloat-abi=softfp
LOCAL_LDFLAGS    := --arm_linux --gnu -Xlinker --section-start -Xlinker .init=0x08000000
LOCAL_LDLIBS    := -lz -lm -ldl
LOCAL_C_INCLUDES := $(LOCAL_PATH)/main $(LOCAL_PATH)/SDL/include $(LOCAL_PATH)/libpng
LOCAL_STATIC_LIBRARIES := android_video android_rsp sdl

LOCAL_SRC_FILES := main/main.c \
   main/romcache.c \
#(several others)
   android/plugin.c

include $(BUILD_EXECUTABLE)

$(call import-module,SDL)
$(call import-module,dummy_audio)
$(call import-module,android_video)
$(call import-module,dummy_input)
$(call import-module,android_rsp)

And Application.mk (same directory) looks like this:
Code: Select all
APP_PLATFORM := android-8
APP_ABI := armeabi-v7a
NDK_MODULE_PATH := /home/paul/workspace/droid64/jni/


The source code for the static libraries is in directories under "/home/paul/workspace/droid64/jni/". For example, android_video has an Android.mk file in /home/paul/workspace/droid64/jni/android_video, which looks like this:
Code: Select all
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
TARGET_ARCH_ABI := armeabi-v7a
LOCAL_MODULE := android_video
LOCAL_CFLAGS   := -D__LINUX__ -DNEW_DYNAREC -DDYNAREC -D__arm__ -g -O3 -D__ANDROID__ -DNO_GUI=1 -pipe -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing -mfpu=vfp -mfloat-abi=softfp
LOCAL_C_INCLUDES := $(LOCAL_PATH)../
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)../
LOCAL_EXPORT_CFLAGS := -D__LINUX__

LOCAL_SRC_FILES := video.c
      
include $(BUILD_STATIC_LIBRARY)


Any reason why I would be getting the "no rule to make target" message? Sorry if this is something obvious, I am still new to using the NDK.
paulscode
Experienced Developer
Experienced Developer
 
Posts: 79
Joined: Thu Nov 11, 2010 3:57 pm

Top

Re: Static libraries: "No rule to make target"

Postby paulscode » Sat Jan 29, 2011 2:32 am

I solved the problem by reinstalling the NDK.
paulscode
Experienced Developer
Experienced Developer
 
Posts: 79
Joined: Thu Nov 11, 2010 3:57 pm

Top

Return to NDK Problems

Who is online

Users browsing this forum: No registered users and 2 guests