diff --git a/cross-compile.sh b/cross-compile.sh index 429043a88..71ea2c318 100755 --- a/cross-compile.sh +++ b/cross-compile.sh @@ -18,6 +18,10 @@ set -e +export LD_LIBRARY_PATH=/usr/include:$LD_LIBRARY_PATH +export PATH=/usr/include:$PATH +echo "$LD_LIBRARY_PATH" + if test "$1" = "64"; then release="release-mingw-64" dstzip="ngspice-mingw-64.zip" @@ -38,15 +42,23 @@ mkdir -p "./$release" ( cd "./$release" && \ ../configure \ - --build=$(../config.guess) \ + --build="$(../config.guess)" \ --host="$host" \ --prefix="$dst" \ --exec-prefix="$dst" \ + LDFLAGS=-lstdc++ \ --with-wingui --enable-xspice --enable-cider --disable-debug ) +# my config: +# "LDFLAGS=\"-lstdc++\"", +# "--with-x", +# "--enable-xspice", +# "--enable-cider", +# "--with-readline=yes", +# "--enable-openmp" -make -C "./$release" -k -j6 -make -C "./$release" -k -j6 DESTDIR="$(pwd)/$release/" install +make -C "./$release" -k -j12 +make -C "./$release" -k -j12 DESTDIR="$(pwd)/$release/" install ( cd "./$release/C:/" && zip -r - . ) > "./$release/$dstzip" diff --git a/src/Makefile.am b/src/Makefile.am index 23e4b79be..63767f71f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -333,16 +333,16 @@ AM_CFLAGS = -static LIBS = @LIBS@ @X_LIBS@ @X_PRE_LIBS@ @X_EXTRA_LIBS@ if WINGUI -LIBS += -lpsapi -lShlwapi +LIBS += -lpsapi -lshlwapi endif if WINCONSOLE -LIBS += -lpsapi -lShlwapi +LIBS += -lpsapi -lshlwapi endif ## FIXME: Should be allwed, but fails within MSYS2 #if SHWIN -#LIBS += -lpsapi -lShlwapi +#LIBS += -lpsapi -lshlwapi #endif CLEANFILES = ngspice.idx spinit tclspinit pkgIndex.tcl @@ -358,7 +358,7 @@ pkgIndex_DATA = pkgIndex.tcl pkgIndexdir = $(pkglibdir) if TCLWIN -LIBS += -lpsapi -lShlwapi -ltcl84 -lBLT24 +LIBS += -lpsapi -lshlwapi -ltcl84 -lBLT24 endif libspice_la_SOURCES = \ diff --git a/src/frontend/com_sysinfo.c b/src/frontend/com_sysinfo.c index 2cd1c2509..55100cacd 100644 --- a/src/frontend/com_sysinfo.c +++ b/src/frontend/com_sysinfo.c @@ -24,7 +24,7 @@ #undef BOOLEAN #include "windows.h" #include -#include +#include #include #endif diff --git a/src/frontend/get_avail_mem_size.c b/src/frontend/get_avail_mem_size.c index aadd4f4e3..a6e9dcdff 100644 --- a/src/frontend/get_avail_mem_size.c +++ b/src/frontend/get_avail_mem_size.c @@ -1,14 +1,14 @@ /* * Author: Holger Vogt * License: 3-clause BSD License - * + * */ #include "ngspice/ngspice.h" #if defined(_WIN32) #undef BOOLEAN -#include +#include #elif defined(__unix__) || defined(__unix) || defined(unix) || (defined(__APPLE__) && defined(__MACH__)) #include diff --git a/src/frontend/get_phys_mem_size.c b/src/frontend/get_phys_mem_size.c index ef6c47b91..ec054b743 100644 --- a/src/frontend/get_phys_mem_size.c +++ b/src/frontend/get_phys_mem_size.c @@ -10,7 +10,7 @@ #if defined(_WIN32) #undef BOOLEAN -#include +#include #elif defined(__unix__) || defined(__unix) || defined(unix) || (defined(__APPLE__) && defined(__MACH__)) #include