Add getprop to toolbox
Add a non-toybox version of getprop, so that we can interface with the
new C++ PropertyInfoAreaFile class to return property context
information.
Bug: 36001741
Test: Compared toolbox getprop results with toybox getprop
Change-Id: I5f98f9e895d0620a2d9686bc0608490e7d9c3120
diff --git a/toolbox/Android.mk b/toolbox/Android.mk
index c4795a7..d1b6114 100644
--- a/toolbox/Android.mk
+++ b/toolbox/Android.mk
@@ -13,18 +13,26 @@
getevent \
newfs_msdos \
-ALL_TOOLS = $(BSD_TOOLS) $(OUR_TOOLS)
+OUR_CPP_TOOLS := \
+ getprop \
+
+ALL_TOOLS = $(BSD_TOOLS) $(OUR_TOOLS) $(OUR_CPP_TOOLS)
LOCAL_SRC_FILES := \
toolbox.c \
$(patsubst %,%.c,$(OUR_TOOLS)) \
+ $(patsubst %,%.cpp,$(OUR_CPP_TOOLS)) \
LOCAL_CFLAGS += $(common_cflags)
+LOCAL_CPPFLAGS += -std=gnu++1z
LOCAL_C_INCLUDES += $(LOCAL_PATH)/upstream-netbsd/include/
LOCAL_SHARED_LIBRARIES := \
+ libbase \
libcutils \
+LOCAL_STATIC_LIBRARIES := libpropertyinfoparser
+
LOCAL_WHOLE_STATIC_LIBRARIES := $(patsubst %,libtoolbox_%,$(BSD_TOOLS))
LOCAL_MODULE := toolbox