Don't compile libaapt with the build number
Only do that for the aapt binary itself. This will allow libaapt to be
converted to Soong.
Also remove a few lines that weren't doing anything: aaptCppflags was
never set, LOCAL_C_INCLUDES := $(LOCAL_PATH) is implied.
Test: m aapt
Test: aapt version
Change-Id: Ia3bcece14921417e1bfd3406630961c013bd497c
diff --git a/tools/aapt/Android.mk b/tools/aapt/Android.mk
index 0a515db..e74a3df 100644
--- a/tools/aapt/Android.mk
+++ b/tools/aapt/Android.mk
@@ -65,8 +65,7 @@
libbase \
libz
-aaptCFlags := -DAAPT_VERSION=\"$(BUILD_NUMBER_FROM_FILE)\"
-aaptCFlags += -Wall -Werror
+aaptCFlags := -Wall -Werror
# ==========================================================
# Build the host static library: libaapt
@@ -76,7 +75,6 @@
LOCAL_MODULE := libaapt
LOCAL_MODULE_HOST_OS := darwin linux windows
LOCAL_CFLAGS := -Wno-format-y2k -DSTATIC_ANDROIDFW_FOR_TOOLS $(aaptCFlags)
-LOCAL_CPPFLAGS := $(aaptCppFlags)
LOCAL_CFLAGS_darwin := -D_DARWIN_UNLIMITED_STREAMS
LOCAL_SRC_FILES := $(aaptSources)
LOCAL_STATIC_LIBRARIES := $(aaptHostStaticLibs)
@@ -90,8 +88,7 @@
LOCAL_MODULE := aapt
LOCAL_MODULE_HOST_OS := darwin linux windows
-LOCAL_CFLAGS := $(aaptCFlags)
-LOCAL_CPPFLAGS := $(aaptCppFlags)
+LOCAL_CFLAGS := -DAAPT_VERSION=\"$(BUILD_NUMBER_FROM_FILE)\" $(aaptCFlags)
LOCAL_SRC_FILES := $(aaptMain)
LOCAL_STATIC_LIBRARIES := libaapt $(aaptHostStaticLibs)
@@ -105,9 +102,7 @@
LOCAL_MODULE := libaapt_tests
LOCAL_CFLAGS := $(aaptCFlags)
-LOCAL_CPPFLAGS := $(aaptCppFlags)
LOCAL_SRC_FILES := $(aaptTests)
-LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_STATIC_LIBRARIES := libaapt $(aaptHostStaticLibs)
include $(BUILD_HOST_NATIVE_TEST)