Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Build a simulink model with RTW with s-function
Date: Fri, 6 Nov 2009 11:51:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 14
Message-ID: <hd12j6$r88$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257508262 27912 172.30.248.38 (6 Nov 2009 11:51:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 6 Nov 2009 11:51:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2079977
Xref: news.mathworks.com comp.soft-sys.matlab:582985


I have a simple simulink model model containing an s-function that refers to a c file called SG_c.c.

I build RT windows target. I get the following error

gmake: *** No rule to make target `SG_c.obj', needed by `../rtwinIdent1.rwd'.  Stop. 

So I compile SG_c.c by hand whith the following command line:
wcc386 -fo=SG_c.obj -wcd=202 -wcd=302 -wcd=400 -wcd=1180 -zq -ei -zp8 -6r -fpi87 -zl -wx  -oneatxh  -DEXT_MODE -DUSE_RTMODEL -DMODEL=rtwinIdent1 -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DMT=0 -D__OBSCURE_STREAM_INTERNALS  -I.;..;F:\PROGRA~1\MATLAB\R2008b\simulink\include;F:\PROGRA~1\MATLAB\R2008b\extern\include;F:\PROGRA~1\MATLAB\R2008b\rtw\c\src;F:\PROGRA~1\MATLAB\R2008b\rtw\c\src\ext_mode\common;F:\PROGRA~1\MATLAB\R2008b\toolbox\rtw\targets\rtwin\src;F:\PROGRA~1\MATLAB\R2008b\toolbox\rtw\targets\rtwin\openwat\include;<etc...> SG_c.c 

after that step all works.

How can I configure RTW builder to include SG_c.c in sources list, to make it comile automagically?

thanks