diff --git a/compile_linux.sh b/compile_linux.sh index 9c8cb9c54..d70f9145f 100644 --- a/compile_linux.sh +++ b/compile_linux.sh @@ -52,14 +52,14 @@ if test "$1" = "d"; then echo "configuring for 64 bit debug" echo # You may add --enable-adms to the following command for adding adms generated devices - ../configure --with-x --enable-xspice --enable-cider --with-readline=yes --enable-openmp CFLAGS="-g -m64 -O0 -Wall -Wno-unused-but-set-variable" LDFLAGS="-m64 -g" + ../configure --with-x --enable-xspice --enable-cider --with-readline=yes --enable-openmp --enable-sp CFLAGS="-g -m64 -O0 -Wall -Wno-unused-but-set-variable" LDFLAGS="-m64 -g" else cd release if [ $? -ne 0 ]; then echo "cd release failed"; exit 1 ; fi echo "configuring for 64 bit release" echo # You may add --enable-adms to the following command for adding adms generated devices - ../configure --with-x --enable-xspice --enable-cider --with-readline=yes --enable-openmp --disable-debug CFLAGS="-m64 -O2" LDFLAGS="-m64 -s" + ../configure --with-x --enable-xspice --enable-cider --with-readline=yes --enable-openmp --enable-sp --disable-debug CFLAGS="-m64 -O2" LDFLAGS="-m64 -s" fi if [ $? -ne 0 ]; then echo "../configure failed"; exit 1 ; fi diff --git a/compile_min.sh b/compile_min.sh index 606642aed..0571eda07 100755 --- a/compile_min.sh +++ b/compile_min.sh @@ -53,14 +53,14 @@ if test "$1" = "d"; then echo "configuring for 64 bit debug" echo # You may add --enable-adms to the following command for adding adms generated devices - ../configure --with-wingui --enable-xspice --enable-cider --enable-openmp prefix="C:/Spice64d" CFLAGS="-g -m64 -O0 -Wall -Wno-unused-but-set-variable" LDFLAGS="-g -m64" + ../configure --with-wingui --enable-xspice --enable-cider --enable-openmp --enable-sp prefix="C:/Spice64d" CFLAGS="-g -m64 -O0 -Wall -Wno-unused-but-set-variable" LDFLAGS="-g -m64" else cd release if [ $? -ne 0 ]; then echo "cd release failed"; exit 1 ; fi echo "configuring for 64 bit release" echo # You may add --enable-adms to the following command for adding adms generated devices - ../configure --with-wingui --enable-xspice --enable-cider --enable-openmp --disable-debug prefix="C:/Spice64" CFLAGS="-m64 -O2" LDFLAGS="-m64 -s" + ../configure --with-wingui --enable-xspice --enable-cider --enable-openmp --enable-sp --disable-debug prefix="C:/Spice64" CFLAGS="-m64 -O2" LDFLAGS="-m64 -s" fi if [ $? -ne 0 ]; then echo "../configure failed"; exit 1 ; fi diff --git a/configure.ac b/configure.ac index 41ee600c1..ffa20400f 100644 --- a/configure.ac +++ b/configure.ac @@ -158,6 +158,10 @@ AC_ARG_ENABLE([adms], AC_ARG_ENABLE([pss], [AS_HELP_STRING([--enable-pss], [Enable PSS Analysis, (experimental)])]) +# --enable-sp: enable S Parameter Analysis +AC_ARG_ENABLE([sp], + [AS_HELP_STRING([--enable-sp], [Enable S parameter Analysis])]) + # --enable-relpath: Relative path for binary and data. Default is "no". # ngspice shared may want relative paths for spinit etc. AC_ARG_ENABLE([relpath], @@ -1161,12 +1165,20 @@ if test "x$enable_cider" = xyes; then AC_DEFINE([CIDER], [1], [The CIDER enhancements]) fi +# Add S parameter analysis to ngspice. +if test "x$enable_sp" = xyes; then + AC_MSG_RESULT([S parameter analysis enabled]) + AC_DEFINE([RFSPICE], [1], [S parameter analysis]) +fi + AM_CONDITIONAL([CIDER_WANTED], [test "x$enable_cider" = xyes]) AM_CONDITIONAL([NUMDEV_WANTED], [test "x$enable_cider" = xyes]) AM_CONDITIONAL([PSS_WANTED], [test "x$enable_pss" = xyes]) +AM_CONDITIONAL([SP_WANTED], [test "x$enable_sp" = xyes]) + AM_CONDITIONAL([SENSE2_WANTED], [test "x$enable_sense2" = xyes]) # adms option diff --git a/src/Makefile.am b/src/Makefile.am index 5d43dd39e..087658425 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -185,6 +185,11 @@ ngspice_LDADD += \ maths/sparse/libsparse.la \ misc/libmisc.la +if SP_WANTED +ngspice_LDADD += \ + maths/dense/libdense.la +endif + if !WINGUI if !NO_X ngspice_LDADD += frontend/help/libhlp.la @@ -463,6 +468,11 @@ libspice_la_LIBADD += \ misc/libmisc.la \ $(LIBS) +if SP_WANTED +libspice_la_LIBADD += \ + maths/dense/libdense.la +endif + libspice_la_CFLAGS = -shared libspice_la_LDFLAGS = -shared -Wl,--version-script=$(srcdir)/tclspice.map if TCLWIN diff --git a/src/maths/Makefile.am b/src/maths/Makefile.am index 9bc84a2cf..959156909 100644 --- a/src/maths/Makefile.am +++ b/src/maths/Makefile.am @@ -1,6 +1,10 @@ ## Process this file with automake SUBDIRS = cmaths ni sparse poly deriv misc fft -DIST_SUBDIRS = cmaths ni sparse poly deriv misc fft +DIST_SUBDIRS = cmaths ni sparse poly deriv misc fft dense + +if SP_WANTED +SUBDIRS += dense +endif MAINTAINERCLEANFILES = Makefile.in diff --git a/src/spicelib/analysis/Makefile.am b/src/spicelib/analysis/Makefile.am index be94ad40c..62ab58d1a 100644 --- a/src/spicelib/analysis/Makefile.am +++ b/src/spicelib/analysis/Makefile.am @@ -108,6 +108,14 @@ libckt_la_SOURCES += \ psssetp.c endif +if SP_WANTED +libckt_la_SOURCES += \ + cktspdum.c \ + span.c \ + spaskq.c \ + spsetp.c +endif + AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices AM_CFLAGS = $(STATIC)