|
@@ -4,10 +4,19 @@ OUTPUT=haxe.exe
|
|
|
|
|
|
OCAMLOPT=ocamlopt.opt
|
|
|
|
|
|
+# allow Ocaml/Mingw as well
|
|
|
+NATIVE_LIBS += -I "c:/program files/mingw/lib/"
|
|
|
+
|
|
|
+# use make MSVC=1 -f Makefile.win to build for OCaml/MSVC
|
|
|
+# this will also convert the error messages to Visual Studio output format
|
|
|
+
|
|
|
+ifeq (${MSVC}, 1)
|
|
|
NATIVE_LIBS = shell32.lib libs/extc/extc_stubs.obj libs/extc/zlib/zlib.lib
|
|
|
+MSVC_OUTPUT=1
|
|
|
+endif
|
|
|
|
|
|
+ifeq (${MSVC_OUTPUT}, 1)
|
|
|
FILTER=sed 's/File "\([^"]\+\)", line \([0-9]\+\), \(.*\)/\1(\2): \3/' tmp.cmi
|
|
|
-
|
|
|
CC_CMD=($(OCAMLOPT) $(CFLAGS) -c $< 2>tmp.cmi && $(FILTER)) || ($(FILTER) && exit 1)
|
|
|
CC_PARSER_CMD=($(OCAMLOPT) -pp camlp4o $(CFLAGS) -c parser.ml 2>tmp.cmi && $(FILTER)) || ($(FILTER) && exit 1)
|
|
|
-
|
|
|
+endif
|