Differences From Artifact [d9222d6191]:

To Artifact [c272bb180d]:


13
14
15
16
17
18
19



20
21
22
23
24
25
26
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.396  2004/08/29 02:59:30  geraint
## Added -make-sort option and rules to generate simulation using sesx and sesy.
##
## Revision 1.395  2004/08/28 23:48:06  geraint
## Removed dependency of ae.r on cse.r if -ae is not specified as an option.
## This prevents an implicit -A and thus removes a dependency on cse
## (and hence Reduce) for sorted systems.
##
## Revision 1.394  2004/08/28 22:14:12  geraint
## Removed -ibg option: now the default method.
1863
1864
1865
1866
1867
1868
1869
1870

1871
1872
1873
1874
1875
1876
1877
1866
1867
1868
1869
1870
1871
1872

1873
1874
1875
1876
1877
1878
1879
1880







-
+







  rm -f *_logic.m *_logic.cc *_logic.oct
  rm -f *_state.m *_state.cc *_state.oct
  rm -f *_ode2odes.* *.dat2 MTT.core
  rm -f *_modpar.txt *_modpar.r
  rm -f *_ICD.txt *_ICD.c *_ICD.cc *_ICD.m
  rm -f *_ae.r *_ae.m *_ae.cc *_ae.oct
  rm -f *_sese.r *_sese.m
  rm -f *_sese.make *_sesx.* *_sesy.*
  rm -f *_sese.make *_sesx.* *_sesy.* _sae.*
  rm -fR *_rep MTT_work
  exit
fi

# Clean up named system
if [ "$2" = "Clean" ] && [ "$3" = "" ]; then
  echo 'Removing all generated files for system ' $1
1906
1907
1908
1909
1910
1911
1912
1913

1914
1915
1916
1917
1918
1919
1920
1909
1910
1911
1912
1913
1914
1915

1916
1917
1918
1919
1920
1921
1922
1923







-
+







  rm -f $1_logic.m $1_logic.cc $1_logic.oct 
  rm -f $1_state.m $1_state.cc $1_state.oct
  rm -f $1_ode2odes.* $1.dat2
  rm -f $1_modpar.txt $1_modpar.r
  rm -f $1_ICD.txt $1_ICD.c $1_ICD.cc $1_ICD.m
  rm -f $1_ae.r $1_ae.m $1_ae.cc $1_ae.oct
  rm -f $1_sese.r $1_sese.m
  rm -f $1_sese.make $1_sesx.* $1_sesy.*
  rm -f $1_sese.make $1_sesx.* $1_sesy.* $1_sae.*
  rm -fR $1_rep MTT_work
  exit
fi

if [ "$2" = "rep" ]; then
     documenttype=article
      # See if we are making a book -- ie representation rep on a directory
2603
2604
2605
2606
2607
2608
2609
2610


2611
2612
2613
2614
2615
2616
2617
2606
2607
2608
2609
2610
2611
2612

2613
2614
2615
2616
2617
2618
2619
2620
2621







-
+
+







ifneq ($use_sorted_equations,make)
$1_sympar.h: $1_sympar.txt
	sympar_txt2h.sh $1 $num_tmp_var
else
$1_sympar.h: $1_sympar.txt $1_sese.make
	sympar_txt2h.sh $1 $num_tmp_var
	declaration="static double" \
	make -f $1_sese.make declare_tmpvars >> \$@
	make -f $1_sese.make declare_tmpvars |\
	tr [A-Z] [a-z] >> \$@
endif

#SUMMARY sympar	symbolic parameters (c)
# txt to c sympar conversion
$1_sympar.c: $1_sympar.txt
	sympar_txt2c $1

2739
2740
2741
2742
2743
2744
2745

2746
2747
2748
2749
2750







2751
2752
2753
2754
2755
2756
2757
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769







+





+
+
+
+
+
+
+







else
	mtt_update $1 logic
endif

# Dummy target
FORCE:

ifeq ($use_sorted_equations,)
$1_ode2odes_common_%.stamp: $1_ae.% $1_input.% $1_logic.% $1_numpar.% $1_simpar.% $1_state.%
	touch \$@
$1_ode2odes_common.o: $1_ae.o $1_input.o $1_logic.o $1_numpar.o $1_simpar.o $1_state.o
	@echo "Creating $1_ode2odes_common.o"
	ar -cr \$@ \$^
else
$1_ode2odes_common_%.stamp: $1_sae.% $1_input.% $1_logic.% $1_numpar.% $1_simpar.% $1_state.%
	touch \$@
$1_ode2odes_common.o: $1_sae.o $1_input.o $1_logic.o $1_numpar.o $1_simpar.o $1_state.o
	@echo "Creating $1_ode2odes_common.o"
	ar -cr \$@ \$^
endif

ifeq ($use_sorted_equations,)
$1_ode2odes_euler_%.stamp $1_ode2odes_rk4_%.stamp: $1_ode.% $1_odeo.%
	touch \$@
$1_ode2odes_euler.o $1_ode2odes_rk4.o: $1_ode.o $1_odeo.o mtt_euler.o
	@echo "Creating \$@"
	ar -cr \$@ \$^
2765
2766
2767
2768
2769
2770
2771

2772
2773
2774
2775
2776
2777
2778
2779
2780











2781
2782
2783
2784
2785
2786
2787
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811







+









+
+
+
+
+
+
+
+
+
+
+








$1_ode2odes_implicit_%.stamp: $1_cseo.% $1_csex.% $1_smxa.% $1_smxax.%
	touch \$@
$1_ode2odes_implicit.o: $1_cseo.o $1_csex.o $1_smxa.o $1_smxax.o mtt_implicit.o
	@echo "Creating $1_ode2odes_implicit.o"
	ar -cr \$@ \$^

ifeq ($use_sorted_equations,)
$1_ode2odes_dassl_oct.stamp: $1_ode.oct $1_odeo.oct mtt_dassl.oct
	touch \$@
$1_ode2odes_dassl_o.stamp: $1_ode.o $1_odeo.o mtt_dassl.o
	touch \$@
$1_ode2odes_dassl_%.stamp: $1_ode.% $1_odeo.%
	touch \$@
$1_ode2odes_dassl.o: $1_ode.o $1_odeo.o mtt_dassl.o
	@echo "Creating \$@"
	ar -cr \$@ \$^
else
$1_ode2odes_dassl_oct.stamp: $1_sesx.oct $1_sesy.oct mtt_dassl.oct
	touch \$@
$1_ode2odes_dassl_o.stamp: $1_sesx.o $1_sesy.o mtt_dassl.o
	touch \$@
$1_ode2odes_dassl_%.stamp: $1_sesx.% $1_sesy.%
	touch \$@
$1_ode2odes_dassl.o: $1_sesx.o $1_sesy.o mtt_dassl.o
	@echo "Creating \$@"
	ar -cr \$@ \$^
endif

$1_ode2odes_${algebraic_solver}.cc:	mtt_Solver.cc mtt_AlgebraicSolver.cc mtt_${algebraic_solver}.hh mtt_${algebraic_solver}.cc

$1_ode2odes_${algebraic_solver}.o:	mtt_Solver.o  mtt_AlgebraicSolver.o  mtt_${algebraic_solver}.o
	@echo "Creating $1_ode2odes_${algebraic_solver}.o"
	ar -cr \$@ \$^

2948
2949
2950
2951
2952
2953
2954




2955
2956
2957
2958
2959
2960




2961
2962
2963

2964
2965
2966
2967
2968
2969
2970
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003







+
+
+
+






+
+
+
+



+







# sorted equations generated by make
${sys}_sesx.m: ${sys}_def.r ${sys}_sesx.r ${sys}_sympar.txt
	echo Creating \$@
	mtt_r2m ${sys} sesx m
${sys}_sesy.m: ${sys}_def.r ${sys}_sesy.r ${sys}_sympar.txt
	echo Creating \$@
	mtt_r2m ${sys} sesy m
${sys}_sae.m: ${sys}_def.r ${sys}_sae.r ${sys}_sympar.txt
	echo Creating \$@
	mtt_r2m ${sys} sae m

${sys}_sesx.r: ${sys}_sese.make
	echo Creating \$@
	make -f \$< MTTdX > \$@
${sys}_sesy.r: ${sys}_sese.make
	echo Creating \$@
	make -f \$< MTTy > \$@
${sys}_sae.r: ${sys}_sese.make
	echo Creating \$@
	make -f \$< MTTyz > \$@

${sys}_sese.make: ${sys}_ese.r
	echo Creating \$@
	ese_r2make.pl --sys=${sys} --outfile=\$@ --$debug


$1_def.r: $1_ese.r
	touch $1_def.r
$1_struc.txt: $1_ese.r
	touch $1_struc.txt
$1_aliased.txt: $1_ese.r
	touch $1_aliased.txt

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]