view src/build-msvctools/lt-postproc @ 3061:f8299bb6c872

Initial support for native MSVC compilation. * add MSVC support files: compiler wrappers and support libraries * adapt libiconv to work with MSVC * adapt gettext to work with MSVC
author Michael Goffioul <michael.goffioul@gmail.com>
date Mon, 17 Jun 2013 22:43:11 -0400
parents
children 433d1bb3cafb
line wrap: on
line source

#!/bin/bash

prefix=
suffix=

while getopts ":p:s:" opt; do
	case $opt in
		s) suffix="$OPTARG" ;;
		p) prefix="$OPTARG" ;;
	esac
done
shift $((OPTIND-1))

if [ "$1" = "" ]; then
	libtool_files=`find . -name libtool`
else
	libtool_files="$@"
fi

for ltfile in $libtool_files; do
	sed -i \
		-e "s/^soname_spec=\"\\(.*\\)\\\${shared_ext}\"/soname_spec=\"$prefix\\1$suffix\\\${shared_ext}\"/" \
		-e "s/\.dll\.lib/\.lib/" \
		-e "s/^\(deplibs_check_method\)=.*/\1=\"pass_all\"/" \
		-e "s/-link\\>//" \
		$ltfile
done