summaryrefslogtreecommitdiff
path: root/yacc
diff options
context:
space:
mode:
authorSébastien Hinderer <Sebastien.Hinderer@inria.fr>2016-08-26 09:05:57 +0200
committerAlain Frisch <alain@frisch.fr>2016-08-26 09:05:57 +0200
commitd917ff6eb30d282d517ee2340222d93096797530 (patch)
treef8948f0fdae83a309d45b76c73f12269addf2fa1 /yacc
parent185a8ac254447daedac10ac389798d802e42eb14 (diff)
downloadocaml-d917ff6eb30d282d517ee2340222d93096797530.tar.gz
Merge Makefile.nt into Makefile in the yacc directory. (#762)
yacc/Makefile has been changed so that it also works on Windows.
Diffstat (limited to 'yacc')
-rw-r--r--yacc/Makefile12
-rw-r--r--yacc/Makefile.nt3
2 files changed, 12 insertions, 3 deletions
diff --git a/yacc/Makefile b/yacc/Makefile
index 6c32474b79..4e58ac735d 100644
--- a/yacc/Makefile
+++ b/yacc/Makefile
@@ -20,6 +20,12 @@ include ../config/Makefile
CC=$(BYTECC)
CFLAGS=-DNDEBUG $(BYTECCCOMPOPTS)
+ifeq "$(TOOLCHAIN)" "mingw"
+ CFLAGS += -DNO_UNIX
+else ifeq "$(TOOLCHAIN)" "msvc"
+ CFLAGS += -DNO_UNIX
+endif
+
OBJS= closure.$(O) error.$(O) lalr.$(O) lr0.$(O) main.$(O) \
mkpar.$(O) output.$(O) reader.$(O) \
skeleton.$(O) symtab.$(O) verbose.$(O) warshall.$(O)
@@ -49,3 +55,9 @@ skeleton.$(O): defs.h
symtab.$(O): defs.h
verbose.$(O): defs.h
warshall.$(O): defs.h
+
+# The following rule is similar to make's default one, except that it
+# also works for .obj files.
+
+%.$(O): %.c
+ $(CC) $(CFLAGS) -c $<
diff --git a/yacc/Makefile.nt b/yacc/Makefile.nt
index 917f48bda3..ed9900bb9a 100644
--- a/yacc/Makefile.nt
+++ b/yacc/Makefile.nt
@@ -14,6 +14,3 @@
#**************************************************************************
include Makefile
-
-%.$(O): %.c
- $(BYTECC) -DNDEBUG -DNO_UNIX $(BYTECCCOMPOPTS) -c $<