Set LOCAL_PATH for each prebuilt module

Set LOCAL_PATH to the path to the blueprint file so that make can
generate MODULE-IN-* rules to make mma work.  Switch to using
LOCAL_PREBUILT_MODULE_FILE instead of LOCAL_SRC_FILES to specify the
location of the prebuilts relative to $(TOP).

This should also make notice files work.

Change-Id: I51c7aa1187e68c4c9095687461dd5e76cbd7292d
diff --git a/common/androidmk.go b/common/androidmk.go
index 6a2ede0..3fe9e96 100644
--- a/common/androidmk.go
+++ b/common/androidmk.go
@@ -93,7 +93,6 @@
 func translateAndroidMk(ctx blueprint.SingletonContext, mkFile string, mods []AndroidModule) error {
 	buf := &bytes.Buffer{}
 
-	fmt.Fprintln(buf, "LOCAL_PATH := $(TOP)")
 	fmt.Fprintln(buf, "LOCAL_MODULE_MAKEFILE := $(lastword $(MAKEFILE_LIST))")
 
 	for _, mod := range mods {
@@ -184,10 +183,11 @@
 	}
 
 	fmt.Fprintln(w, "\ninclude $(CLEAR_VARS)")
+	fmt.Fprintln(w, "LOCAL_PATH :=", filepath.Dir(ctx.BlueprintFile(mod)))
 	fmt.Fprintln(w, "LOCAL_MODULE :=", name)
 	fmt.Fprintln(w, "LOCAL_MODULE_CLASS :=", data.Class)
 	fmt.Fprintln(w, "LOCAL_MULTILIB :=", amod.commonProperties.Compile_multilib)
-	fmt.Fprintln(w, "LOCAL_SRC_FILES :=", data.OutputFile.String())
+	fmt.Fprintln(w, "LOCAL_PREBUILT_MODULE_FILE :=", data.OutputFile.String())
 
 	archStr := amod.Arch().ArchType.String()
 	if amod.Host() {