You can do this in Android.mk file:
ifeq ($(TARGET_ARCH),arm)
LOCAL_CFLAGS := -mfpu=neon -march=armv6t2 -O9
LOCAL_SRC_FILES := engine-arm.s
endif
ifeq ($(TARGET_ARCH),x86)
LOCAL_CFLAGS := -msse2 -m32 -masm=intel
LOCAL_SRC_FILES := engine-x86.s
endif
For more information I would recommend reading docs/ANDROID-MK.html
file in NDK distribution.
Btw, to use NEON in ARM assembly file you just need to add .neon
extension (engine-arm.s.neon) to file in Android.mk (not on the disk),
no need to mess with CFLAGS.
And for x86 target ndk-build by default uses "-march=i686 -msse3
-mstackrealign -mfpmath=sse". So no need to put "-msse2" for CFLAGS.
--
Martins Mozeiko
> --
> You received this message because you are subscribed to the Google Groups "android-ndk" group.
> To post to this group, send email to
andro...@googlegroups.com.
> To unsubscribe from this group, send email to
android-ndk...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/android-ndk?hl=en.
>
--
Mārtiņš Možeiko