ocaml/runtime/dune

72 lines
2.7 KiB
Plaintext

;**************************************************************************
;* *
;* 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 stacks.c dynlink.c backtrace_byt.c backtrace.c
afl.c
bigarray.c eventlog.c)
(action (with-stdout-to %{targets} (run %{dep:gen_primitives.sh}))))
(rule
(targets libcamlrun.a)
(mode fallback)
(deps
../Makefile.config
../Makefile.build_config
../Makefile.config_if_required
../Makefile.common Makefile
(glob_files caml/*.h)
; matches the line structure of files in Makefile/BYTECODE_C_SOURCES
interp.c misc.c stacks.c fix_code.c startup_aux.c startup_byt.c freelist.c
major_gc.c
minor_gc.c memory.c alloc.c roots_byt.c globroots.c fail_byt.c signals.c
signals_byt.c printexc.c backtrace_byt.c backtrace.c compare.c ints.c
eventlog.c
floats.c str.c array.c io.c extern.c intern.c hash.c sys.c meta.c parsing.c
gc_ctrl.c md5.c obj.c
lexing.c callback.c debugger.c weak.c compact.c finalise.c custom.c dynlink.c
afl.c unix.c win32.c bigarray.c main.c memprof.c domain.c
skiplist.c codefrag.c
)
(action
(progn
(bash "touch .depend") ; hack.
(run make %{targets} COMPUTE_DEPS=false)
(bash "rm .depend"))))
;; HACK
(library
(name runtime)
(modes byte)
(wrapped false)
(modules runtime)
(flags (-nostdlib -nopervasives))
(self_build_stubs_archive (runtime)))
(rule
(targets libruntime_stubs.a)
(action (copy libcamlrun.a %{targets})))
(rule
(targets runtime.ml)
(action (write-file %{targets} "let linkme = ()")))