Convert to Android.bp

See build/soong/README.md for more information.

gen.mk is currently using build system internals in order to tell the
gen_*.sh scripts how to call the compiler. Soong genrules do not provide
the required information to call a compiler, so use a `cc_object {}` to
do the preprocessing steps, and pass the output from that into the
gen_*.sh scripts (cc_genrule).

It fixes the missing dependencies for the 2nd arch, and uses the correct
libc headers for the _vendor variant.

Bug: 66914194
Test: mmma external/minijail
Test: cd external/minijail; make all tests
Test: out/host/linux-x86/nativetest/system_unittest_gtest/system_unittest_gtest
Test: out/host/linux-x86/nativetest64/system_unittest_gtest/system_unittest_gtest
Test: cd external/minijail; ../../out/host/linux-x86/nativetest/syscall_filter_unittest_gtest/syscall_filter_unittest_gtest
Test: cd external/minijail; ../../out/host/linux-x86/nativetest64/syscall_filter_unittest_gtest/syscall_filter_unittest_gtest
Change-Id: Id116afb24677ea386f1b043c71c59d3b7ffd8696
diff --git a/Makefile b/Makefile
index 0cd9845..47afdb7 100644
--- a/Makefile
+++ b/Makefile
@@ -117,7 +117,7 @@
 # NOTE! This will not detect if the file is not appropriate for the target.
 libsyscalls.gen.c: $(SRC)/Makefile $(SRC)/libsyscalls.h
 	@printf "Generating target-arch specific $@...\n"
-	$(QUIET)$(SRC)/gen_syscalls.sh "$(CC)" "$@"
+	$(QUIET)CC="$(CC)" $(SRC)/gen_syscalls.sh "$@"
 	@printf "$@ done.\n"
 clean: CLEAN(libsyscalls.gen.c)
 
@@ -131,7 +131,7 @@
 # NOTE! This will not detect if the file is not appropriate for the target.
 libconstants.gen.c: $(SRC)/Makefile $(SRC)/libconstants.h
 	@printf "Generating target-arch specific $@...\n"
-	$(QUIET)$(SRC)/gen_constants.sh "$(CC)" "$@"
+	$(QUIET)CC="$(CC)" $(SRC)/gen_constants.sh "$@"
 	@printf "$@ done.\n"
 clean: CLEAN(libconstants.gen.c)