summaryrefslogtreecommitdiff
path: root/mk/macros.packages.mk
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-03-03 14:19:04 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-03-03 14:19:04 +0100
commitf69e66d2f246b35ff486d09079a47a411157c372 (patch)
tree54391feb0b7e2d976a5fa4551178b578886f9fd4 /mk/macros.packages.mk
parent0a0d037734ec58c9b361e6485526dbe781ad77ce (diff)
downloadembtoolkit-f69e66d2f246b35ff486d09079a47a411157c372.tar.gz
embtoolkit-f69e66d2f246b35ff486d09079a47a411157c372.tar.bz2
embtoolkit-f69e66d2f246b35ff486d09079a47a411157c372.tar.xz
Build system: embtk_configure_pkg: give ability to specify cflags, cxxflags and cppflags
{pkg} needing to define cflags, cxxflags and cppflags must define {PKG}_CFLAGS, {PKG}_CFLAGS and {PKG}_CPPFLAGS, where {PKG} is the uppder case of its package name. Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk/macros.packages.mk')
-rw-r--r--mk/macros.packages.mk10
1 files changed, 7 insertions, 3 deletions
diff --git a/mk/macros.packages.mk b/mk/macros.packages.mk
index 5d1108b..6131065 100644
--- a/mk/macros.packages.mk
+++ b/mk/macros.packages.mk
@@ -174,6 +174,9 @@ __embtk_pkg_deps = $(strip $($(PKGV)_DEPS))
__embtk_pkg_depspkgv = $(sort $(patsubst %_install,%,$(__embtk_pkg_deps)))
___embtk_pkg_kconfigsname = $(strip $(or $($(PKGV)_KCONFIGS_NAME),$(PKGV)))
__embtk_pkg_kconfigsname = $(patsubst %_HOST,%,$(___embtk_pkg_kconfigsname))
+__embtk_pkg_cflags = $(strip $($(PKGV)_CFLAGS))
+__embtk_pkg_cppflags = $(strip $($(PKGV)_CPPFLAGS))
+__embtk_pkg_cxxflags = $(strip $($(PKGV)_CXXFLAGS))
__embtk_pkg_makedirs = $(strip $($(PKGV)_MAKE_DIRS))
__embtk_pkg_makeenv = $(strip $($(PKGV)_MAKE_ENV))
@@ -295,6 +298,7 @@ define __embtk_print_configure_opts
$(call embtk_echo_blue,"Configure options:$(strip $(1))") | sed "s/\(--\)/\n\t\1/g")
echo
endef
+
define embtk_configure_pkg
$(if $(EMBTK_BUILDSYS_DEBUG),
$(call embtk_pinfo,"Configure $(__embtk_pkg_package)..."))
@@ -311,10 +315,10 @@ define embtk_configure_pkg
STRIP=$(TARGETSTRIP) \
OBJDUMP=$(TARGETOBJDUMP) \
OBJCOPY=$(TARGETOBJCOPY) \
- CFLAGS="$(TARGET_CFLAGS)" \
- CXXFLAGS="$(TARGET_CXXFLAGS)" \
+ CFLAGS="$(TARGET_CFLAGS) $(__embtk_pkg_cflags)" \
+ CXXFLAGS="$(TARGET_CXXFLAGS) $(__embtk_pkg_cxxflags)" \
LDFLAGS="-L$(embtk_sysroot)/$(LIBDIR) -L$(embtk_sysroot)/usr/$(LIBDIR)" \
- CPPFLAGS="-I$(embtk_sysroot)/usr/include" \
+ CPPFLAGS="-I$(embtk_sysroot)/usr/include $(__embtk_pkg_cppflags)" \
PKG_CONFIG="$(PKGCONFIG_BIN)" \
PKG_CONFIG_PATH="$(EMBTK_PKG_CONFIG_PATH)" \
PKG_CONFIG_LIBDIR="$(EMBTK_PKG_CONFIG_LIBDIR)" \