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-28 00:17:43 +03:00
|
|
|
(run
|
|
|
|
|
gcc
|
|
|
|
|
%{read-lines:mac-specific-flags.txt}
|
|
|
|
|
-g
|
|
|
|
|
%{main}
|
|
|
|
|
%{runtime}
|
|
|
|
|
-o
|
|
|
|
|
%{target})))
|
2025-02-27 23:35:42 +03:00
|
|
|
|
|
|
|
|
(rule
|
|
|
|
|
(target mac-specific-flags.txt)
|
|
|
|
|
(enabled_if
|
|
|
|
|
(= %{system} "linux"))
|
|
|
|
|
(action
|
2025-02-28 00:17:43 +03:00
|
|
|
(write-file %{target} "")))
|
2025-02-27 23:35:42 +03:00
|
|
|
|
|
|
|
|
(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
|
2025-02-28 00:17:43 +03:00
|
|
|
(write-file %{target} "-arch\nx86_64\n-ld_classic")))
|