diff --git a/dune b/dune index 7ca799c..ccc9ae6 100644 --- a/dune +++ b/dune @@ -6,6 +6,7 @@ builtins.h nodes.h syntax.h token.h token_vars.h ) (action + (setenv CC "%{cc}" (bash "\ \n set -e\ @@ -17,7 +18,7 @@ \n cp lib/libdash.a libdash.a\ \n cp lib/dlldash.so dlldash.so\ \n cp src/{builtins,nodes,syntax,token,token_vars}.h .\ - \n"))) + \n")))) (subdir src (rule diff --git a/ocaml/dune b/ocaml/dune index 0df89cd..0f897b9 100644 --- a/ocaml/dune +++ b/ocaml/dune @@ -3,18 +3,21 @@ (public_names shell_to_json json_to_shell) (modules shell_to_json json_to_shell ast_json) (modes (native exe)) - (foreign_archives ../dash) (libraries libdash yojson atdgen)) +(rule (copy ../dlldash.so dlldash_native.so)) +(rule (copy ../libdash.a libdash_native.a)) + (library (name libdash) (public_name libdash) (modes native) (modules (:standard \ json_to_shell shell_to_json ast_json)) (libraries ctypes ctypes.foreign) + (foreign_archives dash_native) (ctypes (external_library_name dash) - (build_flags_resolver (vendored (c_flags :standard) (c_library_flags :standard))) + (build_flags_resolver vendored) (deps (glob_files ../src/*.h) ../src/builtins.h ../src/nodes.h ../src/syntax.h ../src/token.h ../src/token_vars.h) (headers (preamble "\