Android Studio, a project with an NDK library, using ndkBuild with Android.mk. My build uses a static library dependency, and the static library exists as a debug and as a release flavor, in separate directories. The makefile goes:
#Ref to libfoo
include $(CLEAR_VARS)
LOCAL_MODULE := foo
LOCAL_SRC_FILES := $(FOOPROJECT)\foo\build\intermediates\ndkBuild\debug\obj\local\$(TARGET_ARCH_ABI)\libfoo.a
include $(PREBUILT_STATIC_LIBRARY)
LOCAL_SRC_FILES
has the debug
flavor hard-coded as a part of the path. Not good. I'd like to use either "debug" or "release" there, depending on the current build type.
Is the current build type available in the makefile as a variable? If not, is is possible to pass it to ndk-build via the gradle file?