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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
(rule
(targets generated_stubs.c)
(action
(run %{exe:stub-generator/driver.exe} --c-file %{targets})))
(rule
(targets generated_bindings.ml)
(action
(run %{exe:stub-generator/driver.exe} --ml-file %{targets})))
(rule
(targets generated_struct_stubs.c)
(action
(run %{exe:stub-generator/driver.exe} --c-struct-file %{targets})))
(rule
(targets ml-stub-generator.exe)
(deps
generated_struct_stubs.c
../clib/test_functions.h
../config/test-cflags)
(action
(run
%{cc}
%{read-lines:../config/test-cflags}
-I
../clib
-I
%{ocaml-config:standard_library}
-o
%{targets}
generated_struct_stubs.c)))
(rule
(targets generated_struct_bindings.ml)
(deps ml-stub-generator.exe)
(action
(with-stdout-to
%{targets}
(run %{deps}))))
(library
(name test_structs_bindings)
(wrapped false)
(foreign_stubs
(language c)
(names generated_stubs))
(modules generated_bindings generated_struct_bindings)
(libraries ctypes test_functions lwt.unix))
(test
(name test_structs)
(modules test_structs)
(package ctypes-foreign)
(deps ../clib/clib%{ext_dll})
(action
(run %{test} -runner sequential))
(link_flags
(:include ../flags/link-flags.sexp))
(libraries
ounit2
ctypes
ctypes.stubs
ctypes-foreign
test_structs_stubs
test_functions
test_structs_bindings
tests_common))
|