From f9a5d631aee73e15e2e630cee67540d6a20a41a3 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Thu, 2 Jun 2011 08:58:30 +0000 Subject: [PATCH] mingw installation --- ChangeLog | 1 + INSTALL | 20 ++++++++++++++------ compile_min.sh | 39 ++++++++++++++++++++++++++++++--------- 3 files changed, 45 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index dc65f9f65..18ead80e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2011-06-02 Holger Vogt * tests/hisim/makefile.am: no more test1.cir in EXTRA_DIST + * INSTALL, compile_min.sh: new instructions for mingw compilation 2011-06-01 Dietmar Warning * devices/bjt/bjt.c: introduce ccc as an alias for the diff --git a/INSTALL b/INSTALL index d6ce857f1..599603442 100644 --- a/INSTALL +++ b/INSTALL @@ -426,7 +426,10 @@ Most of the options now following are not well maintained, are not tested or eve if you have MSYS/MINGW installed properly. Unfortunately this is rather tedious because you will need several enhancements to the standard install, especially if you want to include XSpice. Some links are given below which - describe the procedures. + describe the procedures. + + Installing from the tarball, e.g. ngspice-23.tar.gz, is now simple: After + expanding, you may just run ./compile_min.sh from the ngspice-23 directory. The default installation location of ngspice is the Windows path C:\spice. The install path can be altered by passing --prefix=NEWPATH @@ -440,8 +443,9 @@ Most of the options now following are not well maintained, are not tested or eve The procedure of compiling a distribution (for example, a tarball from the ngspice website), is as follows: - $ cd ng-spice-rework - $ ./configure --with-windows ...and other options + $ cd ngspice-23 + + $ ../configure --with-windows ...and other options $ make $ make install @@ -452,7 +456,9 @@ Most of the options now following are not well maintained, are not tested or eve A fully featured ngspice on Windows may be obtained with the following commands: $ ./autogen.sh --adms - $ ./configure --with-windows --enable-cider --disable-debug --enable-openmp --enable-xspice --enable-adms + $ mkdir release + $ cd release + $ ../configure --with-windows --enable-cider --disable-debug --enable-openmp --enable-xspice --enable-adms $ make install However, to compile code extracted from the CVS repository the procedure is @@ -460,7 +466,9 @@ Most of the options now following are not well maintained, are not tested or eve $ cd ng-spice-rework $ ./autogen.sh - $ ./configure --enable-maintainer-mode --with-windows ...and other options + $ mkdir release + $ cd release + $ ../configure --enable-maintainer-mode --with-windows ...and other options $ make $ make install @@ -492,7 +500,7 @@ Most of the options now following are not well maintained, are not tested or eve CIDER and XSPICE are included, but the code models for XSPICE (*.cm) are not (yet) made. You may however use the code models created with MINGW (which in fact are dlls), as e.g. found in - the ngspice binary distribution. + the ngspice binary distribution our made as described in 9.1. There is currently no installation procedure provided, you may however install the executable manually as described in the diff --git a/compile_min.sh b/compile_min.sh index 73ec67a4f..ba5eb985d 100644 --- a/compile_min.sh +++ b/compile_min.sh @@ -1,5 +1,5 @@ #!/bin/bash -# ngspice build script for MINGW-w64 +# ngspice build script for MINGW-w64, release version, 32 or 64 bit # compile_min.sh #Procedure: @@ -14,21 +14,42 @@ # Options: # --adms and --enable-adms will install extra HICUM, EKV and MEXTRAM models via the # adms interface. +# Please see http://ngspice.sourceforge.net/admshowto.html for more info on adms. # CIDER, XSPICE, and OpenMP may be selected at will. # --disable-debug will give O2 optimization (versus O0 for debug) and removes all debugging info. -./autogen.sh --adms -if [ $? -ne 0 ]; then echo "./autogen.sh failed"; exit 1 ; fi + +if test "$1" = "64"; then + if [ ! -d "release64" ]; then + mkdir release64 + if [ $? -ne 0 ]; then echo "mkdir release64 failed"; exit 1 ; fi + fi +else + if [ ! -d "release" ]; then + mkdir release + if [ $? -ne 0 ]; then echo "mkdir release failed"; exit 1 ; fi + fi +fi + +# If compiling sources from CVS, you may need to uncomment the following two lines: +#./autogen.sh --adms +#if [ $? -ne 0 ]; then echo "./autogen.sh failed"; exit 1 ; fi echo if test "$1" = "64"; then -echo "configuring for 64 bit" -echo -./configure --with-windows --enable-xspice --enable-cider --enable-openmp --enable-adms --disable-debug prefix="C:/Spice64" CFLAGS="-m64" LDFLAGS="-m64" + cd release64 + if [ $? -ne 0 ]; then echo "cd release64 failed"; exit 1 ; fi + echo "configuring for 64 bit" + echo +# You may add --enable-adms to the following command for adding adms generated devices + ../configure --with-windows --enable-xspice --enable-cider --enable-openmp --disable-debug prefix="C:/Spice64" CFLAGS="-m64" LDFLAGS="-m64" else -echo "configuring for 32 bit" -echo -./configure --with-windows --enable-xspice --enable-cider --enable-openmp --enable-adms --disable-debug CFLAGS="-m32" LDFLAGS="-m32" + cd release + if [ $? -ne 0 ]; then echo "cd release failed"; exit 1 ; fi + echo "configuring for 32 bit" + echo +# You may add --enable-adms to the following command for adding adms generated devices + ../configure --with-windows --enable-xspice --enable-cider --enable-openmp --disable-debug CFLAGS="-m32" LDFLAGS="-m32" fi if [ $? -ne 0 ]; then echo "./configure failed"; exit 1 ; fi