]> thyrsus.com Git - cupl.git/commitdiff
Initial revision
authorEric S. Raymond <esr@thyrsus.com>
Thu, 3 Nov 1994 00:09:23 +0000 (00:09 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 3 Nov 1994 00:09:23 +0000 (00:09 +0000)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
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 <tokens.h >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