Software Code Generator Overview : User Supplemented Files : Supplementing the C Code

Supplementing the C Code

When supplementing the generated code with user additions, it is important to add the additional compilation statements to 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.

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. If you add any libraries, add them to the user_libs file.