Overview
Comment: | Fixed [ 647664 ] Namespace clash: LANG Prepended MTT_ to SYS, OPTS and LANG environment variables. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
43c2af3a70cf04525afa85f93bed8fc8 |
User & Date: | geraint@users.sourceforge.net on 2002-12-12 17:18:43 |
Other Links: | branch diff | manifest | tags |
Context
2002-12-12
| ||
17:23:27 | Fixed [ 647664 ] Namespace clash: LANG check-in: 57a87aa7c5 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
17:18:43 |
Fixed [ 647664 ] Namespace clash: LANG Prepended MTT_ to SYS, OPTS and LANG environment variables. check-in: 43c2af3a70 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
16:07:13 |
Fix for [ 547513 ] Re-written to eliminate need for installation. Single C++ file (cxxsim.cc) handles the entire transformation which is automatically compiled on invocation by "mtt sys cxxsim view". check-in: 7a95f8d106 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/mtt from [9374ebd6b2] to [3f0717501a].
︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Copyright (C) 2001 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ ## Revision 1.366 2002/12/06 21:56:21 geraint ## Cosmetic change: removed commented-out lines. ## ## Revision 1.365 2002/12/06 12:45:25 gawthrop ## Simplified rule for sub.sh: both fig and dia go via cmp.txt now. ## ## Revision 1.364 2002/12/03 23:28:44 geraint | > > > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # Copyright (C) 2001 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ ## Revision 1.367 2002/12/09 00:14:08 geraint ## Hierarchical dia and mixed dia/fig bond graphs now working. ## ## Revision 1.366 2002/12/06 21:56:21 geraint ## Cosmetic change: removed commented-out lines. ## ## Revision 1.365 2002/12/06 12:45:25 gawthrop ## Simplified rule for sub.sh: both fig and dia go via cmp.txt now. ## ## Revision 1.364 2002/12/03 23:28:44 geraint |
︙ | ︙ | |||
2205 2206 2207 2208 2209 2210 2211 | filename=$1_$2.$3 fi #if [ -f "$filename" ]; then # echo $filename exists #else if [ -n "$Verbose" ]; then | | | | 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 | filename=$1_$2.$3 fi #if [ -f "$filename" ]; then # echo $filename exists #else if [ -n "$Verbose" ]; then echo make -s -f $2_rep.make "MTT_SYS=$1" "MTT_LANG=$3" "MTT_ARG=$4" "MTT_OPTS=$mtt_switches" fi make -s -f $2_rep.make "MTT_SYS=$1" "MTT_LANG=$3" "MTT_ARG=$4" "MTT_OPTS=$mtt_switches" if [ -n "$4" ]; then echo Copying $1_$2$__ARGS.$ps cp $1_$2$__ARGS.$ps .. fi #fi exit fi |
︙ | ︙ |
Modified mttroot/mtt/lib/rep/cxxsim_rep.make from [6f40ee19ab] to [e3ace4cec8].
︙ | ︙ | |||
16 17 18 19 20 21 22 | CC=g++ INCLUDE=-I. -I${MTT_LIB}/cr/hh OPTIMISE=-O0 WARNINGS=-Wall -ansi -pedantic | | | | | | | | | | | | | | | | | | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | CC=g++ INCLUDE=-I. -I${MTT_LIB}/cr/hh OPTIMISE=-O0 WARNINGS=-Wall -ansi -pedantic all: $(MTT_SYS)_cxxsim.$(MTT_LANG) # view rule copied from gnuplot_rep.make # need it here to prevent MTT using the default route (via dae) $(MTT_SYS)_cxxsim.view: $(MTT_SYS)_gnuplot.wish $(MTT_SYS)_cxxsim.exe ./$(MTT_SYS)_cxxsim.exe > $(MTT_SYS)_odes.dat2 sh $(MTT_SYS)_gnuplot.wish |\ tee gnuplot_in.log |\ gnuplot -geometry 400x300 \ > gnuplot_out.log 2> gnuplot_err.log & $(MTT_SYS)_cxxsim.exe: $(MTT_SYS)_cxxsim.cc echo Creating $(MTT_SYS)_cxxsim.exe $(CC) -o $@ $^ $(OPTIMISE) $(WARNINGS) $(INCLUDE) $(MTT_SYS)_cxxsim.cc: $(MTT_SYS)_cr.txt $(MTT_SYS)_ese.r $(MTT_SYS)_struc.txt $(MTT_SYS)_sympar.txt cxxsim ./cxxsim $(MTT_SYS) cp $@ .. cxxsim: ${MTT_LIB}/rep/cxxsim.cc echo creating $@ echo Compiling $^ $(CC) -o $@ $^ $(OPTIMISE) $(WARNINGS) $(INCLUDE) # list of constitutive relationships $(MTT_SYS)_cr.txt: mtt -q $(MTT_OPTS) $(MTT_SYS) cr txt # elementary system equations $(MTT_SYS)_ese.r: mtt -q $(MTT_OPTS) $(MTT_SYS) ese r # system structure $(MTT_SYS)_struc.txt: mtt -q $(MTT_OPTS) $(MTT_SYS) struc txt # list of symbolic parameters $(MTT_SYS)_sympar.txt: mtt -q $(MTT_OPTS) $(MTT_SYS) sympar txt # gnuplot script $(MTT_SYS)_gnuplot.wish: mtt -q $(MTT_OPTS) $(MTT_SYS) gnuplot wish |
Modified mttroot/mtt/lib/rep/gnuplot_rep.make from [654748f69a] to [e302751500].
1 2 3 | # -*-makefile-*- # create a gnuplot input file | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # -*-makefile-*- # create a gnuplot input file MTTFLAGS = $(MTT_OPTS) all: $(MTT_SYS)_gnuplot.$(MTT_LANG) $(MTT_SYS)_gnuplot.view: $(MTT_SYS)_gnuplot.wish mtt $(MTT_OPTS) $(MTT_SYS) odes dat2 sh $(MTT_SYS)_gnuplot.wish |\ tee gnuplot_in.log |\ gnuplot -geometry 400x300 \ > gnuplot_out.log 2> gnuplot_err.log & $(MTT_SYS)_gnuplot.wish: $(MTT_SYS)_struc.txt $(MTTPATH)/trans/struc2gnuplot_txt2wish $(MTT_SYS) $(MTT_SYS)_struc.txt: mtt $(MTTFLAGS) $(MTT_SYS) struc txt |
Modified mttroot/mtt/lib/rep/ident_rep.make from [a0d4f73f87] to [7792e45e2b].
1 2 3 4 5 6 7 8 9 10 11 12 | # -*-makefile-*- #SUMMARY Identification #DESCRIPTION Partially know system identification using #DESCRIPTION using bond graphs # Makefile for representation ident # File ident_rep.make #Copyright (C) 2000,2001,2002 by Peter J. Gawthrop ## Model targets | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | # -*-makefile-*- #SUMMARY Identification #DESCRIPTION Partially know system identification using #DESCRIPTION using bond graphs # Makefile for representation ident # File ident_rep.make #Copyright (C) 2000,2001,2002 by Peter J. Gawthrop ## Model targets model_reps = ${MTT_SYS}_sympar.m ${MTT_SYS}_simpar.m ${MTT_SYS}_state.m model_reps += ${MTT_SYS}_numpar.m ${MTT_SYS}_input.m ${MTT_SYS}_ode2odes.m model_reps += ${MTT_SYS}_def.m ## Prepend s to get the sensitivity targets sensitivity_reps = ${model_reps:%=s%} ## Model prerequisites model_pre = ${MTT_SYS}_abg.fig ${MTT_SYS}_lbl.txt model_pre += ${MTT_SYS}_rdae.r ${MTT_SYS}_numpar.txt ## Prepend s to get the sensitivity targets sensitivity_pre = ${model_pre:%=s%} ## Simulation targets sims = ${MTT_SYS}_sim.m s${MTT_SYS}_ssim.m ## m-files needed for ident ident_m = ${MTT_SYS}_ident.m ${MTT_SYS}_ident_numpar.m ## Targets for the ident simulation ident_reps = ${ident_m} ${sims} ${model_reps} ${sensitivity_reps} ## ps output files etc psfiles = ${MTT_SYS}_ident.ps ${MTT_SYS}_ident.comparison.ps figfiles = ${psfiles:%.ps=%.fig} gdatfiles = ${psfiles:%.ps=%.gdat} datfiles = ${psfiles:%.ps=%.dat2} ## LaTeX files etc latexfiles = ${MTT_SYS}_ident_par.tex all: ${MTT_SYS}_ident.${MTT_LANG} echo: echo "sims: ${sims}" echo "model_reps: ${model_reps}" echo "sensitivity_reps: ${sensitivity_reps}" echo "ident_reps: ${ident_reps}" ${MTT_SYS}_ident.view: ${psfiles} ident_rep.sh ${MTT_SYS} view ${psfiles}: ${figfiles} ident_rep.sh ${MTT_SYS} ps ${figfiles}: ${gdatfiles} ident_rep.sh ${MTT_SYS} fig ${gdatfiles}: ${datfiles} ident_rep.sh ${MTT_SYS} gdat ${datfiles} ${latexfiles}: ${ident_reps} ident_rep.sh ${MTT_SYS} dat2 ${MTT_SYS}_ident.m: ident_rep.sh ${MTT_SYS} m ${MTT_SYS}_ident_numpar.m: ident_rep.sh ${MTT_SYS} numpar.m ## System model reps ## Generic txt files ${MTT_SYS}_%.txt: mtt ${MTT_OPTS} -q -stdin ${MTT_SYS} $* txt ## Specific m files ${MTT_SYS}_ode2odes.m: ${model_pre} mtt -q -stdin ${MTT_OPTS} ${MTT_SYS} ode2odes m ${MTT_SYS}_sim.m: ${MTT_SYS}_ode2odes.m mtt ${MTT_OPTS} -q -stdin ${MTT_SYS} sim m ## Numpar files ${MTT_SYS}_numpar.m: mtt ${MTT_SYS} numpar m ## Sympar files ${MTT_SYS}_sympar.m: mtt ${MTT_SYS} sympar m ## Generic txt to m ${MTT_SYS}_%.m: ${MTT_SYS}_%.txt mtt ${MTT_OPTS} -q -stdin ${MTT_SYS} $* m ## r files ${MTT_SYS}_def.r: ${MTT_SYS}_abg.fig mtt ${MTT_OPTS} -q -stdin ${MTT_SYS} def r ${MTT_SYS}_rdae.r: mtt ${MTT_OPTS} -q -stdin ${MTT_SYS} rdae r ## Sensitivity model reps ## Generic txt files s${MTT_SYS}_%.txt: mtt ${MTT_OPTS} -q -stdin -s s${MTT_SYS} $* txt ## Specific m files ## Numpar files s${MTT_SYS}_numpar.m: mtt -s s${MTT_SYS} numpar m ## Sympar files s${MTT_SYS}_sympar.m: mtt -s s${MTT_SYS} sympar m s${MTT_SYS}_ode2odes.m: ${sensitivity_pre} mtt -q -stdin ${MTT_OPTS} -s s${MTT_SYS} ode2odes m s${MTT_SYS}_ssim.m: mtt -q -stdin ${MTT_OPTS} -s s${MTT_SYS} ssim m s${MTT_SYS}_def.m: mtt -q -stdin ${MTT_OPTS} -s s${MTT_SYS} def m ## Generic txt to m s${MTT_SYS}_%.m: s${MTT_SYS}_%.txt mtt ${MTT_OPTS} -q -stdin s${MTT_SYS} $* m ## r files s${MTT_SYS}_rdae.r: mtt ${MTT_OPTS} -q -stdin -s s${MTT_SYS} rdae r |
Modified mttroot/mtt/lib/rep/ippp_rep.make from [aaaaecfa67] to [093030e2cb].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # -*-makefile-*- # Makefile for representation ippp - ppp system identification # File ippp_rep.make ###################################### ##### Model Transformation Tools ##### ###################################### ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.3 2001/04/11 07:52:45 gawthrop ## Temporary fix to avoid incorrect _input.cc with stdin ## ## Revision 1.2 2001/04/05 11:49:07 gawthrop ## Fixed a number of bugs to as to work with reports. ## ## Revision 1.1 2001/04/04 10:05:38 gawthrop ## Reresentation for system identification for ppp ## ############################################################### #Copyright (C) 2000 by Peter J. Gawthrop | > > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | # -*-makefile-*- # Makefile for representation ippp - ppp system identification # File ippp_rep.make ###################################### ##### Model Transformation Tools ##### ###################################### ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.4 2001/04/23 15:06:21 gawthrop ## Removed stdin bug workaround ## ## Revision 1.3 2001/04/11 07:52:45 gawthrop ## Temporary fix to avoid incorrect _input.cc with stdin ## ## Revision 1.2 2001/04/05 11:49:07 gawthrop ## Fixed a number of bugs to as to work with reports. ## ## Revision 1.1 2001/04/04 10:05:38 gawthrop ## Reresentation for system identification for ppp ## ############################################################### #Copyright (C) 2000 by Peter J. Gawthrop all: $(MTT_SYS)_ippp.$(MTT_LANG) $(MTT_SYS)_ippp.view: $(MTT_SYS)_ippp.pdf acroread *.pdf $(MTT_SYS)_ippp.ps: $(MTT_SYS)_parameters.ps $(MTT_SYS)_error.ps $(MTT_SYS)_outputs.ps $(MTT_SYS)_ippp.pdf cp $(MTT_SYS)_parameters.ps $(MTT_SYS)_ippp.ps $(MTT_SYS)_ippp.pdf: $(MTT_SYS)_parameters.pdf $(MTT_SYS)_error.pdf $(MTT_SYS)_outputs.pdf cp $(MTT_SYS)_parameters.pdf $(MTT_SYS)_ippp.pdf $(MTT_SYS)_parameters.ps: s$(MTT_SYS)_ode2odes.m s$(MTT_SYS)_ssim.m $(MTT_SYS)_ippp.m s$(MTT_SYS)_sympar.m s$(MTT_SYS)_simpar.m octave $(MTT_SYS)_ippp.m $(MTT_SYS)_error.ps: $(MTT_SYS)_parameters.ps touch $(MTT_SYS)_error.ps $(MTT_SYS)_outputs.ps: $(MTT_SYS)_parameters.ps touch $(MTT_SYS)_outputs.ps $(MTT_SYS)_parameters.pdf: s$(MTT_SYS)_ode2odes.m s$(MTT_SYS)_ssim.m $(MTT_SYS)_ippp.m s$(MTT_SYS)_sympar.m s$(MTT_SYS)_simpar.m octave $(MTT_SYS)_ippp.m $(MTT_SYS)_error.pdf: $(MTT_SYS)_parameters.pdf touch $(MTT_SYS)_error.pdf $(MTT_SYS)_outputs.pdf: $(MTT_SYS)_parameters.pdf touch $(MTT_SYS)_outputs.pdf s$(MTT_SYS)_ode2odes.m: echo Starting creation of s$(MTT_SYS)_ode2odes.m with options $(MTT_OPTS) mtt -q $(MTT_OPTS) -stdin -s s$(MTT_SYS) ode2odes oct s$(MTT_SYS)_ssim.m: s$(MTT_SYS)_def.m mtt -q $(MTT_OPTS) -s s$(MTT_SYS) ssim m s$(MTT_SYS)_sympar.m: mtt -q $(MTT_OPTS) -s s$(MTT_SYS) sympar m s$(MTT_SYS)_simpar.m: mtt -q $(MTT_OPTS) -s s$(MTT_SYS) simpar m s$(MTT_SYS)_def.m: mtt -q $(MTT_OPTS) -s s$(MTT_SYS) def m |
Modified mttroot/mtt/lib/rep/nppp_rep.make from [0545d82e23] to [53790be183].
1 2 3 4 5 6 7 8 9 10 11 | # -*-makefile-*- #SUMMARY Nonlinear pole-placement predictive control (nPPP) #DESCRIPTION # Makefile for representation nppp # File nppp_rep.make #Copyright (C) 2000,2001,2002 by Peter J. Gawthrop ## Model targets | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | # -*-makefile-*- #SUMMARY Nonlinear pole-placement predictive control (nPPP) #DESCRIPTION # Makefile for representation nppp # File nppp_rep.make #Copyright (C) 2000,2001,2002 by Peter J. Gawthrop ## Model targets model_reps = ${MTT_SYS}_sympar.m ${MTT_SYS}_simpar.m ${MTT_SYS}_state.m model_reps += ${MTT_SYS}_numpar.m ${MTT_SYS}_input.m ${MTT_SYS}_ode2odes.m model_reps += ${MTT_SYS}_def.m ## Prepend s to get the sensitivity targets sensitivity_reps = ${model_reps:%=s%} ## Simulation targets sims = ${MTT_SYS}_sim.m s${MTT_SYS}_ssim.m ## m-files needed for nppp nppp_m = ${MTT_SYS}_nppp.m ${MTT_SYS}_nppp_numpar.m ## Targets for the nppp simulation nppp_reps = ${nppp_m} ${sims} ${model_reps} ${sensitivity_reps} ## ps output files psfiles = ${MTT_SYS}_nppp.ps ${MTT_SYS}_nppp.basis.ps ${MTT_SYS}_nppp.par.ps ${MTT_SYS}_nppp.U.ps figfiles = ${psfiles:%.ps=%.fig} all: ${MTT_SYS}_nppp.${MTT_LANG} echo: echo "sims: ${sims}" echo "model_reps: ${model_reps}" echo "sensitivity_reps: ${sensitivity_reps}" echo "nppp_reps: ${nppp_reps}" ${MTT_SYS}_nppp.view: ${MTT_SYS}_nppp.ps nppp_rep.sh ${MTT_SYS} view ${psfiles}: ${MTT_SYS}_nppp.fig nppp_rep.sh ${MTT_SYS} ps ${MTT_SYS}_nppp.gdat: ${MTT_SYS}_nppp.dat2 nppp_rep.sh ${MTT_SYS} gdat ${MTT_SYS}_nppp.fig ${MTT_SYS}_nppp.dat2: ${nppp_reps} nppp_rep.sh ${MTT_SYS} dat2 ${MTT_SYS}_nppp.m: nppp_rep.sh ${MTT_SYS} m ${MTT_SYS}_nppp_numpar.m: nppp_rep.sh ${MTT_SYS} numpar.m ## System model reps ## Generic txt files ${MTT_SYS}_%.txt: mtt ${MTT_OPTS} -q -stdin ${MTT_SYS} $* txt ## Specific m files ${MTT_SYS}_ode2odes.m: ${MTT_SYS}_rdae.r mtt -q -stdin ${MTT_OPTS} ${MTT_SYS} ode2odes m ${MTT_SYS}_sim.m: ${MTT_SYS}_ode2odes.m mtt ${MTT_OPTS} -q -stdin ${MTT_SYS} sim m ## Generic txt to m ${MTT_SYS}_%.m: ${MTT_SYS}_%.txt mtt ${MTT_OPTS} -q -stdin ${MTT_SYS} $* m ## r files ${MTT_SYS}_def.r: ${MTT_SYS}_abg.fig mtt ${MTT_OPTS} -q -stdin ${MTT_SYS} def r ${MTT_SYS}_rdae.r: mtt ${MTT_OPTS} -q -stdin ${MTT_SYS} rdae r ## Sensitivity model reps ## Generic txt files s${MTT_SYS}_%.txt: mtt ${MTT_OPTS} -q -stdin s${MTT_SYS} $* txt ## Specific m files s${MTT_SYS}_ode2odes.m: s${MTT_SYS}_rdae.r mtt -q -stdin ${MTT_OPTS} -s s${MTT_SYS} ode2odes m s${MTT_SYS}_ssim.m: mtt -q -stdin ${MTT_OPTS} -s s${MTT_SYS} ssim m s${MTT_SYS}_def.m: mtt -q -stdin ${MTT_OPTS} -s s${MTT_SYS} def m ## Generic txt to m s${MTT_SYS}_%.m: s${MTT_SYS}_%.txt mtt ${MTT_OPTS} -q -stdin s${MTT_SYS} $* m ## r files s${MTT_SYS}_rdae.r: mtt ${MTT_OPTS} -q -stdin -s s${MTT_SYS} rdae r |
Modified mttroot/mtt/lib/rep/sfun_rep.make from [47318c59e0] to [a81b02cdc5].
1 2 | # -*-makefile-*- | < < | | 1 2 3 4 | # -*-makefile-*- all: ${MTT_REP}/sfun_rep.sh "$(MTT_OPTS)" "$(MTT_SYS)" "$(MTT_LANG)" |
Modified mttroot/mtt/lib/rep/sfun_rep.sh from [fe83bc4dd5] to [4e120748b1].
︙ | ︙ | |||
1375 1376 1377 1378 1379 1380 1381 | ### main program set_debug false check_for_valid_input "$*" | | | 1375 1376 1377 1378 1379 1380 1381 1382 1383 | ### main program set_debug false check_for_valid_input "$*" MTT_OPTS="$1" MTT_SYS="$2" MTT_LANG="$3" make $make_debug -f ${MTT_REP}/sfun_rep/Makefile ${2}_sfun.${3} exit 0 |
Modified mttroot/mtt/lib/rep/sfun_rep/Makefile from [f386a128ec] to [974e36d4ad].
1 2 | #! /usr/bin/make -f | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | #! /usr/bin/make -f all: $(MTT_SYS)_sfun.mexglx $(MTT_SYS)_sfun.mexglx: $(MTT_SYS)_sfun.c sfun_debug.h useful-functions.hh $(MTT_SYS)_def.h $(MTT_SYS)_sympar.h $(MTT_SYS)_cr.h $(MTT_SYS)_numpar.c $(MTT_SYS)_ode.c $(MTT_SYS)_odeo.c $(MTT_SYS)_state.c $(MTT_SYS)_sfun_ae.mexglx $(MTT_SYS)_sfun_input.mexglx $(MTT_SYS)_sfun_interface.mexglx $(MTT_SYS).mdl echo Creating $@ mex $(MTT_SYS)_sfun.c cp *_sfun*mexglx $(MTT_SYS).mdl .. $(MTT_SYS)_sfun.c:: ${MTT_REP}/sfun_rep/sfun.c.tmpl echo Creating $@ cat $^ | sed 's/<mtt_model_name>/$(MTT_SYS)/g' > $@ $(MTT_SYS)_sfun_ae.mexglx: $(MTT_SYS)_sfun_ae.c sfun_debug.h useful-functions.hh $(MTT_SYS)_def.h $(MTT_SYS)_sympar.h $(MTT_SYS)_cr.h $(MTT_SYS)_ae.c echo Creating $@ mex $(MTT_SYS)_sfun_ae.c $(MTT_SYS)_sfun_ae.c:: ${MTT_REP}/sfun_rep/mex_ae.c.tmpl echo Creating $@ cat $^ | sed 's/<mtt_model_name>/$(MTT_SYS)/g' > $@ $(MTT_SYS)_sfun_input.mexglx: $(MTT_SYS)_sfun_input.c sfun_debug.h useful-functions.hh $(MTT_SYS)_def.h $(MTT_SYS)_sympar.h $(MTT_SYS)_cr.h $(MTT_SYS)_input.c $(MTT_SYS)_numpar.c echo Creating $@ mex $(MTT_SYS)_sfun_input.c $(MTT_SYS)_sfun_input.c:: ${MTT_REP}/sfun_rep/sfun_input.c.tmpl echo Creating $@ cat $^ | sed 's/<mtt_model_name>/$(MTT_SYS)/g' > $@ $(MTT_SYS)_sfun_interface.mexglx: $(MTT_SYS)_sfun_interface.c sfun_debug.h useful-functions.hh $(MTT_SYS)_def.h $(MTT_SYS)_sympar.h $(MTT_SYS)_numpar.c echo Creating $@ mex $(MTT_SYS)_sfun_interface.c $(MTT_SYS)_sfun_interface.c: ${MTT_REP}/sfun_rep/sfun_interface.c.tmpl $(MTT_SYS)_struc.c echo Creating $@ cat ${MTT_REP}/sfun_rep/sfun_interface.c.tmpl |\ sed 's/<mtt_model_name>/$(MTT_SYS)/g' |\ ${MTT_REP}/sfun_rep/insert_file.sh > $@ $(MTT_SYS)_sfun.zip: $(MTT_SYS)_sfun.c sfun_debug.h useful-functions.hh $(MTT_SYS)_sfun_ae.c $(MTT_SYS)_sfun_input.c $(MTT_SYS)_sfun_interface.c \ $(MTT_SYS)_def.h $(MTT_SYS)_sympar.h $(MTT_SYS)_cr.h\ $(MTT_SYS)_ae.c $(MTT_SYS)_input.c $(MTT_SYS)_numpar.c $(MTT_SYS)_ode.c $(MTT_SYS)_odeo.c $(MTT_SYS)_state.c \ $(MTT_SYS).mdl README echo Creating $@ zip $@ $^ $(MTT_SYS).mdl: ${MTT_REP}/sfun_rep/mdl.tmpl echo Creating $@ cat $^ | sed 's/<mtt_model_name>/$(MTT_SYS)/g' > $@ README:: ${MTT_REP}/sfun_rep/README.tmpl README.CVS echo Creating $@ cat $^ | sed 's/<mtt_model_name>/$(MTT_SYS)/g' > $@ rm -f README.CVS README.CVS: echo Getting CVS status cvs status ../$(MTT_SYS)_abg.fig > $@ 2>1 date >> $@ $(MTT_SYS)_ae.c: $(MTT_SYS)_ae.m echo Creating $@ ${MTT_CC}/mtt_m2cc.sh $(MTT_SYS) ae c cat $(MTT_SYS)_input.c: $(MTT_SYS)_input.m echo Creating $@ ${MTT_CC}/mtt_m2cc.sh $(MTT_SYS) input c cat $(MTT_SYS)_numpar.c: $(MTT_SYS)_numpar.m echo Creating $@ ${MTT_CC}/mtt_m2cc.sh $(MTT_SYS) numpar c cat $(MTT_SYS)_ode.c: $(MTT_SYS)_ode.m echo Creating $@ ${MTT_CC}/mtt_m2cc.sh $(MTT_SYS) ode c cat $(MTT_SYS)_odeo.c: $(MTT_SYS)_odeo.m echo Creating $@ ${MTT_CC}/mtt_m2cc.sh $(MTT_SYS) odeo c cat $(MTT_SYS)_state.c: $(MTT_SYS)_state.m echo Creating $@ ${MTT_CC}/mtt_m2cc.sh $(MTT_SYS) state c cat $(MTT_SYS)_struc.c: $(MTT_SYS)_struc.txt echo Creating $@ gawk '\ ($$1 == "input") { printf " double *%s\t= &(mttu[%d]);\t/* input and output */\n", $$4, $$2-1 }\ ($$1 == "state") { printf " const double *_%s\t= &(mttx[%d]);\t/* input */\n", $$4, $$2-1 }\ ($$1 == "output") { printf " const double *_%s\t= &(mtty[%d]);\t/* input */\n", $$4, $$2-1 }\ ($$1 != "input" && $$1 != "state" && $$1 != "output") { }\ ' $^ > $@ sfun_debug.h:: ${MTT_REP}/sfun_rep/sfun_debug.h echo Copying $@ cp $^ $@ useful-functions.hh:: ${MTT_CC}/include/useful-functions.hh echo Copying $@ cp $^ $@ %:: mtt -q $(MTT_OPTS) `echo $* | sed 's/\(.*\)_\(.*\)\.\(.*\)/\1 \2 \3/'` |