Create a host/target phony target for soong modules

This phony target will be responsible for building the specific
device/host variant of a module. These phony targets are useful for
local development as well as for atest.

Test: m nothing
Change-Id: Id3cd92f49bdc834866a8c2083ef5212ab7263bbc
diff --git a/android/module.go b/android/module.go
index da75416..75b550a 100644
--- a/android/module.go
+++ b/android/module.go
@@ -1719,6 +1719,16 @@
 		}
 
 		ctx.Phony(namespacePrefix+ctx.ModuleName()+suffix, deps...)
+		if ctx.Device() {
+			// Generate a target suffix for use in atest etc.
+			ctx.Phony(namespacePrefix+ctx.ModuleName()+"-target"+suffix, deps...)
+		} else if ctx.Target().HostCross {
+			// Generate a host-cross suffix for use in atest etc.
+			ctx.Phony(namespacePrefix+ctx.ModuleName()+"-host-cross"+suffix, deps...)
+		} else {
+			// Generate a host suffix for use in atest etc.
+			ctx.Phony(namespacePrefix+ctx.ModuleName()+"-host"+suffix, deps...)
+		}
 
 		info.BlueprintDir = ctx.ModuleDir()
 		SetProvider(ctx, FinalModuleBuildTargetsProvider, info)