summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNat Lasseter <Nat Lasseter nathan@bytemark.co.uk>2017-06-11 22:50:09 +0100
committerNat Lasseter <Nat Lasseter nathan@bytemark.co.uk>2017-06-11 22:50:09 +0100
commitd43994ebc260ea0ad6cd82c929059a44f998a782 (patch)
treed78dd42544cc86372636bf85c13539fee1897822 /Makefile
Initial CommitHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2f08bc7
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+P=ocml
+
+${P}: ${P}.tab.o lex.yy.o
+ gcc -o $@ $^ -lfl
+
+%.o: %.c ${P}.tab.h
+ gcc -c $^
+
+${P}.tab.h: ${P}.y
+ bison -d ${P}.y
+
+lex.yy.c: ${P}.l
+ flex ${P}.l
+
+${P}.tab.c: ${P}.y
+ bison ${P}.y
+
+clean:
+ rm -f *.tab.* *.yy.* ${P}