ngspice/src/Makefile.am

317 lines
7.3 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
SUBDIRS = misc maths frontend spicelib include @XSPICEDIR@ @CIDERDIR@
DIST_SUBDIRS = misc maths frontend spicelib include xspice ciderlib
2000-04-27 22:03:57 +02:00
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 \
devload devaxis ciderinit winmain.c unsupported \
tclspice.c tclspice.map pkgIndex.tcl.in tclspinit.in
2000-04-27 22:03:57 +02:00
initdatadir = $(pkgdatadir)/scripts
initdata_DATA = spinit setplot spectrum @CIDERSCRIPTS@
2000-04-27 22:03:57 +02:00
2003-08-05 19:20:17 +02:00
DYNAMIC_DEVICELIBS = \
spicelib/devices/asrc/libasrc.la \
spicelib/devices/bjt/libbjt.la \
spicelib/devices/bjt2/libbjt2.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/bsim3v1s/libbsim3v1s.la \
spicelib/devices/bsim3v1a/libbsim3v1a.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 \
spicelib/devices/hisim/libhisim.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 \
2007-05-01 05:41:59 +02:00
@NDEV_LIB@ \
@VLADEV@ \
@NUMDEV@
2010-06-13 20:55:18 +02:00
2000-04-27 22:03:57 +02:00
## Build ngspice first:
ngspice_SOURCES = \
conf.c \
conf.h \
ngspice.c
2010-06-13 20:55:18 +02:00
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 = \
spice.lo \
frontend/libfte.la \
@WINDISPLIB@ \
frontend/plotting/libplotting.la \
@XSPICELIB1@ \
spicelib/devices/dev.lo \
$(DYNAMIC_DEVICELIBS) \
spicelib/analysis/libckt.la \
spicelib/devices/libdev.la \
@XSPICELIB2@ \
frontend/parser/libparser.la \
frontend/numparam/libnumparam.la \
spicelib/parser/libinp.la \
2003-08-14 01:27:50 +02:00
@CIDERSIM@ \
maths/deriv/libderiv.la \
maths/cmaths/libcmaths.la \
maths/misc/libmathmisc.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
2010-06-16 00:39:09 +02:00
winmain.o: winmain.c ../config.h
$(COMPILE) -DSIMULATOR -o winmain.o -c $(srcdir)/winmain.c
2002-01-03 23:44:21 +01:00
2010-06-16 00:39:09 +02:00
spice.lo: main.c ../config.h
$(LTCOMPILE) -DSIMULATOR -c -o spice.o $<
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
2005-05-18 16:51:11 +02:00
if WINDOWS
ngnutmeg_SOURCES += winmain.c
endif
ngnutmeg_LDADD = \
frontend/libfte.la \
@WINDISPLIB@ \
frontend/plotting/libplotting.la \
frontend/parser/libparser.la \
frontend/numparam/libnumparam.la \
maths/cmaths/libcmaths.la \
maths/misc/libmathmisc.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
2010-06-16 00:39:09 +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 =
libspice_la_LIBADD = ngspice.lo conf.lo \
spice.lo \
@X_LIBS@ \
frontend/libfte.la \
@WINDISPLIB@ \
frontend/plotting/libplotting.la \
@XSPICELIB1@ \
$(DYNAMIC_DEVICELIBS) \
spicelib/analysis/libckt.la \
spicelib/devices/libdev.la \
@XSPICELIB2@ \
frontend/parser/libparser.la \
frontend/numparam/libnumparam.la \
spicelib/parser/libinp.la \
@CIDERSIM@ \
maths/deriv/libderiv.la \
maths/cmaths/libcmaths.la \
maths/misc/libmathmisc.la \
maths/poly/libpoly.la \
maths/ni/libni.la \
maths/sparse/libsparse.la \
misc/libmisc.la \
2010-06-13 20:55:18 +02:00
tclspice.lo $(LIBS)
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
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
tclspice.lo: tclspice.c
$(LTCOMPILE) -DTCLSPICE_version="\"$(TCLSPICE_VERSION)\"" -MT tclspice.lo -MD -MP -MF $(DEPDIR)/tclspice.Tpo -c -o tclspice.o $<
mv -f $(DEPDIR)/tclspice.Tpo $(DEPDIR)/tclspice.Plo
2010-06-16 00:39:09 +02:00
endif TCL_MODULE
2010-06-13 20:55:18 +02:00
EXTRA_DIST += spice.def