A different make file for each architecture - Android NDK

379 Views Asked by At

I'm targeting more than 1 architecture with my c/c++ code compiled with the NDK, the problem is that i need to have a clear organization about my make files, i also have to set the same environment variable differently based on what architecture NDK is targeting when compiling.

How can i have different makefiles for each architecture?

1

There are 1 best solutions below

0
On BEST ANSWER

You don't need different makefiles.

in Application.mk use:

APP_ABI := all

Then for example use

if eq($(TARGET_ARCH_ABI), armeabi)

<<insert your definitions here>>

endif