[C++] Add --gen_all_targets flag
diff --git a/dep.cc b/dep.cc
index b2480f7..7be6a6d 100644
--- a/dep.cc
+++ b/dep.cc
@@ -149,6 +149,10 @@
       for (Symbol s : phony_)
         targets.push_back(s);
     }
+    if (g_flags.gen_all_targets) {
+      for (const auto& p : rules_)
+        targets.push_back(p.first);
+    }
 
     // TODO: LogStats?