diff options
author | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-12-24 13:05:19 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-12-24 13:05:19 +0100 |
commit | 74a8a0fdee64b083e2b69d4114235c19a6ab1b0b (patch) | |
tree | 8c2ad55a3ba68024d848e527f9fc55d6dc0206ad /mk | |
parent | 0a60c205492cd95e08a70ae552bf087d9ccad47e (diff) | |
download | embtoolkit-74a8a0fdee64b083e2b69d4114235c19a6ab1b0b.tar.gz embtoolkit-74a8a0fdee64b083e2b69d4114235c19a6ab1b0b.tar.bz2 embtoolkit-74a8a0fdee64b083e2b69d4114235c19a6ab1b0b.tar.xz |
EMBTK: add a macro to adapt pkgconfig files for cross compile
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
Diffstat (limited to 'mk')
-rw-r--r-- | mk/macros.mk | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/mk/macros.mk b/mk/macros.mk index 6b18748..c8ce252 100644 --- a/mk/macros.mk +++ b/mk/macros.mk @@ -1,4 +1,4 @@ -######################################################################################### +################################################################################ # GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> # Copyright(C) 2009 GAYE Abdoulaye Walsimou. All rights reserved. # @@ -14,13 +14,13 @@ # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. -######################################################################################### +################################################################################ # # \file macros.mk # \brief macros.mk of Embtoolkit # \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> # \date May 2009 -######################################################################################### +################################################################################ #Decompress message #unsage $(call DECOMPRESS_MESSAGE,$(NAME_PACKAGE)) @@ -133,3 +133,24 @@ else done endif +#Macro to adapt pkg-config files for cross compiling +pkgconfig_files_adapt: +ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) + $(Q)PKGCONF_FILES=`find $(SYSROOT)/usr/lib32/pkgconfig -name *.pc`; \ + for i in $$PKGCONF_FILES; \ + do \ + sed -e 's;prefix=/usr;prefix=$(SYSROOT)/usr;' \ + -e 's;includedir=$${prefix}/include;includedir=$(SYSROOT)/usr/include;' \ + < $$i > $$i.new; \ + mv $$i.new $$i; \ + done +else + $(Q)PKGCONF_FILES=`find $(SYSROOT)/usr/lib/pkgconfig -name *.pc`; \ + for i in $$PKGCONF_FILES; \ + do \ + sed -e 's;prefix=/usr;prefix=$(SYSROOT)/usr;' \ + -e 's;includedir=$${prefix}/include;includedir=$(SYSROOT)/usr/include;' \ + < $$i > $$i.new; \ + mv $$i.new $$i; \ + done +endif |