
88 Cray T3E User’s Guide
Chapter 9
Programming tools
9.1 The make system
The make utility executes commands in a makefile to update one or
more targets, which typically are programs. The make system is mainly
used to maintain programs consisting of several source files. When
some of the source files are modified, the make system recompiles only
the modified files (and those files that depend on the modified files).
Here is a typical makefile:
OBJECTS= func1.o func2.o
OPTS= -O
LIBS= -lnag
all: myprog
myprog: $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
.c.o:
$(CC) -c $(OPTS) $<
clean:
rm -f $(OBJECTS)
rm -f core
rm -f myprog
Each indented line of the makefile should start with a Tab character.
There should also be an empty line at the end.
The Unix command
Komentarze do niniejszej Instrukcji