diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2011-07-31 15:33:47 +0200 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2011-07-31 15:33:47 +0200 |
commit | d754268d00d4a73229fee57a797b83df9287f21c (patch) | |
tree | 6a3df4b58eff3118edc95c01112b045cc356b608 /mk/macros.mk | |
parent | f7bdb3d8ebdb2232655f0e8c7dfdfeb52be19969 (diff) | |
download | embtoolkit-d754268d00d4a73229fee57a797b83df9287f21c.tar.gz embtoolkit-d754268d00d4a73229fee57a797b83df9287f21c.tar.bz2 embtoolkit-d754268d00d4a73229fee57a797b83df9287f21c.tar.xz |
Packages: generic macros: allow host packages to set rpath if needed
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk/macros.mk')
-rw-r--r-- | mk/macros.mk | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mk/macros.mk b/mk/macros.mk index e4c8979..1da10d1 100644 --- a/mk/macros.mk +++ b/mk/macros.mk @@ -238,6 +238,7 @@ __embtk_pkg_libexecs = $(strip $($(PKGV)_LIBEXECS)) __embtk_pkg_pkgconfigs = $(strip $($(PKGV)_PKGCONFIGS)) __embtk_pkg_configureenv = $(strip $($(PKGV)_CONFIGURE_ENV)) +__embtk_pkg_setrpath = $(strip $($(PKGV)_SET_RPATH)) __embtk_pkg_configureopts = $(strip $($(PKGV)_CONFIGURE_OPTS)) __embtk_pkg_sysrootsuffix = $(strip $($(PKGV)_SYSROOT_SUFFIX)) __embtk_pkg_prefix = $(strip $($(PKGV)_PREFIX)) @@ -355,6 +356,9 @@ endef # Usage: # $(call embtk_configure_hostpkg,PACKAGE) # +__embtk_hostpkg_rpathldflags="-Wl,-rpath,$(HOSTTOOLS)/usr/lib" +__embtk_hostpkg_rpath=$(strip $(if $(__embtk_pkg_setrpath), \ + $(__embtk_hostpkg_rpathldflags))) define embtk_configure_hostpkg $(call embtk_generic_msg,"Configure $(__embtk_pkg_package) for host...") $(call __embtk_configure_autoreconfpkg,$(1)) @@ -362,7 +366,7 @@ define embtk_configure_hostpkg $(call __embtk_print_configure_opts,"$(__embtk_pkg_configureopts)") $(Q)cd $(__embtk_pkg_builddir); \ CPPFLAGS="-I$(HOSTTOOLS)/usr/include" \ - LDFLAGS="-L$(HOSTTOOLS)/usr/lib -Wl,-rpath,$(HOSTTOOLS)/usr/lib" \ + LDFLAGS="-L$(HOSTTOOLS)/usr/lib $(__embtk_hostpkg_rpath)" \ PKG_CONFIG="$(PKGCONFIG_BIN)" \ PKG_CONFIG_PATH="$(EMBTK_HOST_PKG_CONFIG_PATH)" \ $(if $(call __embtk_mk_strcmp,$(PKGV),CCACHE),,CC=$(HOSTCC_CACHED)) \ @@ -510,7 +514,7 @@ fi endef define embtk_download_pkg $(call embtk_generic_msg,"Download $(__embtk_pkg_package) if necessary...") - $(Q)test -e $(strip $(DOWNLOAD_DIR))/$(__embtk_pkg_package) || \ + $(Q)test -e $(strip $(DOWNLOAD_DIR))/$(__embtk_pkg_package) || \ $(call embtk_wget, \ $(__embtk_pkg_package), \ $(__embtk_pkg_site), \ |