From 60493a315417e996238f24f4375ecef945898fea Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 4 Sep 2024 01:37:29 +0200 Subject: Genesis commit --- Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0972555 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +.POSIX: + +MAKEFLAGS = -j8 + +CFLAGS = -O3 -march=native -mtune=native -pipe -Wall -Wextra -Wpedantic + +target = pinocchio +objs = src/lexer.o src/main.o src/parser.o + +all: $(target) +$(target): $(objs) + $(CC) $(CFLAGS) -o $@ $(objs) + +src/lexer.o: src/lexer.c src/lexer.h src/parser.h +src/main.o: src/main.c src/lexer.h src/parser.h src/pinocchio.h +src/parser.o: src/parser.c src/lexer.h src/parser.h src/pinocchio.h + +src/lexer.c src/lexer.h: src/lexer.l + flex --header-file=src/lexer.h -o src/lexer.c $< + +src/parser.c src/parser.h: src/parser.y + bison -dvo src/parser.c $< + +clean: + rm -f $$(git ls-files -oi --exclude-standard) -- cgit v1.2.3