diff options
author | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-12-23 23:41:41 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-12-23 23:41:41 +0100 |
commit | f76946b0605263f11c30d95e10cfd08c66303ca1 (patch) | |
tree | 23ae3b36eda37c10510b3beb9f704f9ad4ff63c0 /mk | |
parent | 838189c4b6915d637a659390244f2dea407068b3 (diff) | |
download | embtoolkit-f76946b0605263f11c30d95e10cfd08c66303ca1.tar.gz embtoolkit-f76946b0605263f11c30d95e10cfd08c66303ca1.tar.bz2 embtoolkit-f76946b0605263f11c30d95e10cfd08c66303ca1.tar.xz |
EMBTK: add macros to adapt/restore libtool files for cross compiling
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
Diffstat (limited to 'mk')
-rw-r--r-- | mk/macros.mk | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mk/macros.mk b/mk/macros.mk index e56befe..6b18748 100644 --- a/mk/macros.mk +++ b/mk/macros.mk @@ -93,3 +93,43 @@ endif @echo @echo "#########################################################################################" +#Macro to adapt libtool files (*.la) for cross compiling +libtool_files_adapt: +ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) + $(Q)LIBTOOLS_LA_FILES=`find $(SYSROOT)/usr/lib32 -name *.la`; \ + for i in $$LIBTOOLS_LA_FILES; \ + do \ + sed -e "s;libdir='\/usr\/lib32';libdir='$(SYSROOT)\/usr\/lib32';" $$i \ + > $$i.new; \ + mv $$i.new $$i; \ + done +else + $(Q)LIBTOOLS_LA_FILES=`find $(SYSROOT)/usr/lib -name *.la`; \ + for i in $$LIBTOOLS_LA_FILES; \ + do \ + sed -e "s;libdir='\/usr\/lib';libdir='$(SYSROOT)\/usr\/lib';" < $$i \ + > $$i.new; \ + mv $$i.new $$i; \ + done +endif + +#Macro to restore libtool files (*.la) +libtool_files_restore: +ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) + $(Q)LIBTOOLS_LA_FILES=`find $(SYSROOT)/usr/lib32 -name *.la`; \ + for i in $$LIBTOOLS_LA_FILES; \ + do \ + sed -e "s;libdir='$(SYSROOT)\/usr\/lib32';libdir='\/usr\/lib32';" $$i \ + > $$i.new; \ + mv $$i.new $$i; \ + done +else + $(Q)LIBTOOLS_LA_FILES=`find $(SYSROOT)/usr/lib -name *.la`; \ + for i in $$LIBTOOLS_LA_FILES; \ + do \ + sed -e "s;libdir='$(SYSROOT)\/usr\/lib';libdir='\/usr\/lib';" < $$i \ + > $$i.new; \ + mv $$i.new $$i; \ + done +endif + |