miou-solo5/test/dune
2024-12-08 17:00:01 +01:00

140 lines
2.7 KiB
Text

(executable
(name sleep)
(modules sleep)
(modes native)
(link_flags :standard -cclib "-z solo5-abi=hvt")
(libraries miou-solo5)
(foreign_stubs
(language c)
(names manifest.sleep)))
(executable
(name schedule)
(modules schedule)
(modes native)
(link_flags :standard -cclib "-z solo5-abi=hvt")
(libraries miou-solo5)
(foreign_stubs
(language c)
(names manifest.schedule)))
(executable
(name block)
(modules block)
(modes native)
(link_flags :standard -cclib "-z solo5-abi=hvt")
(libraries miou-solo5 cmdliner fmt cachet hxd.core hxd.string)
(foreign_stubs
(language c)
(names manifest.block)))
(executable
(name cmdline)
(modules cmdline)
(modes native)
(link_flags :standard -cclib "-z solo5-abi=hvt")
(libraries miou-solo5 cmdliner fmt)
(foreign_stubs
(language c)
(names manifest.cmdline)))
(rule
(targets manifest.sleep.c)
(deps sleep.json)
(enabled_if
(= %{context_name} "solo5"))
(action
(run solo5-elftool gen-manifest sleep.json manifest.sleep.c)))
(rule
(targets sleep.json)
(enabled_if
(= %{context_name} "solo5"))
(action
(with-stdout-to
sleep.json
(run %{exe:sleep.exe}))))
(rule
(targets manifest.sleep.c)
(enabled_if
(= %{context_name} "default"))
(action
(write-file manifest.sleep.c "")))
(rule
(targets manifest.schedule.c)
(deps schedule.json)
(enabled_if
(= %{context_name} "solo5"))
(action
(run solo5-elftool gen-manifest schedule.json manifest.schedule.c)))
(rule
(targets schedule.json)
(enabled_if
(= %{context_name} "solo5"))
(action
(with-stdout-to
schedule.json
(run %{exe:schedule.exe}))))
(rule
(targets manifest.schedule.c)
(enabled_if
(= %{context_name} "default"))
(action
(write-file manifest.schedule.c "")))
(rule
(targets manifest.block.c)
(deps block.json)
(enabled_if
(= %{context_name} "solo5"))
(action
(run solo5-elftool gen-manifest block.json manifest.block.c)))
(rule
(targets block.json)
(enabled_if
(= %{context_name} "solo5"))
(action
(with-stdout-to
block.json
(run %{exe:block.exe}))))
(rule
(targets manifest.block.c)
(enabled_if
(= %{context_name} "default"))
(action
(write-file manifest.block.c "")))
(rule
(targets manifest.cmdline.c)
(deps cmdline.json)
(enabled_if
(= %{context_name} "solo5"))
(action
(run solo5-elftool gen-manifest cmdline.json manifest.cmdline.c)))
(rule
(targets cmdline.json)
(enabled_if
(= %{context_name} "solo5"))
(action
(with-stdout-to
cmdline.json
(run %{exe:cmdline.exe}))))
(rule
(targets manifest.cmdline.c)
(enabled_if
(= %{context_name} "default"))
(action
(write-file manifest.cmdline.c "")))
(cram
(enabled_if
(= %{context_name} "solo5"))
(deps sleep.exe schedule.exe block.exe simple.txt cmdline.exe))