From fbe39f58fc0d757f8ffe54c6dc96bbc690862ded Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Mon, 30 Sep 2019 01:56:15 +0100 Subject: Initial commit --- Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..56b2f72 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +CC = c++ + +CFLAGS += -x c --std=c99 -Wpedantic -Wall -Werror + +CFLAGS += $(shell llvm-config --cppflags) +LDFLAGS += $(shell llvm-config --ldflags) +LDLIBS += $(shell llvm-config --libs core analysis bitwriter --system-libs) + +.PHONY: default all clean +default: all +all: basic +basic: basic.o parse.o lex.o + +basic.o lex.o: parse.h basic.h +parse.o: basic.h + +parse.h: parse.y + $(YACC) -d -o /dev/null $< + mv -f y.tab.h $@ + +clean: + $(RM) basic y.tab.* *.o lex.c parse.c parse.h -- cgit v1.2.1