build: introduce default HOST_MAKE_VARS for host-builds
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Mon, 9 Jan 2017 12:59:02 +0000 (14:59 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 17 Jan 2017 08:18:45 +0000 (09:18 +0100)
Inspired/adapted from `package-defaults.mk` MAKE_VARS.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
include/host-build.mk

index 5cfbdeba5138c4362f82b7ae86b910a1f41f082a..c54ee3755cfa6cb547694ad4f44a265e08440b38 100644 (file)
@@ -67,6 +67,11 @@ HOST_CONFIGURE_ARGS = \
        --localstatedir=$(HOST_BUILD_PREFIX)/var \
        --sbindir=$(HOST_BUILD_PREFIX)/bin
 
+HOST_MAKE_VARS = \
+       CFLAGS="$(HOST_CFLAGS)" \
+       CXXFLAGS="$(HOST_CPPFLAGS)" \
+       LDFLAGS="$(HOST_LDFLAGS)"
+
 HOST_MAKE_FLAGS =
 
 HOST_CONFIGURE_CMD = $(BASH) ./configure
@@ -89,7 +94,8 @@ define Host/Configure
 endef
 
 define Host/Compile/Default
-       +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
+       +$(HOST_MAKE_VARS) \
+       $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
                $(HOST_MAKE_FLAGS) \
                $(1)
 endef