open YaM let withGTK = true let withGL = false let withNULL = true let () = !options.ocaml_Flags ^= "-dtypes" let modules = ref [ ocaml_IModule "locale"; ocaml_IModule "myArg"; ocaml_IModule "msg"; ocaml_IModule ~opt_flags:"-inline 100" "vector"; ocaml_IModule "color"; ocaml_IModule "contain"; ocaml_PackageDir "ambients" (lazy [ ocaml_IModule "syntax"; ocaml_Module "types"; ocaml_IModule "ambient"; ocaml_IModule "capacity"; ocaml_Parser "parser"; ocaml_Lexer "lexer"; ocaml_IModule "parse"; ocaml_IModule "mobile"; ocaml_IModule "robust"; ocaml_IModule "safe"; ocaml_IModule "controlled"; ]); ocaml_IModule "preMain"; ocaml_PackageDir "icobjs" (lazy [ ocaml_Module "types"; ocaml_IModule "icobj"; ocaml_IModule "reactor"; ocaml_IModule "inertia"; ocaml_IModule "elastic"; ocaml_IModule "spiders"; ocaml_IModule "collider"; ocaml_IModule "hunter"; ocaml_IModule "ball"; ocaml_IModule "rotator"; ]); ocaml_PackageDir "ambientIcobjs" (lazy [ ocaml_Module "types"; ocaml_IModule "constants"; ocaml_IModule "reactor"; ocaml_IModule "builder"; ocaml_IModule "mouse"; ocaml_IModule "anchor"; ocaml_IModule "ambient"; ocaml_IModule "capacity"; ocaml_IModule "capacityDoor"; ocaml_IModule "capacityHead"; ocaml_IModule "capacitySleep"; ocaml_IModule "capacityAntenna"; ocaml_IModule "capacityAll"; ]) ] let () = if withGTK then ( !options.ocaml_ExtIncludes += "+lablgtk2"; !options.ocaml_ExtLibraries += "lablgtk"; modules @= [ocaml_PackageDir "gtkFactory" (lazy [ ocaml_IModule "gtkLocale"; (* TEMP *) ocaml_Module "types"; ocaml_IModule "highlightView"; ocaml_IModule "gui"; ocaml_IModule "blink"; ocaml_IModule "arrows"; ocaml_IModule "anchor"; ocaml_IModule "ball"; ocaml_IModule "elastic"; ocaml_IModule "spiders"; ocaml_IModule "capacity"; ocaml_IModule "ambient"; ocaml_IModule "reactor"; ocaml_IModule "display"; ])] ) let () = if withNULL then ( modules @= [ocaml_PackageDir "nullFactory" (lazy [ ocaml_IModule "reactor"; ocaml_IModule "display"; ])] ) let () = if withGL then ( !options.ocaml_ExtIncludes += "+lablGL"; !options.ocaml_ExtLibraries += "lablGL"; modules @= [ocaml_PackageDir "glFactory" (lazy [])] ) let () = main [ocaml_Program ~default:`Byte "mocambients" (!modules @ [ocaml_Module "main"]); phony_unit ~depends:["mocambients.opt"] "opt"; phony_unit ~depends:["mocambients.run"] ~command:"./mocambients.run" "run"; phony_unit ~depends:["mocambients.opt"] ~command:"./mocambients.opt" "run.opt"; ]