diff --git a/Makefile.am b/Makefile.am index d01bd9cf4..31ad96559 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,12 +9,18 @@ SUBDIRS = src util test docs EXTRA_DIST = \ autogen.sh \ harfbuzz.doap \ - README.python.md \ + README.md \ README.mingw.md \ + README.python.md \ BUILD.md \ RELEASING.md \ + TESTING.md \ CMakeLists.txt \ replace-enum-strings.cmake \ + mingw-configure.sh \ + mingw-ldd.py \ + mingw32.sh \ + mingw64.sh \ $(NULL) MAINTAINERCLEANFILES = \ diff --git a/mingw-configure.sh b/mingw-configure.sh new file mode 100755 index 000000000..0c3ec3489 --- /dev/null +++ b/mingw-configure.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +case $1 in + i686 | x86_64) ;; + *) echo "Usage: $0 i686|x86_64" >&2; exit 1 ;; +esac + +target=$1-w64-mingw32 +shift + +unset CC +unset CXX +unset CPP +unset LD +unset LDFLAGS +unset CFLAGS +unset CXXFLAGS +unset PKG_CONFIG_PATH + +# Removed -static from the following +export CFLAGS="-static-libgcc" +export CXXFLAGS="-static-libgcc -static-libstdc++" +export CPPFLAGS="-I$HOME/.local/$target/include" +export LDFLAGS=-L$HOME/.local/$target/lib +export PKG_CONFIG_LIBDIR=$HOME/.local/$target/lib/pkgconfig:/usr/$target/sys-root/mingw/lib/pkgconfig/ +export PKG_CONFIG_PATH=$HOME/.local/$target/share/pkgconfig:/usr/$target/sys-root/mingw/share/pkgconfig/ +export PATH=$HOME/.local/$target/bin:/usr/$target/sys-root/mingw/bin:/usr/$target/bin:$PATH + +../configure --build=`../config.guess` --host=$target --prefix=$HOME/.local/$target --with-uniscribe --without-icu "$@" diff --git a/mingw32.sh b/mingw32.sh index 27c8d8ae3..b673678cd 100755 --- a/mingw32.sh +++ b/mingw32.sh @@ -1,23 +1,2 @@ -#!/bin/bash - -target=i686-w64-mingw32 - -unset CC -unset CXX -unset CPP -unset LD -unset LDFLAGS -unset CFLAGS -unset CXXFLAGS -unset PKG_CONFIG_PATH - -# Removed -static from the following -export CFLAGS="-static-libgcc" -export CXXFLAGS="-static-libgcc -static-libstdc++" -export CPPFLAGS="-I$HOME/.local/$target/include" -export LDFLAGS=-L$HOME/.local/$target/lib -export PKG_CONFIG_LIBDIR=$HOME/.local/$target/lib/pkgconfig:/usr/$target/sys-root/mingw/lib/pkgconfig/ -export PKG_CONFIG_PATH=$HOME/.local/$target/share/pkgconfig:/usr/$target/sys-root/mingw/share/pkgconfig/ -export PATH=$HOME/.local/$target/bin:/usr/$target/sys-root/mingw/bin:/usr/$target/bin:$PATH - -../configure --build=`../config.guess` --host=$target --prefix=$HOME/.local/$target --with-uniscribe --without-icu "$@" +#!/bin/sh +exec "`dirname "$0"`/mingw-configure.sh" i686 "$@" diff --git a/mingw64.sh b/mingw64.sh index 5e913f337..5bc46e569 100755 --- a/mingw64.sh +++ b/mingw64.sh @@ -1,23 +1,2 @@ -#!/bin/bash - -target=x86_64-w64-mingw32 - -unset CC -unset CXX -unset CPP -unset LD -unset LDFLAGS -unset CFLAGS -unset CXXFLAGS -unset PKG_CONFIG_PATH - -# Removed -static from the following -export CFLAGS="-static-libgcc" -export CXXFLAGS="-static-libgcc -static-libstdc++" -export CPPFLAGS="-I$HOME/.local/$target/include" -export LDFLAGS=-L$HOME/.local/$target/lib -export PKG_CONFIG_LIBDIR=$HOME/.local/$target/lib/pkgconfig:/usr/$target/sys-root/mingw/lib/pkgconfig/ -export PKG_CONFIG_PATH=$HOME/.local/$target/share/pkgconfig:/usr/$target/sys-root/mingw/share/pkgconfig/ -export PATH=$HOME/.local/$target/bin:/usr/$target/sys-root/mingw/bin:/usr/$target/bin:$PATH - -../configure --build=`../config.guess` --host=$target --prefix=$HOME/.local/$target --with-uniscribe --without-icu "$@" +#!/bin/sh +exec "`dirname "$0"`/mingw-configure.sh" x86_64 "$@"