-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathdune
94 lines (88 loc) · 3.13 KB
/
dune
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
;**************************************************************************
;* *
;* OCaml *
;* *
;* Thomas Refis, Jane Street Europe *
;* *
;* Copyright 2018 Jane Street Group LLC *
;* *
;* All rights reserved. This file is distributed under the terms of *
;* the GNU Lesser General Public License version 2.1, with the *
;* special exception on linking described in the file LICENSE. *
;* *
;**************************************************************************
(rule
(targets primitives)
(mode fallback)
(deps
; matches the line structure of files in gen_primitives.sh
alloc.c array.c compare.c extern.c floats.c gc_ctrl.c hash.c intern.c interp.c ints.c io.c
lexing.c md5.c meta.c memprof.c obj.c parsing.c signals.c str.c sys.c callback.c weak.c
finalise.c domain.c platform.c fiber.c memory.c startup_aux.c runtime_events.c sync.c
dynlink.c backtrace_byt.c backtrace.c afl.c
bigarray.c prng.c win32.c
)
(action (with-stdout-to %{targets}
(chdir .. (run %{dep:gen_primitives.sh})))))
(rule
(targets libasmrun.a libasmrund.a libasmruni.a libasmrun_pic.a
libasmrun_shared.so libcamlrun.a libcamlrund.a libcamlruni.a libcamlrun_pic.a
libcamlrun_shared.so ocamlrun ocamlrund ocamlruni ld.conf
sak)
(mode fallback)
(deps
../Makefile.config
../Makefile.build_config
../Makefile.config_if_required
../Makefile.common ../Makefile
../compilerlibs/Makefile.compilerlibs
../Makefile.menhir
../.depend
../.depend.menhir
../config.status
../stdlib/StdlibModules
(glob_files caml/*.h)
(glob_files *.h)
caml/domain_state.tbl
primitives
(glob_files *.S)
(glob_files *.c)
)
(action
(no-infer
(progn
(bash "touch .depend") ; hack.
(bash "cd .. && make V=1 'SAK_LINK=cc -o $(1) $(2)' COMPUTE_DEPS=false runtime/sak")
(bash "cd .. && make V=1 -sj8 runtime/libasmrun.a runtime/libasmrund.a runtime/libasmruni.a runtime/libasmrun_pic.a \
runtime/libasmrun_shared.so runtime/libcamlrun.a runtime/libcamlrund.a runtime/libcamlruni.a runtime/libcamlrun_pic.a \
runtime/libcamlrun_shared.so runtime/ocamlrun runtime/ocamlrund runtime/ocamlruni runtime/ld.conf COMPUTE_DEPS=false")
(bash "rm .depend")))))
(install
(files
ocamlrun
ocamlrund
ocamlruni
)
(section bin)
(package ocaml_runtime_stdlib))
(install
(files
ld.conf
libcamlrun.a
libcamlrund.a
libcamlruni.a
libcamlrun_pic.a
libcamlrun_shared.so
)
(section lib)
(package ocaml_runtime_stdlib))
(install
(files
libasmrun.a
libasmrund.a
libasmruni.a
libasmrun_pic.a
libasmrun_shared.so
)
(section lib)
(package ocaml_runtime_stdlib))