Android.mk - How to assemble and link ARM assembler files

I have the * .cpp source files and some * .s ARM assembler files that I want to assemble and link in my Android.mk file (by running ndk-build script).

My Android.mk file looks like this:

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_MODULE    := libTestJNI
LOCAL_SRC_FILES := Test.cpp TestAS_gas4.s 
LOCAL_CFLAGS := -DHAVE_CONFIG_H -DFPM_ARM -ffast-math -O3 -DOPT_ARM
LOCAL_LDLIBS    += -llog
include $(BUILD_SHARED_LIBRARY)

Unfortunately, the * .s file is not recognized. ndk-build says:

Gdbserver      : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup       : libs/armeabi/gdb.setup
make: *** No rule to make target `/cygdrive/c/projects/TestAS_gas4.s', needed by `/cygdrive/c/projects/obj/local/armeabi/objs-debug/libTestJNI/TestAS_gas4.o'.  Stop.

In the “normal” makefile, I will need to build using the “how” in the rule. How is this done in Android.mk files?

/ Kim

+5
source share
2 answers

This is confusing, but the problem is that the * .s files located in the subfolder. The error "No rule to make target" is a very poor description of the error in this case.

/ Kim

+5
source

: :

ln -fs %.s %.S.arm
0

All Articles