use hidl-gen as the name of the code generator

-- Pass argv[0] as the name of the executable to run in auto-generated
   Android.mk files
-- Use hidl-gen in makefiles for the test executable

Change-Id: Ia35eaf9f66608d67730910c73436e4a7b8540752
Signed-off-by: Iliyan Malchev <malchev@google.com>
diff --git a/main.cpp b/main.cpp
index eef9e55..cf35b15 100644
--- a/main.cpp
+++ b/main.cpp
@@ -36,6 +36,7 @@
 }
 
 static status_t generateMakefileOrSourcesForPackage(
+        const char *hidl_gen,
         Coordinator *coordinator,
         const std::string &outputDir,
         bool createMakefile,
@@ -123,7 +124,7 @@
 
     out.indent();
 
-    out << "nuhidl-gen -o $(PRIVATE_OUTPUT_DIR) "
+    out << hidl_gen << " -o $(PRIVATE_OUTPUT_DIR) "
         << packageFQName.string()
         << "\n";
 
@@ -257,7 +258,7 @@
         }
 
         status_t err =
-            generateMakefileOrSourcesForPackage(
+            generateMakefileOrSourcesForPackage(me,
                     &coordinator, outputDir, createMakefile, fqName);
 
         if (err != OK) {