2024-09-05 17:32:45 +03:00
|
|
|
(rule
|
|
|
|
|
(target byterun.exe)
|
|
|
|
|
(deps
|
|
|
|
|
(:main byterun.c)
|
2025-02-27 23:42:19 +03:00
|
|
|
(:runtime ../runtime/runtime.a)
|
|
|
|
|
mac-specific-flags.txt)
|
2024-09-05 17:32:45 +03:00
|
|
|
(mode
|
|
|
|
|
(promote (until-clean)))
|
|
|
|
|
(action
|
2025-02-27 23:35:42 +03:00
|
|
|
(run gcc %{read:mac-specific-flags.txt} -g %{main} %{runtime} -o %{target})))
|
|
|
|
|
|
|
|
|
|
(rule
|
|
|
|
|
(target mac-specific-flags.txt)
|
|
|
|
|
(enabled_if
|
|
|
|
|
(= %{system} "linux"))
|
|
|
|
|
(action
|
|
|
|
|
(progn
|
|
|
|
|
(with-stdout-to
|
|
|
|
|
%{target}
|
|
|
|
|
(run printf "-g")))))
|
|
|
|
|
|
|
|
|
|
(rule
|
|
|
|
|
(target mac-specific-flags.txt)
|
2025-02-28 00:00:54 +03:00
|
|
|
(enabled_if
|
|
|
|
|
(= %{ocaml-config:system} macosx))
|
2025-02-27 23:35:42 +03:00
|
|
|
(action
|
|
|
|
|
(progn
|
|
|
|
|
(with-stdout-to
|
|
|
|
|
%{target}
|
|
|
|
|
(run printf "-arch x86_64 -ld_classic")))))
|