#$Id: Make1,v 26.22 2007/03/29 16:54:05 al Exp $ -*- Makefile -*- # Copyright (C) 2001 Albert Davis # Author: Albert Davis # # This file is part of "Gnucap", the Gnu Circuit Analysis Package # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. #------------------------------------------------------------------------ TARGET = gnucap #------------------------------------------------------------------------ DELETED = \ d_dot.cc d_dot.h #------------------------------------------------------------------------ # These source files can be omitted, and supplied as plugins. # device models defined in high level .model files MODELS = \ d_mos1.model d_mos2.model d_mos3.model \ d_mos4.model d_mos5.model d_mos6.model d_mos7.model d_mos8.model \ d_mos123.model d_mos_base.model d_mos.model \ d_bjt.model d_diode.model # device models hand coded in C++ D_SRCS = \ d_admit.cc d_cap.cc d_cccs.cc d_ccvs.cc d_coil.cc d_coment.cc \ d_cs.cc d_logic.cc d_logicmod.cc d_poly_g.cc d_poly_cap.cc \ d_res.cc d_switch.cc d_trln.cc d_vcr.cc d_vcvs.cc d_vs.cc # behavioral modeling functions BM_SRCS = \ bm_complex.cc bm_exp.cc bm_fit.cc bm_generator.cc \ bm_poly.cc bm_posy.cc bm_pulse.cc bm_pwl.cc bm_sffm.cc \ bm_sin.cc bm_tanh.cc bmm_table.cc bmm_semi.cc # utility commands, usually one file per command # some have multiple commands in a file C_SRCS = \ c_clear.cc c_comand.cc c_delete.cc c_getckt.cc c_list.cc c_modify.cc \ c_param.cc c_prbcmd.cc c_status.cc c_sweep.cc c_sim.cc c_system.cc # simulation commands, usually multiple files for one command S_SRCS = \ s_ac.cc s_ac_set.cc s_ac_slv.cc s_ac_swp.cc \ s_dc.cc s_dc_set.cc s_dc_swp.cc \ s_tr.cc s_tr_rev.cc s_tr_set.cc s_tr_swp.cc \ s_fo.cc s_fo_out.cc s_fo_set.cc #------------------------------------------------------------------------ RAW_SRCS = \ $(D_SRCS) \ $(BM_SRCS) \ $(C_SRCS) \ $(S_SRCS) \ md.cc \ ap_construct.cc ap_convert.cc ap_error.cc ap_get.cc ap_match.cc ap_skip.cc \ l_ftos.cc l_pmatch.cc l_timer.cc l_trim.cc l_wmatch.cc \ m_fft.cc m_spline.cc \ io.cc io_contr.cc io_error.cc io_findf.cc io_getln.cc io_out.cc io_xopen.cc \ u_lang.cc u_nodemap.cc u_opt1.cc u_opt2.cc u_parameter.cc \ u_prblst.cc u_probe.cc u_sdp.cc u_xprobe.cc \ s__.cc s__aux.cc s__init.cc s__map.cc s__out.cc s__solve.cc \ d_subckt.cc \ e_base.cc e_card.cc e_node.cc e_model.cc e_compon.cc e_subckt.cc \ e_elemnt.cc e_ccsrc.cc e_storag.cc e_cardlist.cc \ bm_model.cc bm_value.cc bm_cond.cc bm.cc \ c__cmd.cc c_attach.cc c_file.cc c_genrat.cc \ findbr.cc plot.cc main.cc globals.cc #------------------------------------------------------------------------ RAW_HDRS = \ md.h ap.h mode.h constant.h declare.h patchlev.h \ l_compar.h l_dispatcher.h l_denoise.h l_jmpbuf.h \ l_lib.h l_stlextra.h l_timer.h \ m_cpoly.h m_divdiff.h m_interp.h m_matrix.h m_spline.h m_wave.h \ io_.h io_error.h io_trace.h \ u_cardst.h u_lang.h u_limit.h u_nodemap.h u_opt.h u_parameter.h \ u_prblst.h u_probe.h u_sdp.h u_status.h u_xprobe.h \ s__.h s_ac.h s_dc.h s_fo.h s_tr.h \ e_base.h e_card.h e_node.h e_aux.h e_model.h e_compon.h e_subckt.h \ e_elemnt.h e_ccsrc.h e_storag.h e_cardlist.h \ d_logic.h d_subckt.h \ bm.h \ c_comand.h #------------------------------------------------------------------------ RAW_OTHER = \ configure.old Make1 test_readline.cc \ Make3 Makefile.template Make2.g++ Make2.Debug Make2.mingw32 \ Makefile.am #------------------------------------------------------------------------ RAW = $(RAW_HDRS) $(RAW_SRCS) $(MODELS) $(RAW_OTHER) #------------------------------------------------------------------------ #------------------------------------------------------------------------ IMPORTED_SRCS = IMPORTED_HDRS = IMPORTED_OTHER = Makefile.in IMPORTED = $(IMPORTED_SRCS) $(IMPORTED_HDRS) $(IMPORTED_OTHER) #------------------------------------------------------------------------ #------------------------------------------------------------------------ GENERATED_SRCS = ${MODELS:.model=.cc} GENERATED_HDRS = ${MODELS:.model=.h} GENERATED_OTHER = Make.aux GENERATED = $(GENERATED_HDRS) $(GENERATED_SRCS) $(GENERATED_OTHER) #------------------------------------------------------------------------ #------------------------------------------------------------------------ GENERATED_DIST = Make.depend IMPORTED_DIST = $(IMPORTED) DISTFILES = $(RAW) $(GENERATED_DIST) $(IMPORTED_DIST) #------------------------------------------------------------------------ #------------------------------------------------------------------------ SRCS = $(IMPORTED_SRCS) $(GENERATED_SRCS) $(RAW_SRCS) HDRS = $(RAW_HDRS) $(GENERATED_HDRS) $(IMPORTED_HDRS) OBJS = ${SRCS:.cc=.o} TARGET_DEPENDS = $(OBJS) $(RAW) $(MODELS) #------------------------------------------------------------------------ #------------------------------------------------------------------------ MOSTLYCLEANFILES = $(OBJS) $(GENERATED) CLEANFILES = $(MOSTLYCLEANFILES) DISTCLEANFILES = $(CLEANFILES) MAINTAINERCLEANFILES = $(DISTCLEANFILES) #------------------------------------------------------------------------ #------------------------------------------------------------------------ all: $(TARGET) #------------------------------------------------------------------------ #------------------------------------------------------------------------ %.h : %.model gnucap-modelgen ./gnucap-modelgen -h $< #------------------------------------------------------------------------ %.cc : %.model gnucap-modelgen ./gnucap-modelgen -cc $< #----------------------------------------------------------------------------- #-----------------------------------------------------------------------------