7

Is there any way to use conditional expressions in Android.mk? I need it to do smth like this:

IF arch = AREABI_V7
   *use path for my arm_v7 static libs*
ELSE
   *use path for arm static libs*
ortisenderos
  • 370
  • 4
  • 15
givi
  • 1,883
  • 4
  • 22
  • 32

1 Answers1

12
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
    ...
else
    ifeq($(TARGET_ARCH_ABI),armeabi)
        ...
    endif
endif
Alexander Kulyakhtin
  • 47,782
  • 38
  • 107
  • 158
  • 1
    You have missing space after second `ifeq` before the `(`. The build system errors on that. – Eugene Gr. Philippov Jul 09 '16 at 18:36
  • "The NDK docs state that Android.mk "is really a tiny GNU Makefile fragment...". Here are the docs about make conditionals: http://www.gnu.org/software/make/manual/html_node/Conditionals.html " //Taken from here https://groups.google.com/forum/#!topic/android-ndk/UCqQ1L2kisE – Eugene Gr. Philippov Jul 09 '16 at 18:37