Move configuration from Config.h to libbcc-config.mk

In order to avoid the excessive use of $(shell) in Android.mk,
this commit moves the configuration options to libbcc-config.mk,
automatically generate ConfigFromMk.h by calling
tools/gen-config-from-mk.

Change-Id: Ib5e9771dc9808f7bef2fa8da4db8e25c2a170c34
diff --git a/libbcc-gen-config-from-mk.mk b/libbcc-gen-config-from-mk.mk
new file mode 100644
index 0000000..bb654af
--- /dev/null
+++ b/libbcc-gen-config-from-mk.mk
@@ -0,0 +1,13 @@
+# Build Rules for Extracting Configuration from Android.mk
+intermediates := $(local-intermediates-dir)
+
+GEN := $(intermediates)/ConfigFromMk.h
+
+$(GEN): PRIVATE_PATH := $(LIBBCC_ROOT_PATH)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_PATH)/tools/gen-config-from-mk.py < $< > $@
+$(GEN): $(LIBBCC_ROOT_PATH)/libbcc-config.mk \
+        $(LIBBCC_ROOT_PATH)/tools/gen-config-from-mk.py
+	$(transform-generated-source)
+
+LOCAL_GENERATED_SOURCES += $(GEN)