[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Automatically removed temporary object files
From: |
Frank |
Subject: |
Automatically removed temporary object files |
Date: |
Thu, 5 Jun 2008 08:45:50 -0700 (PDT) |
User-agent: |
G2/1.0 |
I've a problem that temporary object files are deleted, which I do not
want.
Example:
Makefile:
OBJECTS = A.o B.o C.o
%.exe: %.c $(OBJECTS)
gcc $< $(OBJECTS) -o $@
%.o: %.c
gcc -c $< -o $@
Calling:
$ make test.exe
results in:
gcc -c A.c -o A.o
gcc -c B.c -o B.o
gcc -c C.c -o C.o
gcc test.c A.o B.o C.o -o test.exe
rm A.o B.o C.o
Please, watch the last line: There is an 'rm' which I did not write in
the makefile.
How can I disable that? It does not make sense to compiler A, B, and C
over and over again if test.c changes.
Best Regards
Frank.
- Automatically removed temporary object files,
Frank <=