fixes for cross compile

This commit is contained in:
mariok 2020-06-16 08:34:21 +02:00
parent e2bb25b125
commit f41114aefe
5 changed files with 23 additions and 11 deletions

View File

@ -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"

View File

@ -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 = \

View File

@ -24,7 +24,7 @@
#undef BOOLEAN
#include "windows.h"
#include <psapi.h>
#include <VersionHelpers.h>
#include <versionhelpers.h>
#include <ntverp.h>
#endif

View File

@ -1,14 +1,14 @@
/*
* Author: Holger Vogt
* License: 3-clause BSD License
*
*
*/
#include "ngspice/ngspice.h"
#if defined(_WIN32)
#undef BOOLEAN
#include <Windows.h>
#include <windows.h>
#elif defined(__unix__) || defined(__unix) || defined(unix) || (defined(__APPLE__) && defined(__MACH__))
#include <unistd.h>

View File

@ -10,7 +10,7 @@
#if defined(_WIN32)
#undef BOOLEAN
#include <Windows.h>
#include <windows.h>
#elif defined(__unix__) || defined(__unix) || defined(unix) || (defined(__APPLE__) && defined(__MACH__))
#include <unistd.h>