I have some *.cpp source files and some *.s ARM assembler files 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 a "normal" makefile I would have to assemble by using "as" in a rule. How is it done in the Android.mk files?
/Kim
This is embarrasing but the problem was that the *.s files where located in a subfolder. The "No rule to make target" error is a very poor error description in this case.
/Kim
提示:更改后缀:
ln -fs %.s %.S.arm
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.