ngspice/src/Makefile.am

433 lines
9.2 KiB
Makefile
Raw Normal View History

2000-04-27 22:03:57 +02:00
## Process this file with automake to produce Makefile.in
# $Id$
2000-04-27 22:03:57 +02:00
2010-11-16 20:31:33 +01:00
SUBDIRS = misc maths frontend spicelib include
DIST_SUBDIRS = misc maths frontend spicelib include xspice ciderlib
2000-04-27 22:03:57 +02:00
2010-11-16 20:31:33 +01:00
if XSPICE_WANTED
SUBDIRS += xspice
endif
if CIDER_WANTED
SUBDIRS += ciderlib
endif
if !TCL_MODULE
2010-06-16 00:39:09 +02:00
bin_PROGRAMS = ngspice ngnutmeg
2010-06-13 20:55:18 +02:00
2005-05-19 17:21:59 +02:00
if !WINDOWS
2010-06-16 00:39:09 +02:00
bin_PROGRAMS += ngsconvert ngproc2mod ngmultidec ngmakeidx
helpdatadir = $(pkgdatadir)/helpdir
helpdata_DATA = ngspice.txt ngspice.idx
if !NO_HELP
bin_PROGRAMS += nghelp
2010-06-16 00:39:09 +02:00
endif !NO_HELP
endif !WINDOWS
endif !TCL_MODULE
2010-06-13 20:55:18 +02:00
EXTRA_DIST = ngspice.txt setplot spectrum \
2011-05-31 17:52:52 +02:00
devload devaxis ciderinit winmain.c winmain.h unsupported \
tclspice.c tclspice.map pkgIndex.tcl.in tclspinit.in main.c
2000-04-27 22:03:57 +02:00
initdatadir = $(pkgdatadir)/scripts
2010-11-16 20:31:33 +01:00
initdata_DATA = spinit setplot spectrum
if CIDER_WANTED
initdata_DATA += devload devaxis ciderinit
endif
2000-04-27 22:03:57 +02:00
DYNAMIC_DEVICELIBS = \
spicelib/devices/asrc/libasrc.la \
spicelib/devices/bjt/libbjt.la \
spicelib/devices/bsim1/libbsim1.la \
spicelib/devices/bsim2/libbsim2.la \
spicelib/devices/bsim3/libbsim3.la \
spicelib/devices/bsim3v0/libbsim3v0.la \
spicelib/devices/bsim3v1/libbsim3v1.la \
spicelib/devices/bsim3v32/libbsim3v32.la \
spicelib/devices/bsim4/libbsim4.la \
spicelib/devices/bsim4v2/libbsim4v2.la \
spicelib/devices/bsim4v3/libbsim4v3.la \
spicelib/devices/bsim4v4/libbsim4v4.la \
spicelib/devices/bsim4v5/libbsim4v5.la \
spicelib/devices/cap/libcap.la \
2009-04-19 12:43:09 +02:00
spicelib/devices/bsim3soi/libbsim4soi.la \
spicelib/devices/bsim3soi_pd/libbsim3soipd.la \
spicelib/devices/bsim3soi_fd/libbsim3soifd.la \
spicelib/devices/bsim3soi_dd/libbsim3soidd.la \
spicelib/devices/cccs/libcccs.la \
spicelib/devices/ccvs/libccvs.la \
spicelib/devices/cpl/libcpl.la \
spicelib/devices/csw/libcsw.la \
spicelib/devices/dio/libdio.la \
spicelib/devices/ind/libind.la \
spicelib/devices/isrc/libisrc.la \
spicelib/devices/hfet1/libhfet.la \
spicelib/devices/hfet2/libhfet2.la \
2011-05-23 22:37:11 +02:00
spicelib/devices/hisim2/libhisim2.la \
2011-04-29 18:47:55 +02:00
spicelib/devices/hisimhv/libhisimhv.la \
spicelib/devices/jfet/libjfet.la \
spicelib/devices/jfet2/libjfet2.la \
spicelib/devices/ltra/libltra.la \
spicelib/devices/mes/libmes.la \
spicelib/devices/mesa/libmesa.la \
spicelib/devices/mos1/libmos1.la \
spicelib/devices/mos2/libmos2.la \
spicelib/devices/mos3/libmos3.la \
spicelib/devices/mos6/libmos6.la \
spicelib/devices/mos9/libmos9.la \
spicelib/devices/res/libres.la \
spicelib/devices/soi3/libsoi3.la \
spicelib/devices/sw/libsw.la \
spicelib/devices/txl/libtxl.la \
spicelib/devices/tra/libtra.la \
spicelib/devices/urc/liburc.la \
spicelib/devices/vbic/libvbic.la \
spicelib/devices/vccs/libvccs.la \
spicelib/devices/vcvs/libvcvs.la \
spicelib/devices/vsrc/libvsrc.la \
2010-11-16 20:31:33 +01:00
@VLADEV@
2010-06-13 20:55:18 +02:00
2000-04-27 22:03:57 +02:00
## Build ngspice first:
ngspice_SOURCES = \
main.c \
2000-04-27 22:03:57 +02:00
conf.c \
conf.h \
ngspice.c
2010-06-13 20:55:18 +02:00
ngspice_CPPFLAGS = $(AM_CPPFLAGS) -DSIMULATOR
2005-05-18 16:51:11 +02:00
if WINDOWS
ngspice_SOURCES += winmain.c
endif
2000-04-27 22:03:57 +02:00
ngspice_LDADD = \
2010-11-16 20:31:33 +01:00
frontend/libfte.la
if WINDOWS
ngspice_LDADD += \
frontend/wdisp/libwindisp.la
endif
ngspice_LDADD += \
frontend/plotting/libplotting.la
ngspice_LDADD += \
spicelib/devices/dev.lo \
2010-11-16 20:31:33 +01:00
$(DYNAMIC_DEVICELIBS)
if NDEV_WANTED
ngspice_LDADD += spicelib/devices/ndev/libndev.la
endif
if NUMDEV_WANTED
ngspice_LDADD += \
spicelib/devices/nbjt/libnbjt.la \
spicelib/devices/nbjt2/libnbjt2.la \
spicelib/devices/numd/libnumd.la \
spicelib/devices/numd2/libnumd2.la \
spicelib/devices/numos/libnumos.la
endif
ngspice_LDADD += \
spicelib/analysis/libckt.la \
2010-11-16 20:31:33 +01:00
spicelib/devices/libdev.la
if XSPICE_WANTED
ngspice_LDADD += \
2011-05-07 10:01:22 +02:00
xspice/cm/libcmxsp.la \
xspice/mif/libmifxsp.la \
2010-11-16 20:31:33 +01:00
xspice/evt/libevtxsp.la \
xspice/enh/libenhxsp.la \
xspice/ipc/libipcxsp.la \
xspice/idn/libidnxsp.la \
@XSPICEDLLIBS@
endif
ngspice_LDADD += \
frontend/parser/libparser.la \
frontend/numparam/libnumparam.la \
frontend/trannoise/libtrannoise.la \
2010-11-16 20:31:33 +01:00
spicelib/parser/libinp.la
if CIDER_WANTED
ngspice_LDADD += \
ciderlib/twod/libcidertwod.la \
ciderlib/oned/libcideroned.la \
ciderlib/input/libciderinput.la \
ciderlib/support/libcidersuprt.la
endif
ngspice_LDADD += \
maths/deriv/libderiv.la \
maths/cmaths/libcmaths.la \
maths/misc/libmathmisc.la \
maths/fft/libmathfft.la \
maths/poly/libpoly.la \
maths/ni/libni.la \
maths/sparse/libsparse.la \
misc/libmisc.la
2010-06-16 00:39:09 +02:00
if !WINDOWS
if !NO_X
2010-06-16 00:39:09 +02:00
ngspice_LDADD += frontend/help/libhlp.la
endif
endif
2000-04-27 22:03:57 +02:00
## nutmeg:
ngnutmeg_SOURCES = \
2000-04-27 22:03:57 +02:00
main.c \
conf.c \
conf.h \
ngnutmeg.c
2000-04-27 22:03:57 +02:00
ngnutmeg_CPPFLAGS = $(AM_CPPFLAGS)
2005-05-18 16:51:11 +02:00
if WINDOWS
ngnutmeg_SOURCES += winmain.c
endif
ngnutmeg_LDADD = \
2010-11-16 20:31:33 +01:00
frontend/libfte.la
if WINDOWS
ngnutmeg_LDADD += \
frontend/wdisp/libwindisp.la
endif
ngnutmeg_LDADD += \
frontend/plotting/libplotting.la \
frontend/parser/libparser.la \
frontend/numparam/libnumparam.la \
frontend/trannoise/libtrannoise.la \
maths/cmaths/libcmaths.la \
maths/misc/libmathmisc.la \
maths/fft/libmathfft.la \
maths/poly/libpoly.la \
misc/libmisc.la \
spicelib/parser/libinp.la
2010-06-16 00:39:09 +02:00
## These programs are not required on Windows
if !WINDOWS
if !NO_X
ngnutmeg_LDADD += \
2010-06-13 20:55:18 +02:00
frontend/help/libhlp.la
2010-06-16 00:39:09 +02:00
endif !NO_X
2000-04-27 22:03:57 +02:00
## help:
2005-05-20 13:28:03 +02:00
nghelp_SOURCES = conf.c nghelp.c
2000-04-27 22:03:57 +02:00
2005-05-18 16:51:11 +02:00
2010-06-16 00:39:09 +02:00
if !NO_HELP
# We keep the libraries to a minimum here and link against terminal.o
# rather than the full front-end library libfte.a to avoid link errors that
# that would otherwise occur (thanks to Andreas Unger for this fix).
nghelp_LDADD = \
frontend/terminal.lo \
misc/libmisc.la
if !NO_X
nghelp_LDADD += \
2010-06-13 20:55:18 +02:00
frontend/help/libhlp.la
2010-06-16 00:39:09 +02:00
endif !NO_X
endif !NO_HELP
2000-04-27 22:03:57 +02:00
2010-06-13 20:55:18 +02:00
2000-04-27 22:03:57 +02:00
## sconvert:
ngsconvert_SOURCES = ngsconvert.c
2000-04-27 22:03:57 +02:00
ngsconvert_LDADD = \
frontend/libfte.la \
frontend/parser/libparser.la \
maths/misc/libmathmisc.la \
misc/libmisc.la
2010-06-13 20:55:18 +02:00
2000-04-27 22:03:57 +02:00
## proc2mod:
ngproc2mod_SOURCES = ngproc2mod.c
2000-04-27 22:03:57 +02:00
ngproc2mod_LDADD = \
frontend/parser/libparser.la \
spicelib/parser/libinp.la \
2010-06-13 20:55:18 +02:00
misc/libmisc.la
2000-04-27 22:03:57 +02:00
## multidec:
ngmultidec_SOURCES = ngmultidec.c
2000-04-27 22:03:57 +02:00
ngmultidec_LDADD = \
maths/sparse/libsparse.la \
2010-06-13 20:55:18 +02:00
misc/libmisc.la
2000-04-27 22:03:57 +02:00
## ngmakeidx:
2000-04-27 22:03:57 +02:00
ngmakeidx_SOURCES = makeidx.c
2000-04-27 22:03:57 +02:00
## create index for online help:
ngspice.idx: ngmakeidx$(EXEEXT)
./ngmakeidx$(EXEEXT) $(srcdir)/ngspice.txt
2000-04-27 22:03:57 +02:00
2010-06-16 00:39:09 +02:00
endif !WINDOWS
2000-04-27 22:03:57 +02:00
2010-06-16 00:39:09 +02:00
## General Includes and libraries:
AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices @X_CFLAGS@
2000-04-27 22:03:57 +02:00
LIBS = @LIBS@ @X_LIBS@ @X_PRE_LIBS@ @X_EXTRA_LIBS@
if WINDOWS
LIBS += -lpsapi
endif
MAINTAINERCLEANFILES = Makefile.in ngspice.idx
2010-06-16 00:39:09 +02:00
## Tcl:
if TCL_MODULE
lib_LTLIBRARIES = libspice.la
install: install-libLTLIBRARIES install-tcl-recursive install-tclspice install-data-am
EXTRA_DIST += tclspice.c
2008-11-23 21:47:23 +01:00
initdata_DATA += tclspinit
2009-04-20 22:53:10 +02:00
if TCLWIN
2009-05-11 22:58:14 +02:00
LIBS += -lpsapi -ltcl84 -lBLT24
2009-04-20 22:53:10 +02:00
endif
libspice_la_SOURCES = \
main.c \
conf.c \
conf.h \
ngspice.c \
tclspice.c
2010-11-16 20:31:33 +01:00
libspice_la_CPPFLAGS = $(AM_CPPFLAGS) -DSIMULATOR \
-DTCLSPICE_version="\"$(TCLSPICE_VERSION)\""
libspice_la_LIBADD = \
@X_LIBS@ \
2010-11-16 20:31:33 +01:00
frontend/libfte.la
if WINDOWS
libspice_la_LIBADD += \
frontend/wdisp/libwindisp.la
endif
libspice_la_LIBADD += \
frontend/plotting/libplotting.la
if XSPICE_WANTED
libspice_la_LIBADD += \
xspice/cm/libcmxsp.la \
xspice/mif/libmifxsp.la
endif
libspice_la_LIBADD += \
$(DYNAMIC_DEVICELIBS)
if NDEV_WANTED
libspice_la_LIBADD += \
spicelib/devices/ndev/libndev.la
2010-11-16 20:31:33 +01:00
endif
if NUMDEV_WANTED
libspice_la_LIBADD += \
spicelib/devices/nbjt/libnbjt.la \
spicelib/devices/nbjt2/libnbjt2.la \
spicelib/devices/numd/libnumd.la \
spicelib/devices/numd2/libnumd2.la \
spicelib/devices/numos/libnumos.la
endif
libspice_la_LIBADD += \
spicelib/analysis/libckt.la \
2010-11-16 20:31:33 +01:00
spicelib/devices/libdev.la
if XSPICE_WANTED
libspice_la_LIBADD += \
xspice/evt/libevtxsp.la \
xspice/enh/libenhxsp.la \
xspice/ipc/libipcxsp.la \
xspice/idn/libidnxsp.la \
@XSPICEDLLIBS@
endif
libspice_la_LIBADD += \
frontend/parser/libparser.la \
frontend/numparam/libnumparam.la \
frontend/trannoise/libtrannoise.la \
2010-11-16 20:31:33 +01:00
spicelib/parser/libinp.la
if CIDER_WANTED
libspice_la_LIBADD += \
ciderlib/twod/libcidertwod.la \
ciderlib/oned/libcideroned.la \
ciderlib/input/libciderinput.la \
ciderlib/support/libcidersuprt.la
endif
libspice_la_LIBADD += \
maths/deriv/libderiv.la \
maths/cmaths/libcmaths.la \
maths/misc/libmathmisc.la \
maths/fft/libmathfft.la \
maths/poly/libpoly.la \
maths/ni/libni.la \
maths/sparse/libsparse.la \
misc/libmisc.la \
$(LIBS)
2010-11-16 20:31:33 +01:00
libspice_la_CFLAGS = $(AM_CFLAGS)
2010-06-13 20:55:18 +02:00
libspice_la_LDFLAGS = -shared -Wl,--version-script=tclspice.map
2009-04-20 22:53:10 +02:00
if TCLWIN
2008-09-15 08:53:50 +02:00
libspice_la_LDFLAGS += -no-undefined
2009-04-20 22:53:10 +02:00
libspice_la_LDFLAGS += --def spice.def @TCL_LIB_SPEC@
2008-09-15 08:53:50 +02:00
endif
2010-08-18 19:13:26 +02:00
if TCLCYG
libspice_la_LDFLAGS += -no-undefined
libspice_la_LDFLAGS += --def spice.def @TCL_LIB_SPEC@
endif
CLEANFILES = pkgIndex.tcl libspice.so
TCL_PKG_PATH = @TCL_PACKAGE_PATH@
TCLSPICE_VERSION = @VERSION@
TCL_FILES = libspice.la pkgIndex.tcl
pkgIndex.tcl: pkgIndex.tcl.in
rm -f $@
2008-09-15 08:39:21 +02:00
sed -e 's;%LIB_DIR%;$(DESTDIR)$(libdir);g' $< | \
sed -e 's;%VERSION%;$(TCLSPICE_VERSION);g' > $@
2010-06-13 20:55:18 +02:00
all: $(TCL_FILES)
install-tcl-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) install) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
2010-06-13 20:55:18 +02:00
done;
2010-06-13 20:55:18 +02:00
install-tclspice:
2008-09-15 08:39:21 +02:00
$(mkinstalldirs) $(DESTDIR)$(libdir)/spice
$(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(libdir)/spice
2010-06-16 00:39:09 +02:00
endif TCL_MODULE
2010-06-13 20:55:18 +02:00
EXTRA_DIST += spice.def