Adding STM Code Modules : Sample Code Module : Modified Makefile

Modified Makefile

The following shows the makefile that has been modified to work with handwritten code.

all : my_main

 

CC = cc

 

OBJECTS = \

example.o \

my_main.o

CFLAGS = -g -I$$STM_ROOT/etc/prt/c -I$$STM_ROOT/etc/sched -DPRT -Dsparc

 

out_lib.a : $(OBJECTS)

ar rvu out_lib.a $(OBJECTS)

ranlib out_lib.a

 

my_main : out_lib.a Makefile

$(CC) $(CFLAGS) -o $@ \

my_main.o example.o \

-L$$STM_ROOT/lib -lintrinsics -lscheduler -lm

 

my_main.o :

 

example.o : example.h