From 99e2e923d0c77b02f3fb4ff648ea916954868606 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 28 Feb 2025 23:13:39 +0800 Subject: chore(store): move everything to store. --- .../life/compile-principle-experiment/3/makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 store/works/life/compile-principle-experiment/3/makefile (limited to 'store/works/life/compile-principle-experiment/3/makefile') diff --git a/store/works/life/compile-principle-experiment/3/makefile b/store/works/life/compile-principle-experiment/3/makefile new file mode 100644 index 0000000..cf6333c --- /dev/null +++ b/store/works/life/compile-principle-experiment/3/makefile @@ -0,0 +1,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 -- cgit v1.2.3