* support/scripts/sdcc_mingw32: sync with sdcc-build
[fw/sdcc] / support / scripts / sdcc_mingw32
index 86e6784dae1f9339cb6ca23daeb6d152f1fc74a3..e8783b6c6dd5e9238e8cc928718d9fe30b861cc4 100755 (executable)
@@ -1,22 +1,20 @@
 #!/bin/sh
 # Script to crosscompile with mingw32
-TOOLSPREFIX=/usr/local/cross-tools/i386-mingw32msvc/bin
+TOOLSPREFIX=/usr/local/cross-tools/bin/i586-mingw32msvc-
 
-export CC=$TOOLSPREFIX/gcc
-export CXX=$TOOLSPREFIX/g++
-export RANLIB=$TOOLSPREFIX/ranlib
-export STRIP=$TOOLSPREFIX/strip
+export CC=${TOOLSPREFIX}gcc
+export CXX=${TOOLSPREFIX}g++
+export RANLIB=${TOOLSPREFIX}ranlib
+export STRIP=${TOOLSPREFIX}strip
 
 export SDCCCONFIGUREFLAGS=" \
 --prefix=/sdcc \
---datadir=/sdcc \
-docdir=/sdcc/doc \
+--datarootdir=/sdcc \
+docdir=\${datarootdir}/doc \
 include_dir_suffix=include \
 lib_dir_suffix=lib \
 sdccconf_h_dir_separator=\\\\ \
 --disable-device-lib \
---disable-ucsim \
 --host=i586-mingw32msvc --build=unknown-unknown-linux-gnu"
 
-./configure $SDCCCONFIGUREFLAGS
-make 2>&1 | tee make.log
+../sdcc/configure ${SDCCCONFIGUREFLAGS} & make 2>&1 | tee make.log