How to compile and link all files generated with RTW from my .tmf file ??

2 views (last 30 days)
Hi,
I'm generating a target and all his files. In the .tmf file I need to compile and link all the generated files in the "model directory", because they are not always the same
Thanks in advance.

Answers (1)

Kaustubha Govind
Kaustubha Govind on 27 Mar 2012
It's not clear exactly what kind of support you are looking for, but Customize Template Makefiles is a good place to start. I would also recommend familiarizing yourself with Makefiles first. A good beginner exercise is to actually modify the generated .mk file directly and test it until you achieve all your required build steps. Once this is done, it is fairly easy to update the corresponding.tmf file.
  4 Comments
Carlos
Carlos on 2 Apr 2012
My problem is that I use a external compiler and linker:
LINK32=link.exe
And to generate the dll I need to pass the names of the .obj to the linker. For this reason, I think if I could concatenate "$(INTDIR)\" to all files in the macro |>MODEL_MODULES_OBJ<|, it could automatically link any model with different source files
Carlos
Carlos on 3 Apr 2012
Or is posible to use this type of commands:
SRCS = $(REQ_SRCS) $(USER_SRCS) $(S_FUNCTIONS)
OBJS_CPP_UPPER = $(SRCS:.CPP=.obj)
OBJS_CPP_LOWER = $(OBJS_CPP_UPPER:.cpp=.obj)
OBJS_C_UPPER = $(OBJS_CPP_LOWER:.C=.obj)
OBJS = $(OBJS_C_UPPER:.c=.obj)
SHARED_OBJS = $(SHARED_SRC:.c=.obj)
with a external linker?

Sign in to comment.

Categories

Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!