mram888
mram888

Reputation: 5139

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?

Upvotes: 3

Views: 1105

Answers (3)

vishalm
vishalm

Reputation: 477

$(info $(LOCAL_PATH)) is more generic

Upvotes: 0

Alex Cohn
Alex Cohn

Reputation: 57173

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.

Upvotes: 1

vgonisanz
vgonisanz

Reputation: 11930

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

Upvotes: 3

Related Questions