-
Notifications
You must be signed in to change notification settings - Fork 4
/
dune
29 lines (26 loc) · 985 Bytes
/
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
(library
(name mindstorm)
(public_name mindstorm)
(modules Mindstorm Mindstorm__NXT Mindstorm__EV3 Mindstorm_connect)
(libraries bytes unix)
(wrapped false)
(preprocess (action (run %{exe:../config/discover.exe} --cppo %{input-file})))
(preprocessor_deps mindstorm_connect.ml mindstorm_macros.ml
mindstorm_common.ml
mindstorm_win.c mindstorm_unix.c)
(c_names mindstorm_stubs)
(c_flags :standard (:include c_flags.sexp))
(c_library_flags :standard (:include c_library_flags.sexp))
(synopsis "Drive Lego Mindstorms bricks from OCaml"))
(documentation
(package mindstorm)
(mld_files :standard))
;; Generate the interface, so it is easily readable.
(rule
(targets mindstorm__NXT.mli)
(deps mindstorm__NXT.mli.pp (:p %{workspace_root}/config/pp.exe))
(action (chdir %{workspace_root} (run %{p}))))
(rule
(targets c_flags.sexp c_library_flags.sexp)
(deps ../config/discover.exe)
(action (run %{deps})))