forked from HaxeFoundation/haxe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
144 lines (94 loc) · 4.22 KB
/
Makefile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# Haxe compiler Makefile
#
# - use 'make' to build all
# - use 'make haxe' to build only the compiler (not the libraries)
# - if you want to build quickly, install 'ocamlopt.opt' and change OCAMLOPT=ocamlopt.top
#
# Windows users :
# - use 'make -f Makefile.win' to build for Windows
# - use 'make MSVC=1 -f Makefile.win' to build for Windows with OCaml/MSVC
#
.SUFFIXES : .ml .mli .cmo .cmi .cmx .mll .mly
OUTPUT=haxe
EXTENSION=
OCAMLOPT=ocamlopt
CFLAGS= -g -I libs/extlib -I libs/extc -I libs/neko -I libs/javalib -I libs/ziplib -I libs/swflib -I libs/xml-light
CC_CMD = $(OCAMLOPT) $(CFLAGS) -c $<
CC_PARSER_CMD = $(OCAMLOPT) -pp camlp4o $(CFLAGS) -c parser.ml
LIBS=unix.cmxa str.cmxa libs/extlib/extLib.cmxa libs/xml-light/xml-light.cmxa libs/swflib/swflib.cmxa \
libs/extc/extc.cmxa libs/neko/neko.cmxa libs/javalib/java.cmxa libs/ziplib/zip.cmxa
NATIVE_LIBS=-cclib libs/extc/extc_stubs.o -cclib -lz
RELDIR=../../..
EXPORT=../../../projects/motionTools/haxe
MODULES=ast type lexer common genxml parser typecore optimizer typeload \
codegen genas3 gencommon gencpp genjs genneko genphp genswf8 \
gencs genjava genswf9 genswf interp typer dce main
HAXE_LIBRARY_PATH=$(CURDIR)/std
all: libs haxe tools
libs:
make -C libs/extlib opt
make -C libs/extc native
make -C libs/neko
make -C libs/javalib
make -C libs/ziplib
make -C libs/swflib
make -C libs/xml-light xml-light.cmxa
haxe: $(MODULES:=.cmx)
$(OCAMLOPT) -o $(OUTPUT) $(NATIVE_LIBS) $(LIBS) $(MODULES:=.cmx)
haxelib:
$(CURDIR)/$(OUTPUT) --cwd "$(CURDIR)/std/tools/haxelib" haxelib.hxml
cp std/tools/haxelib/haxelib$(EXTENSION) haxelib$(EXTENSION)
haxedoc:
$(CURDIR)/$(OUTPUT) --cwd "$(CURDIR)/std/tools/haxedoc" haxedoc.hxml
cp std/tools/haxedoc/haxedoc$(EXTENSION) haxedoc$(EXTENSION)
tools: haxelib haxedoc
export:
cp haxe*.exe doc/CHANGES.txt $(EXPORT)
rsync -a --exclude .svn --exclude *.n --exclude std/libs --delete std $(EXPORT)
codegen.cmx: typeload.cmx typecore.cmx type.cmx genxml.cmx common.cmx ast.cmx
common.cmx: type.cmx ast.cmx
dce.cmx: ast.cmx common.cmx type.cmx typecore.cmx
genas3.cmx: type.cmx common.cmx codegen.cmx ast.cmx
gencommon.cmx: type.cmx common.cmx codegen.cmx ast.cmx
gencpp.cmx: type.cmx lexer.cmx common.cmx codegen.cmx ast.cmx
gencs.cmx: type.cmx lexer.cmx gencommon.cmx common.cmx codegen.cmx ast.cmx
genjava.cmx: type.cmx gencommon.cmx common.cmx codegen.cmx ast.cmx
genjs.cmx: type.cmx optimizer.cmx lexer.cmx common.cmx codegen.cmx ast.cmx
genneko.cmx: type.cmx lexer.cmx common.cmx codegen.cmx ast.cmx
genphp.cmx: type.cmx lexer.cmx common.cmx codegen.cmx ast.cmx
genswf.cmx: type.cmx genswf9.cmx genswf8.cmx common.cmx ast.cmx
genswf8.cmx: type.cmx lexer.cmx common.cmx codegen.cmx ast.cmx
genswf9.cmx: type.cmx lexer.cmx genswf8.cmx common.cmx codegen.cmx ast.cmx
genxml.cmx: type.cmx lexer.cmx common.cmx ast.cmx
interp.cmx: typecore.cmx type.cmx lexer.cmx genneko.cmx common.cmx codegen.cmx ast.cmx genswf.cmx parser.cmx
main.cmx: dce.cmx typer.cmx typeload.cmx typecore.cmx type.cmx parser.cmx optimizer.cmx lexer.cmx interp.cmx genxml.cmx genswf.cmx genphp.cmx genneko.cmx genjs.cmx genjava.cmx gencs.cmx gencpp.cmx genas3.cmx common.cmx codegen.cmx ast.cmx
optimizer.cmx: typecore.cmx type.cmx parser.cmx common.cmx ast.cmx
parser.cmx: parser.ml lexer.cmx common.cmx ast.cmx
$(CC_PARSER_CMD)
type.cmx: ast.cmx
typecore.cmx: type.cmx common.cmx ast.cmx
typeload.cmx: typecore.cmx type.cmx parser.cmx optimizer.cmx lexer.cmx common.cmx ast.cmx
typer.cmx: typeload.cmx typecore.cmx type.cmx parser.cmx optimizer.cmx lexer.cmx interp.cmx genneko.cmx genjs.cmx common.cmx codegen.cmx ast.cmx
lexer.cmx: lexer.ml
lexer.cmx: ast.cmx
clean: clean_libs clean_haxe clean_tools
clean_libs:
make -C libs/extlib clean
make -C libs/extc clean
make -C libs/neko clean
make -C libs/ziplib clean
make -C libs/javalib clean
make -C libs/swflib clean
make -C libs/xml-light clean
clean_haxe:
rm -f $(MODULES:=.obj) $(MODULES:=.o) $(MODULES:=.cmx) $(MODULES:=.cmi) lexer.ml
clean_tools:
rm -f $(OUTPUT) haxelib haxedoc
# SUFFIXES
.ml.cmx:
$(CC_CMD)
.mli.cmi:
$(CC_CMD)
.mll.ml:
ocamllex $<
.PHONY: haxe libs