Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

extra info in android makefiles

I'm trying to get some information about my Android Makefile, but echo doesn't work for printting messages.

Is there any way of printting a variable?

like image 457
mram888 Avatar asked Dec 15 '25 17:12

mram888


2 Answers

I always forget how to do this kind of things.

Try this:

$(warning LOCAL_PATH is '$(LOCAL_PATH)')

I always use some comment in my makefiles on top:

# include $(CLEAR_VARS) change PATH! If you use it, before save PATH
# Extra info using ndk-build V=1
# Debug info using ndk-build -d
# Echo variables $(warning LOCAL_PATH is '$(LOCAL_PATH)')
# SRC_FILES := $(wildcard $(LOCAL_PATH)/../../Android/jni/*.cpp)
# Execute ndk-build NDK_LOG=1 to extra info before compilation
like image 56
vgonisanz Avatar answered Dec 17 '25 15:12

vgonisanz


If a goal is DUMP_xxx then ndk-build dumps a variable xxx instead of building anything, e.g.

ndk-build APP_ABI=mips DUMP_LOCAL_CFLAGS

This will print the variable $(LOCAL_CFLAGS) and stop.

like image 23
Alex Cohn Avatar answered Dec 17 '25 15:12

Alex Cohn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!