From 5eeb355805e0d5d91981dbe7eacb078f41da0437 Mon Sep 17 00:00:00 2001 From: Felix Perktold Date: Sat, 20 Dec 2025 21:59:28 +0100 Subject: init 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..2dc8a02 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +LEX = flex +YACC = bison +CC = gcc -g +CFLAGS = -DYYDEBUG=1 +LIBS = -lreadline -lfl -lm + +lisp: lisp.c lisp.tab.o lex.yy.o + $(CC) $(CFLAGS) -o $@ lisp.c lisp.tab.o lex.yy.o $(LIBS) + +lisp.tab.c lisp.tab.h: lisp.y + $(YACC) -d lisp.y + +lex.yy.c: lisp.l lisp.tab.h + $(LEX) --header-file=lex.yy.h lisp.l + +lisp.tab.o: lisp.tab.c + $(CC) $(CFLAGS) -c lisp.tab.c + +lex.yy.o: lex.yy.c + $(CC) $(CFLAGS) -c lex.yy.c + +clean: + rm -f *.o lisp lisp.tab.c lisp.tab.h lex.yy.c lex.yy.h + +.PHONY: clean -- cgit v1.2.3