aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@tu-dresden.de>2016-06-30 14:05:18 +0200
committerPatrick Lehmann <Patrick.Lehmann@tu-dresden.de>2016-06-30 14:05:18 +0200
commit030a49838de92cb8c2bf77e025cd9ca64314b75b (patch)
tree4a20863ad14b0bf810b7c2c00333d9af4084253a /configure
parentecf964d43cfb36def48809fe47e43f60a5f2e4b1 (diff)
downloadghdl-030a49838de92cb8c2bf77e025cd9ca64314b75b.tar.gz
ghdl-030a49838de92cb8c2bf77e025cd9ca64314b75b.tar.bz2
ghdl-030a49838de92cb8c2bf77e025cd9ca64314b75b.zip
A first changeset for MinGW32 and MinGW64 to compile GHDL with mcode and llvm backend on Windows x86-64.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 14 insertions, 6 deletions
diff --git a/configure b/configure
index 449ba2ed8..e337aaad3 100755
--- a/configure
+++ b/configure
@@ -17,11 +17,13 @@ llvm_config=
backtrace_lib=
build=
build_mode=
+EXEEXT=
+LIBEXT=.so
show_help=no
progname=$0
-subst_vars="CC GNATMAKE CFLAGS LDFLAGS build srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_config backtrace_lib build_mode"
+subst_vars="CC GNATMAKE CFLAGS LDFLAGS build srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_config backtrace_lib build_mode EXEEXT LIBEXT"
# Find srcdir
srcdir=`dirname $progname`
@@ -169,6 +171,12 @@ if test $backend = llvm; then
esac
fi
+# Define default file extensions for Windows or Linux-like systems
+case "$build" in
+ *mingw*) LIBEXT=".dll"; EXEEXT=".exe";;
+ *) LIBEXT=".so"; EXEEXT="";;
+esac
+
# Generate config.status
rm -f config.status
{
@@ -211,7 +219,7 @@ fi
if test $backend = mcode; then
case "$build" in
*darwin*) ortho_flags="Flags_Macosx${mcode64}" ;;
- *mingw32*) ortho_flags="Flags_Windows" ;;
+ *mingw32*) ortho_flags="Flags_Windows${mcode64}" ;;
*linux*) ortho_flags="Flags_Linux${mcode64}" ;;
*) echo "Unsupported $build build for mcode"; exit 1;;
esac
@@ -230,10 +238,10 @@ fi
# Generate default_pathes.ads
echo "Generate default_pathes.ads"
curdir=`pwd`
-sed -e "s%@COMPILER_GCC@%ghdl1-gcc%" \
- -e "s%@COMPILER_DEBUG@%ghdl1-debug%" \
- -e "s%@COMPILER_MCODE@%ghdl1-mcode%" \
- -e "s%@COMPILER_LLVM@%bin/ghdl1-llvm%" \
+sed -e "s%@COMPILER_GCC@%ghdl1-gcc$EXEEXT%" \
+ -e "s%@COMPILER_DEBUG@%ghdl1-debug$EXEEXT%" \
+ -e "s%@COMPILER_MCODE@%ghdl1-mcode$EXEEXT%" \
+ -e "s%@COMPILER_LLVM@%bin/ghdl1-llvm$EXEEXT%" \
-e "s%@POST_PROCESSOR@%oread-$backend%" \
-e "s%@INSTALL_PREFIX@%$prefix%" \
-e "s%@LIB_PREFIX@%$libdirsuffix%" \