forked from HaxeFoundation/haxe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.win
37 lines (27 loc) · 1.05 KB
/
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
33
34
35
36
37
include Makefile
OUTPUT=haxe.exe
EXTENSION=.exe
OCAMLOPT=ocamlopt.opt
ifneq ($(ADD_REVISION),0)
VERSION_EXTRA=let version_extra = Some " (git build $(shell git rev-parse --abbrev-ref HEAD) @ $(shell git describe --always)) "
else
VERSION_EXTRA=let version_extra = None
endif
kill:
-@taskkill /F /IM haxe.exe
# 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
ifeq (${MSVC}, 1)
NATIVE_LIBS = shell32.lib libs/extc/extc_stubs.obj libs/extc/zlib/zlib.lib libs/objsize/c_objsize.obj
endif
ifeq (${MSVC_OUTPUT}, 1)
FILTER=sed 's/File "\([^"]\+\)", line \([0-9]\+\), \(.*\)/\1(\2): \3/' tmp.cmi
endif
ifeq (${FD_OUTPUT}, 1)
FILTER=sed '/File/{ N; s/File "\([^"]\+\)", line \([0-9]\+\), characters \([0-9-]\+\):[\r\n]*\(.*\)/\1:\2: characters \3 : \4/ }' tmp.cmi
endif
ifdef FILTER
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