let compile_flags l =
let pkgs = topological_closure l in
let locations = List.fold_left begin fun acc p ->
SSet.add p.location acc
end SSet.empty pkgs in
let flags = [] in
(* includes *)
let flags =
List.fold_left begin fun acc l ->
add_atom (P l) (add_atom (A "-I") acc)
end flags (SSet.elements locations)
in
S (List.rev flags)