Search code examples
androidmakefileandroid-ndkmultiple-makefiles

A different make file for each architecture - Android NDK


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?


Solution

  • 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