forked from HaxeFoundation/haxe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.win
32 lines (23 loc) · 955 Bytes
/
Makefile.win
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
include Makefile
OUTPUT=haxe.exe
EXTENSION=.exe
OCAMLOPT=ocamlopt.opt
kill:
-@taskkill /F /IM haxe.exe 2>/dev/null
# allow Ocaml/Mingw as well
NATIVE_LIBS += -I "c:/program files/mingw/lib/"
LINEMERGE_FILTER=sed -n "/^File/!{H; bp; b; }; /^File/ bp; :p; { x; s/\n/ /g; p; }"
# 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/"
CC_CMD=$(OCAMLOPT) $(CFLAGS) -c $< 2>&1 | $(LINEMERGE_FILTER) | $(FILTER) 1>&2
CC_PARSER_CMD=$(OCAMLOPT) -pp camlp4o $(CFLAGS) -c parser.ml 2>&1 | $(LINEMERGE_FILTER) | $(FILTER) 1>&2
endif
ifeq (${FD_OUTPUT}, 1)
FILTER=sed "s/File \"\(.*\?\)\", line \([0-9]\+\), characters \([0-9-]\+\):\(.*\)/\1:\2: characters \3 : \4/"
endif