aboutsummaryrefslogtreecommitdiff
path: root/store/works/life/compile-principle-experiment/3/makefile
blob: cf6333c997ce8e2648f039ab1c4a255fc08fcbe8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
main: main.o lex.o syn.o
	cc lex.o syn.o main.o -o main

main.o: main.c main.h syn.h
	cc -c -o main.o main.c

lex.c: lex.l
	flex  -o lex.c lex.l

lex.o: lex.c syn.h main.h
	cc -c -o lex.o lex.c

syn.c syn.h: syn.y
	bison syn.y -d -o syn.c

syn.o: syn.c syn.h main.h
	cc -c -o syn.o syn.c

PHONY: clean

clean:
	rm -f *.o lex.c syn.c syn.h main