Pārlūkot izejas kodu

allow usage of OCaml MingW or Cygwin (by default)
still allow visual studio with MSVC=1

Nicolas Cannasse 13 gadi atpakaļ
vecāks
revīzija
ab05dbd254
1 mainītis faili ar 11 papildinājumiem un 2 dzēšanām
  1. 11 2
      Makefile.win

+ 11 - 2
Makefile.win

@@ -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