aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
diff options
authorLinus Torvalds <torvalds@home.transmeta.com>2003-03-19 11:49:17 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 20:59:28 -0700
commit2edd2ccf82c7f9c4271f0a9a4ce7bfc605fb3fe0 (patch)
treefc6bfc83339a0a520f3472e6796043ba6f29f069 /Makefile
parent611b19ae7a2f851615097e0d09a14423211ef6ad (diff)
downloadsparse-dev-2edd2ccf82c7f9c4271f0a9a4ce7bfc605fb3fe0.tar.gz
Clean up makefile, add more dependencies.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 12 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 4316d2d3..b089c2d8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,23 @@
+CC=gcc
CFLAGS=-g -Wall
PROGRAMS=test-lexing test-parsing
+HEADERS=token.h parse.h lib.h symbol.h
+COMMON=parse.o tokenize.o pre-process.o symbol.o lib.o
all: $(PROGRAMS)
-test-lexing: test-lexing.o parse.o tokenize.o pre-process.o symbol.o lib.o
- gcc -o $@ test-lexing.o parse.o tokenize.o pre-process.o symbol.o lib.o
+test-lexing: test-lexing.o $(COMMON)
+ gcc -o $@ $< $(COMMON)
-test-parsing: test-parsing.o parse.o tokenize.o symbol.o pre-process.o lib.o
- gcc -o $@ test-parsing.o parse.o tokenize.o symbol.o pre-process.o lib.o
+test-parsing: test-parsing.o $(COMMON)
+ gcc -o $@ $< $(COMMON)
-test-parsing.o: token.h parse.h
-test-lexing.o: token.h
-tokenize.o: token.h
-parse.o: token.h parse.h
-symbol.o: symbol.h token.h parse.h
+test-parsing.o: $(HEADERS)
+test-lexing.o: $(HEADERS)
+tokenize.o: $(HEADERS)
+parse.o: $(HEADERS)
+symbol.o: $(HEADERS)
clean:
rm -f *.[oasi] core core.[0-9]* $(PROGRAMS)