summaryrefslogtreecommitdiff
path: root/mk/lexyacc.mk
diff options
context:
space:
mode:
authorOri Bernstein <ori@odin.theasylum>2011-11-05 01:32:46 -0400
committerOri Bernstein <ori@odin.theasylum>2011-11-05 01:34:58 -0400
commit76d42756c93a7f8e1519268b8eb693ba36db4652 (patch)
treecd51bfe84f24f8aba6fd4aaf0885cb03b0e13f73 /mk/lexyacc.mk
downloadmc-76d42756c93a7f8e1519268b8eb693ba36db4652.tar.gz
Initial commit
Diffstat (limited to 'mk/lexyacc.mk')
-rw-r--r--mk/lexyacc.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/mk/lexyacc.mk b/mk/lexyacc.mk
new file mode 100644
index 0000000..8d104f6
--- /dev/null
+++ b/mk/lexyacc.mk
@@ -0,0 +1,9 @@
+NECFLAGS = $(subst -Werror,,$(subst -Wall,,$(CFLAGS)))
+
+%.o: %.y .deps
+ yacc -d -o$*.c $<
+ $(CC) -c $(NECFLAGS) $*.c
+
+%.o: %.l .deps
+ flex -o$*.c $<
+ $(CC) -c $(NECFLAGS) $*.c