Move math function definitions.
Created math.mk and moved all math function definitions there.
Then, included this file in config.mk. This allows the functions to be
used by whatever includes config.mk (envsetup and build).
Test: manually setting combinations of PRODUCT_SHIPPING_API_LEVEL
and PRODUCT_FULL_TREBLE_OVERRIDE and looking at values of
PRODUCT_FULL_TREBLE.
Bug: 62229856
Change-Id: Icdab4214a1e65ae202411613dbcb9c9ea5f43b09
diff --git a/core/config.mk b/core/config.mk
index 83e53f1..648277c 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -79,6 +79,10 @@
# Some specific paths to tools
SRC_DROIDDOC_DIR := $(TOPDIR)build/tools/droiddoc
+# Set up efficient math functions which are used in make.
+# Here since this file is included by envsetup as well as during build.
+include $(BUILD_SYSTEM)/math.mk
+
# Various mappings to avoid hard-coding paths all over the place
include $(BUILD_SYSTEM)/pathmap.mk