Combine soong builds into make builds

Bootstrap soong if necessary, and wrap the kati and soong ninja files
into a single ninja file.

Change-Id: I0000c7eaa1adda763189681c57ec27a97a12ee1f
diff --git a/core/main.mk b/core/main.mk
index d9ff68e..c29731c 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -525,6 +525,9 @@
 # --mindepth=2 makes the prunes not work.
 subdir_makefiles := \
 	$(shell build/tools/findleaves.py $(FIND_LEAVES_EXCLUDES) $(subdirs) Android.mk)
+ifeq ($(USE_SOONG),true)
+subdir_makefiles := $(SOONG_ANDROID_MK) $(subdir_makefiles)
+endif
 
 $(foreach mk, $(subdir_makefiles), $(info including $(mk) ...)$(eval include $(mk)))
 
@@ -866,6 +869,9 @@
 
 .PHONY: checkbuild
 checkbuild: $(modules_to_check) droid_targets
+ifeq ($(USE_SOONG),true)
+checkbuild: checkbuild-soong
+endif
 ifeq (true,$(ANDROID_BUILD_EVERYTHING_BY_DEFAULT))
 droid: checkbuild
 endif