I have written an Android app. It uses a main C-code module and a linked-in C-code module. Now I want to replace the linked-in module with an ARM assembler module. Anyone have a simple example?
See Question&Answers more detail:osI have written an Android app. It uses a main C-code module and a linked-in C-code module. Now I want to replace the linked-in module with an ARM assembler module. Anyone have a simple example?
See Question&Answers more detail:osHere's an example of Android.mk file that will build sourcetree containing assembly. To see a complete example check the hello-neon sample distributed in the NDK package.
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm # remove this if you want thumb mode
LOCAL_ARM_NEON := true # remove this if you want armv5 mode
LOCAL_CFLAGS := -std=c99 -pedantic -v
LOCAL_SRC_FILES := # list your C, C++ and assembly sources here.
# assembly source files ends with extension .S
# add .arm after the extension if you want to compile in armv5 mode (default is thumb)
# add .arm.neon to compile in armv7 mode
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_LDLIBS := -llog
LOCAL_MODULE := #the name of your shared library
include $(BUILD_SHARED_LIBRARY)