-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
55 lines (47 loc) · 1.83 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
# export BS_RELEASE_BUILD=1
# so that amdjs is also set
# Note we should not do snapshotml here
# since in relese build, user may not have the sources available
# -B is not necessary in CI, however, when dir is not clean..
world:
@echo "Making compiler"
$(MAKE) -B -C lib -j 6 all
$(MAKE) libs
libs:
@echo "Making compiler finished"
$(MAKE) -C jscomp/stdlib -j8 allcmis
$(MAKE) -C jscomp/runtime -j8 all
$(MAKE) -C jscomp/others -j8 all
$(MAKE) -C jscomp/stdlib -j8 all
$(MAKE) -C jscomp/belt_byte -j8 all
$(MAKE) -C jscomp/belt_native -j8 all
DEST=lib/ocaml
RUNTIME=jscomp/runtime
STDLIB=jscomp/stdlib
OTHERS=jscomp/others
BELT_BYTE=jscomp/belt_byte
BELT_NATIVE=jscomp/belt_native
OCAML=vendor/ocaml
# TODO: sync up with
# scripts/build_uitil.js
# function install
# scripts/build_util.install
# ATTENTION: syncup build_util.install for windows
install:
@echo "Installation"
cp $(RUNTIME)/*.cmt* $(RUNTIME)/*.cmj* $(RUNTIME)/js.ml $(RUNTIME)/js.cmi \
$(RUNTIME)/js_unsafe.cmi $(RUNTIME)/js_internal.cmi \
$(RUNTIME)/caml_exceptions.mli $(RUNTIME)/caml_exceptions.ml $(RUNTIME)/caml_exceptions.cmi \
$(RUNTIME)/js_null.ml $(RUNTIME)/js_null.cmi \
$(RUNTIME)/js_undefined.ml $(RUNTIME)/js_undefined.cmi \
$(RUNTIME)/js_exn.ml $(RUNTIME)/js_exn.mli $(RUNTIME)/js_exn.cmi \
$(RUNTIME)/js_int.ml $(RUNTIME)/js_int.cmi \
$(RUNTIME)/js_float.ml $(RUNTIME)/js_float.cmi \
$(RUNTIME)/js_typed_array.ml $(RUNTIME)/js_typed_array.cmi \
$(STDLIB)/*.cm* $(STDLIB)/*.ml $(STDLIB)/*.mli \
$(OTHERS)/*.ml $(OTHERS)/*.mli $(OTHERS)/*.cm* $(DEST)
mkdir -p $(DEST)/bytecode $(DEST)/native
cp $(BELT_BYTE)/*.ml $(BELT_BYTE)/*mli $(BELT_BYTE)/*.o $(BELT_BYTE)/*.cm* $(DEST)/bytecode
cp $(BELT_NATIVE)/*.ml $(BELT_NATIVE)/*mli $(BELT_NATIVE)/*.o $(BELT_NATIVE)/*.cm* $(BELT_NATIVE)/*.a $(DEST)/native
cp -r $(OCAML)/lib/ocaml/caml $(DEST)
.PHONY: libs world