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
|
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
|
-
+
-
+
-
+
-
+
|
#! /usr/bin/make -f
all: $(SYS)_sfun.mexglx
$(SYS)_sfun.mexglx: $(SYS)_sfun.c sfun_debug.h useful-functions.hh $(SYS)_def.h $(SYS)_sympar.h $(SYS)_numpar.c $(SYS)_ode.c $(SYS)_odeo.c $(SYS)_state.c $(SYS)_sfun_ae.mexglx $(SYS)_sfun_input.mexglx $(SYS)_sfun_interface.mexglx $(SYS).mdl
$(SYS)_sfun.mexglx: $(SYS)_sfun.c sfun_debug.h useful-functions.hh $(SYS)_def.h $(SYS)_sympar.h $(SYS)_cr.h $(SYS)_numpar.c $(SYS)_ode.c $(SYS)_odeo.c $(SYS)_state.c $(SYS)_sfun_ae.mexglx $(SYS)_sfun_input.mexglx $(SYS)_sfun_interface.mexglx $(SYS).mdl
echo Creating $@
mex $(SYS)_sfun.c
cp *_sfun*mexglx $(SYS).mdl ..
$(SYS)_sfun.c:: ${MTT_REP}/sfun_rep/sfun.c.tmpl
echo Creating $@
cat $^ | sed 's/<mtt_model_name>/$(SYS)/g' > $@
$(SYS)_sfun_ae.mexglx: $(SYS)_sfun_ae.c sfun_debug.h useful-functions.hh $(SYS)_def.h $(SYS)_sympar.h $(SYS)_ae.c
$(SYS)_sfun_ae.mexglx: $(SYS)_sfun_ae.c sfun_debug.h useful-functions.hh $(SYS)_def.h $(SYS)_sympar.h $(SYS)_cr.h $(SYS)_ae.c
echo Creating $@
mex $(SYS)_sfun_ae.c
$(SYS)_sfun_ae.c:: ${MTT_REP}/sfun_rep/mex_ae.c.tmpl
echo Creating $@
cat $^ | sed 's/<mtt_model_name>/$(SYS)/g' > $@
$(SYS)_sfun_input.mexglx: $(SYS)_sfun_input.c sfun_debug.h useful-functions.hh $(SYS)_def.h $(SYS)_sympar.h $(SYS)_input.c $(SYS)_numpar.c
$(SYS)_sfun_input.mexglx: $(SYS)_sfun_input.c sfun_debug.h useful-functions.hh $(SYS)_def.h $(SYS)_sympar.h $(SYS)_cr.h $(SYS)_input.c $(SYS)_numpar.c
echo Creating $@
mex $(SYS)_sfun_input.c
$(SYS)_sfun_input.c:: ${MTT_REP}/sfun_rep/sfun_input.c.tmpl
echo Creating $@
cat $^ | sed 's/<mtt_model_name>/$(SYS)/g' > $@
$(SYS)_sfun_interface.mexglx: $(SYS)_sfun_interface.c sfun_debug.h useful-functions.hh $(SYS)_def.h $(SYS)_sympar.h $(SYS)_numpar.c
echo Creating $@
mex $(SYS)_sfun_interface.c
$(SYS)_sfun_interface.c: ${MTT_REP}/sfun_rep/sfun_interface.c.tmpl $(SYS)_struc.c
echo Creating $@
cat ${MTT_REP}/sfun_rep/sfun_interface.c.tmpl |\
sed 's/<mtt_model_name>/$(SYS)/g' |\
${MTT_REP}/sfun_rep/insert_file.sh > $@
$(SYS)_sfun.zip: $(SYS)_sfun.c sfun_debug.h useful-functions.hh $(SYS)_sfun_ae.c $(SYS)_sfun_input.c $(SYS)_sfun_interface.c \
$(SYS)_def.h $(SYS)_sympar.h \
$(SYS)_def.h $(SYS)_sympar.h $(SYS)_cr.h\
$(SYS)_ae.c $(SYS)_input.c $(SYS)_numpar.c $(SYS)_ode.c $(SYS)_odeo.c $(SYS)_state.c \
$(SYS).mdl README
echo Creating $@
zip $@ $^
$(SYS).mdl: ${MTT_REP}/sfun_rep/mdl.tmpl
echo Creating $@
|