Claude Sylvain wrote:
Notes: Before I call the make file, I always delete the 2 objects files (main.0 and utl.o), to force GNU make to make the 2 object files.

its common to have a "clean" target that does this

-------------------------------------------------------------------------------
main.o : main.c
 msp430-gcc -mmcu=msp430x149 -g -O2 -c main.c
utl.o : utl.c
 msp430-gcc -mmcu=msp430x149 -g -O2 -c utl.c
-------------------------------------------------------------------------------
Is there something to do to make the GNU make utility execute all the commands ?

yes, add a target that requires all files to build:

all: main.o utl.o

add this as the first target, because that is build when you run "make". others can be built with "make utl.o" etc (what is still missing in the above example is that you should link the objects together...)

there are different styles for make files, you may want to look at the examples on mspgcc.sf.net either in the CVS or in the download section.

chris


Reply via email to