Overview
Comment:[ 898904 ] Remove mex dependency for RTW
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: f40162ac3d00e84200b5300f137da8ef3cbf8ef7dd31a0e7029760f65f533a0e
User & Date: geraint@users.sourceforge.net on 2004-02-23 21:47:50
Other Links: branch diff | manifest | tags
Context
2004-02-24
20:37:19
Fixed Architecture. check-in: 1ddde03f1c user: geraint@users.sourceforge.net tags: origin/master, trunk
2004-02-23
21:47:50
[ 898904 ] Remove mex dependency for RTW check-in: f40162ac3d user: geraint@users.sourceforge.net tags: origin/master, trunk
2004-02-20
20:44:37
Force n_vector_bonds to be a column vector. check-in: b4a540438c user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/rep/sfun_rep/Makefile from [2744ac7e63] to [b56d0c54fd].

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
#! /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 $@









|

|
>





|

|
>







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
#! /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 $(MTT_SYS)_def.r
	echo Creating $@
	cat $< | sed 's/<mtt_model_name>/$(MTT_SYS)/g' |\
	sed s/\<have_algebraic_equations\>/`mtt_getsize $(MTT_SYS) yz`/ > $@

$(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 $(MTT_SYS)_def.r
	echo Creating $@
	cat $< | sed 's/<mtt_model_name>/$(MTT_SYS)/g' |\
	sed s/\<have_algebraic_equations\>/`mtt_getsize $(MTT_SYS) yz`/ > $@

$(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 $@

Modified mttroot/mtt/lib/rep/sfun_rep/mex_ae.c.tmpl from [4f1055cb24] to [ca0d3e6d3b].

1
2
3
4
5


6
7
8
9
10
11
12
/* -*-c-*-	Put emacs into c-mode
 * <mtt_model_name>_sfun_ae.c:
 * Matlab mex algebraic equations for <mtt_model_name>
 */



#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <mex.h>
#include "sfun_debug.h"
#include "useful-functions.hh"
#include "<mtt_model_name>_def.h"





>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* -*-c-*-	Put emacs into c-mode
 * <mtt_model_name>_sfun_ae.c:
 * Matlab mex algebraic equations for <mtt_model_name>
 */

#if <have_algebraic_equations> /* have_algebraic_equations */

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <mex.h>
#include "sfun_debug.h"
#include "useful-functions.hh"
#include "<mtt_model_name>_def.h"
112
113
114
115
116
117
118



  PRINT_LEAVE;
}

#ifdef __cplusplus
}
#endif









>
>
114
115
116
117
118
119
120
121
122

  PRINT_LEAVE;
}

#ifdef __cplusplus
}
#endif

#endif /* have_algebraic_equations */

Modified mttroot/mtt/lib/rep/sfun_rep/sfun.c.tmpl from [313e83ce42] to [f43285b0f1].

109
110
111
112
113
114
115

116
117
118
119
120
121
122
  }
  PRINT_LEAVE;
}

static void
update_inputs_from_solver (void)
{

  mxArray *MTT_MATLAB_P;
  mxArray *MTT_MATLAB_T;
  mxArray *MTT_MATLAB_U;
  mxArray *MTT_MATLAB_Ui;
  mxArray *MTT_MATLAB_X;

  double *p;







>







109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
  }
  PRINT_LEAVE;
}

static void
update_inputs_from_solver (void)
{
#if <have_algebraic_equations> /* have_algebraic_equations */
  mxArray *MTT_MATLAB_P;
  mxArray *MTT_MATLAB_T;
  mxArray *MTT_MATLAB_U;
  mxArray *MTT_MATLAB_Ui;
  mxArray *MTT_MATLAB_X;

  double *p;
174
175
176
177
178
179
180


181
182
183
184
185
186
187
  mxDestroyArray (MTT_MATLAB_P);
  mxDestroyArray (MTT_MATLAB_T);
  mxDestroyArray (MTT_MATLAB_U);
  mxDestroyArray (MTT_MATLAB_Ui);
  mxDestroyArray (MTT_MATLAB_X);

  PRINT_LEAVE;


}

static void
update_simtime_from_simulink (SimStruct *S)
{
  PRINT_ENTER;
  mttt = ssGetT (S);







>
>







175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
  mxDestroyArray (MTT_MATLAB_P);
  mxDestroyArray (MTT_MATLAB_T);
  mxDestroyArray (MTT_MATLAB_U);
  mxDestroyArray (MTT_MATLAB_Ui);
  mxDestroyArray (MTT_MATLAB_X);

  PRINT_LEAVE;
#endif /* have_algebraic_equations */
  ;
}

static void
update_simtime_from_simulink (SimStruct *S)
{
  PRINT_ENTER;
  mttt = ssGetT (S);


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