Skip to content

Commit

Permalink
Tweaks for updated MSYS2/MINGW64 rebuild.
Browse files Browse the repository at this point in the history
  • Loading branch information
wrcad committed May 9, 2022
1 parent 9268282 commit 2e518fe
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions adms/files/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ MAINTAINER = @MAINTAINER@

DEFS = -DHAVE_CONFIG_H -DinsideElement -DinsidePreprocessor -DinsideVeriloga
CPPFLAGS = -g -Wall
CFLAGS = $(DEFS) $(CPPFLAGS) -I.
CFLAGS = $(DEFS) $(CPPFLAGS) -I. -fcommon

CFILES = adms.c preprocessorLex.c preprocessorMain.c preprocessorYacc.c \
verilogaYacc.c verilogaLex.c admstpathYacc.c
Expand All @@ -20,7 +20,7 @@ COBJS=$(CFILES:.c=.o)
all: admsXml$(EXEEXT) admsCheck$(EXEEXT)

admsXml$(EXEEXT): adms.implicit.xml.c adms.c admsXml.o $(COBJS)
$(CC) -o $@ admsXml.o $(COBJS)
$(CC) -o $@ $(CFLAGS) admsXml.o $(COBJS)

admsCheck$(EXEEXT): admsCheck.c adms.c dummy.xml.c dummy.va.c
$(CC) -o $@ $(CFLAGS) admsCheck.c adms.o
Expand Down
16 changes: 8 additions & 8 deletions wrspice/devlib/adms/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,16 @@ DATE = @DATE@

# Advanced users can edit the blocks below if necessary.

ifeq ($(OSNAME),Win32)
ifeq ($(OSNAME),MINGW)

# Windows, compiler and libraries from win-builds.org.
CXX = /usr/local/win-builds/bin/g++
CC = /usr/local/win-builds/bin/gcc
LINKCC = $(CXX) -static-libgcc -static-libstdc++
CFLAGS = -O3 -Wall -W -Wshadow -Wwrite-strings -pthread
# MINGW x86_64
CXX = /mingw64/bin/g++
CC = /mingw64/bin/gcc
LINKCC = /mingw64/bin/g++ -static-libgcc -static-libstdc++
CFLAGS = -O2 -Wall -W -Wshadow -Wwrite-strings -pthread
LSHFLAG = -shared -Wl,--enable-auto-import,--export-all-symbols
DEPEND_PROG = $(CC) -MM -O3 -Wall -W -Wshadow -Wwrite-strings -pthread
FILTER = |sed -e s/C:// -e s///
DEPEND_PROG = $(CC) -MM -O2 -Wall -W -Wshadow -Wwrite-strings -pthread
FILTER =
PIC_OPT =
SOEXT = dll
DEVWINDLL = -L$(DLL_LOC) -lwrspice
Expand Down
4 changes: 3 additions & 1 deletion xt_base/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ if test $enable_mingw != yes -a $enable_mingw != no; then
mingw_dir=$enable_mingw
mingw=yes
elif test $enable_mingw = yes; then
mingw_dir=/mingw64
mingw=yes
fi
)
Expand Down Expand Up @@ -878,7 +879,8 @@ if test $OSNAME = "MINGW"; then
if test -z $REGEX; then
MSLIBS="$MSLIBS -lregex -ltre -lintl -liconv"
fi
MSLIBS2="-lbfd -liberty -lintl -liconv -lm"
MSLIBS2="$mingw_dir/lib/binutils/libbfd.a \
$mingw_dir/lib/binutils/libiberty.a -lintl -liconv -lm"
dnl -lbfd -liberty required for stackdump.o, and fnmatch used in mswfile.cc
SLIBS="$MSLIBS"
LIBS="$MSLIBS $MSLIBS2 $LIBS"
Expand Down

0 comments on commit 2e518fe

Please sign in to comment.