From: Eric S. Raymond Date: Thu, 3 Nov 1994 00:09:23 +0000 (+0000) Subject: Initial revision X-Git-Tag: 1-2~105 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=272373a410a6df48802f0d73b3b80aff3bc7070a;p=cupl.git Initial revision --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fa3db53 --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +# +# Makefile for the CUPL project +# +CUPLDIR = . # Not presently used -- will be if we implement the compiler + +YFLAGS = -vlt +CFLAGS = -g -D_POSIX_SOURCE -DYYDEBUG=1 -DPARSEDEBUG + +SOURCES = cupl.[ylh] tokdump.c main.c interpret.c + +cupl: main.o grammar.o lexer.o interpret.o tokdump.o + $(CC) main.o grammar.o lexer.o interpret.o tokdump.o -o cupl + +lexer.c: cupl.l + lex $(LFLAGS) cupl.l + mv lex.yy.c lexer.c + +grammar.c tokens.h y.output: cupl.y + $(YACC) $(YFLAGS) -d cupl.y + @echo "expect: conflicts: 5 shift/reduce" + mv y.tab.c grammar.c + mv y.tab.h tokens.h + +tokdump.o: tokdump.c toktab.h +lexer.o: lexer.c cupl.h + +toktab.h: tokens.h + awk toktab.h '/^#/ {print $$3 ", \"" $$3 "\","}' + +lextest: lexer.c tokens.h tokdump.o + $(CC) $(CFLAGS) -DMAIN lexer.c tokdump.o -o lextest + +clean: + rm -f cupl *~ *.o toktab.h tokens.h grammar.c lexer.c lextest y.output