X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=myocamlbuild.ml;h=6f27e4ee33c7a4ceef58766e67edd14cf4dcbce8;hb=b146572b9707292dbc1eacf5fb67d84271cafbba;hp=9c90feb6f332b5f435c433525c8ec2b78e5dba1e;hpb=6ff4de6d8691aede88450125777c2b32a4e44406;p=SXSI%2Fxpathcomp.git diff --git a/myocamlbuild.ml b/myocamlbuild.ml index 9c90feb..6f27e4e 100644 --- a/myocamlbuild.ml +++ b/myocamlbuild.ml @@ -17,6 +17,8 @@ let cxx_link_flags = ref [ _S cxx_lpaths; _S cxx_libs] let native_link_flags = ref (List.map (fun s -> s ^ ".cmxa") ocaml_link) let byte_link_flags = ref ("-custom" :: (List.map (fun s -> s ^ ".cma") ocaml_link)) let link_flags = [ A"-linkpkg" ] +let libs_files = List.map (fun s -> "file:" ^ s) cxx_libs_objects + let native_compile_flags = ref [A"-fno-PIC"] let compile_flags = ref [] @@ -105,8 +107,8 @@ let () = dispatch begin Options.ocamldoc := ocamlfind (A"ocamldoc"); Options.ocamlmktop := ocamlfind (A"ocamlmktop"); - if not (List.mem "trace" !Options.tags) then begin - pp_macro_options @= [ A "-DNTRACE" ]; + if not (List.mem "log" !Options.tags) then begin + pp_macro_options @= [ A "-DNLOG" ]; end; if (List.mem "profile" !Options.tags) then begin pp_macro_options @= [ A "-DPROFILE" ]; @@ -125,7 +127,7 @@ let () = dispatch begin compile_flags @= [A "-noassert"]; pp_macro_options @= [ A "-unsafe" ]; native_compile_flags @= [ A "-inline"; A ocaml_inline ]; - cxx_flags @= [ A "-O3" ] + cxx_flags @= [ A "-O3"; A "-DNDEBUG" ] end; let dir_path = Pathname.pwd / src_path in @@ -140,7 +142,6 @@ let () = dispatch begin | After_rules -> dep [ "link" ] cstub_lib; - rule "c++: cpp & depends -> o" ~prod:"%.o" ~deps:[ "%.cpp" ] cxx_compile; let syntax_flags = S ([ A "-syntax"; A "camlp4o"; S (ppopt [A "-printer" ; A"Camlp4OCamlAstDumper"]);