Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print a var using echo o print in a NDK-build Android.mk file to debug compilation?

I'm trying to print some extra info when in compile a library using ndk-build.

For example:

LOCAL_PATH := $(call my-dir) all:;echo $(LOCAL_PATH) echo: $(LOCAL_PATH) print:echo "i'm not working" 

When i do ndk-build, just compile all the Android.mk, but i don't get the console echo. I have readed the GNU make info (ndk-build is just a tiny GNU make), and some post whom said echo must work using a $(VAR) but it's not working on my case.

Some idea?

like image 377
vgonisanz Avatar asked Feb 29 '12 12:02

vgonisanz


People also ask

What is LOCAL_ cflags?

LOCAL_CFLAGS is applied to the current module, and is undefined after an include $(CLEAR_VARS) . APP_CFLAGS is applied to all modules.

What is .MK file in Android?

Overview. 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.


1 Answers

Use

LOCAL_PATH := $(call my-dir) $(warning $(LOCAL_PATH)) 
like image 161
Andrey Kamaev Avatar answered Sep 20 '22 10:09

Andrey Kamaev