Compiling Generated C Code : Supplementing the Rational Statemate Model with C Code

Supplementing the Rational Statemate Model with C Code

When supplementing the Rational Statemate model with handwritten C code, the additional compilation statements will be automatically added to the User_Makefile. This file is produced when the code is generated.

The following is an example of the User_Makefile for ANSI C generated code.

CC = acc
OBJECTS = user_activities_out.o
CFLAGS = -o -ansi -pedantic -Wstrict-prototypes
-I$STM_ROOT/etc/prt/ansic
-I$STM_ROOT/etc/prt/ansisched
all : out_lib.a
out_lib.a : $(objects)
ar rvu out_lib.a $(objects)
ranlib out_lib.a

Add all objects that require compiling to the elements list.