From 27556004e8e12a72ed1c2c70212f6b660ed798c3 Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 2 Dec 2021 21:59:36 +0800 Subject: import(life): ... --- works/life/compile-principle-experiment/4/makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 works/life/compile-principle-experiment/4/makefile (limited to 'works/life/compile-principle-experiment/4/makefile') diff --git a/works/life/compile-principle-experiment/4/makefile b/works/life/compile-principle-experiment/4/makefile new file mode 100644 index 0000000..756cdcb --- /dev/null +++ b/works/life/compile-principle-experiment/4/makefile @@ -0,0 +1,22 @@ +main: main.o lex.o syn.o + cc -g lex.o syn.o main.o -o main + +main.o: main.c main.h syn.h + cc -g -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 -g -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 -g -c -o syn.o syn.c + +PHONY: clean + +clean: + rm -f *.o lex.c syn.c syn.h main -- cgit v1.2.3