3 ## $Id: Makefile.am,v 1.8 2010-07-29 12:37:18 felix Exp $
7 ## This file is part of "Gnucap", the Gnu Circuit Analysis Package
9 ## Copyright (C) 2005, 2006 Dan McMahill
11 ## This program is free software; you can redistribute it and/or modify
12 ## it under the terms of the GNU General Public License as published by
13 ## the Free Software Foundation; either version 3 of the License, or
14 ## (at your option) any later version.
16 ## This program is distributed in the hope that it will be useful,
17 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ## GNU General Public License for more details.
21 ## You should have received a copy of the GNU General Public License
22 ## along with this program; if not, write to the Free Software
23 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
28 #------------------------------------------------------------------------
29 #------------------------------------------------------------------------
30 # These source files can be omitted, and supplied as plugins.
31 # device models defined in high level .model files
33 d_mos1.model d_mos2.model d_mos3.model \
34 d_mos4.model d_mos5.model d_mos6.model d_mos7.model d_mos8.model \
35 d_mos123.model d_mos_base.model d_mos.model \
36 d_bjt.model d_diode.model
37 #d_rcd.model d_bti.model
39 # device models hand coded in C++
41 d_admit.cc d_cap.cc d_cccs.cc d_ccvs.cc d_coil.cc \
45 d_cs.cc d_poly_g.cc d_poly_cap.cc d_res.cc d_switch.cc \
46 d_trln.cc d_vcg.cc d_vcr.cc d_vcvs.cc d_vs.cc \
49 # matrix_example_LDADD = libgnucap.la
51 # behavioral modeling functions
53 bm_complex.cc bm_exp.cc bm_fit.cc bm_generator.cc \
54 bm_model.cc bm_poly.cc bm_posy.cc bm_pulse.cc bm_pwl.cc bm_sffm.cc \
55 bm_sin.cc bm_tanh.cc bmm_table.cc bmm_semi.cc
57 # utility commands, usually one file per command
58 # some have multiple commands in a file
60 c_clear.cc c_comand.cc c_delete.cc c_exp.cc c_list.cc c_save.cc \
61 c_measure.cc c_modify.cc c_param.cc c_prbcmd.cc c_status.cc \
62 c_sweep.cc c_sim.cc c_system.cc c_for.cc c_printf.cc \
65 # simulation commands, usually multiple files for one command
67 s_ac.cc s_dc.cc s_fo.cc s_sens.cc \
68 s_ddc.cc s_ttt.cc s_tt_set.cc \
69 s_tr.cc s_tr_set.cc s_tr_swp.cc
73 lang_spice.cc lang_spectre.cc lang_verilog.cc
77 func_core.cc measure_eval.cc \
78 measure_max.cc measure_min.cc measure_slewrate.cc measure_cross.cc \
79 measure_integral.cc measure_average.cc measure_rms.cc measure_at.cc
80 #------------------------------------------------------------------------
89 #------------------------------------------------------------------------
91 startup.h md.h ap.h mode.h constant.h declare.h \
92 l_compar.h l_dispatcher.h l_denoise.h \
93 l_lib.h l_stlextra.h l_timer.h \
94 m_cpoly.h m_divdiff.h m_interp.h m_matrix.h m_spline.h m_wave.h \
95 m_base.h m_expression.h m_phase.h \
96 io_.h io_error.h io_trace.h io_matrix.h io_misc.h \
97 u_cardst.h u_function.h u_lang.h u_limit.h u_nodemap.h u_opt.h u_parameter.h \
98 u_prblst.h u_probe.h u_sim_data.h u_sdp.h u_status.h u_time_pair.h u_xprobe.h \
99 s__.h s_tr.h e_adp.h s_tt.h\
100 e_base.h e_card.h e_node.h e_aux.h e_model.h e_compon.h e_subckt.h \
102 e_elemnt.h e_ccsrc.h e_storag.h e_cardlist.h \
103 d_coment.h d_dot.h d_logic.h d_subckt.h \
105 c_comand.h globals.h extlib.h d_cap.h m_matrix_extra.h \
106 u_sock.h s_ddc.h u_atlas.h
108 noinst_HEADERS = d_coil.h
109 #------------------------------------------------------------------------
110 ## The modelgen generated files
111 MODELSRCS= ${MODELS:.model=.cc} ${MODELS:.model=.h}
113 # extlib_o_SOURCES = extlib.h
115 plugindir_transformed = ${libdir}/$(shell echo gnucap | sed -e "$(transform)")
116 plugindir = $(plugindir_transformed)
119 MODELCODE= ${MODELS:.model=.cc}
120 MODELHDR= ${MODELS:.model=.h}
122 MODELOBJS= ${MODELS:.model=.${OBJEXT}}
124 EXTRA_PROGRAMS = m_matrix_example
125 m_matrix_example_SOURCES = m_matrix_example.cc # io.cc io_error.cc
126 m_matrix_example_CPPFLAGS = $(AM_CPPFLAGS)
132 # make all of the model object files depend on all of the model sources
133 # this is a bit overkill, but for example the bjt model makes use of the
134 # diode model and we want to be sure and capture that dependency
136 ${MODELOBJS}: ${MODELSRCS}
138 ## Include the .model files in the distfile as well as the rest of the
139 ## non-generated sources
141 EXTRA_DIST= ${MODELS} ${SRCS1} ${SRCS2} \
142 test_readline.cc spice-wrapper.cc \
145 GNUCAP_MAKE=$(shell echo gnucap.mk | sed -e '$(transform)')
147 noinst_SCRIPTS = gnucap
148 bin_PROGRAMS = gnucap.real
149 transform=s&\.real$$&&;$(program_transform_name)
150 gnucap_real_SOURCES = ${SRCS2} startup.cc main.cc ${SRCS1} ${MODELSRCS}
152 gnucap_real_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
153 gnucap_real_CPPFLAGS+= $(AM_CPPFLAGS) -DGNUCAP_MAKE=\"$(GNUCAP_MAKE)\"
155 #for now (ddc). fix later
156 gnucap_real_LDFLAGS = $(LAPACK_LIBS)
158 gnucap_real_LDADD = ../lib/libgnucap-uf.la
159 #libgnucap_la_CFLAGS = $(AM_CFLAGS)
162 includedir_transformed = ${includedir}/$(shell echo gnucap | sed -e "$(transform)")
163 libgnucap_includedir = $(includedir_transformed)
164 libgnucap_include_HEADERS = ${RAW_HDRS} spice-wrapper.cc
166 #gnucap_include_HEADERS = ${RAW_HDRS}
168 gnucap_includedir = $(pkgincludedir)
171 ### Clean out the modelgen generated files
172 CLEANFILES = ${MODELSRCS}
174 ## Suffix rules for modelgen.
180 MAKEDEPEND = gcc -M $(CPPFLAGS) -o $*.d $<
182 %.cc : %.model %.h ${MODELGEN}${EXEEXT}
185 # #############################################
187 %.h : %.model ${MODELGEN}${EXEEXT}
190 $(D_IVL_O): CPPFLAGS+= IVL_CPPFLAGS
192 # FIXME: -I iverilog only for .v stuff
194 .DELETE_ON_ERROR: *.cc
196 # include $(srcdir)/depend
201 # ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ -f tags .
203 .PRECIOUS: %.cc %.h %.hxx
204 #------------------------------------------------------------------------
205 #------------------------------------------------------------------------
206 EXTRA_DIST += c_expect.cc
209 # embers of vvp attempts. sort out later