Any possibility to get environment variable value inside Android.mk?
For example
#export MYBASEDIR=/home/whoami/base
And, inside Android.mk How to get MYBASEDIR value ?
Bear with me for very basic question.
you can simply refer to it by name in the makefile ( make imports all the environment variables you have set): DEMOPATH = ${demoPath} # Or $(demoPath) if you prefer.
Android Studio configuration environment variables. The Android Studio configuration variables contain settings that customize the location of configuration files and the JDK. On start-up, Android Studio checks these variables for settings. For more information, see Configure Android Studio.
The Android.mk file resides in a subdirectory of your project's jni/ directory, and describes your sources and shared libraries to the build system. It is really a tiny GNU makefile fragment that the build system parses once or more.
All environment variables are imported by make as make macros automatically.
So, just use $(MYBASEDIR)
in the makefile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With