Move the creation of the root structure to build/core/main.mk

Since Soong currently doesn't support the `install_directory`
functionality, `system/core/rootdir/Android.mk` cannot be directly
converted to Android.bp. Moreover, its main content is to create
directories and symlinks for the root file system. Therefore, we'll
first rename it and move it to build/core/main.mk for handling.

In addition, consolidate the handling of meta-lic related parts into
`build/core/tasks/meta-lic.mk`.

Bug: 353642907
Test: m -j init.environ.rc
Change-Id: Ie8f8bcae5752d22c331b33a33981a959410f0a69
diff --git a/core/main.mk b/core/main.mk
index 5c280da..8d0b465 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -305,6 +305,9 @@
 
 $(info [$(call inc_and_print,subdir_makefiles_inc)/$(subdir_makefiles_total)] finishing legacy Make module parsing ...)
 
+# Create necessary directories and symlinks in the root filesystem
+include system/core/rootdir/create_root_structure.mk
+
 # -------------------------------------------------------------------
 # All module makefiles have been included at this point.
 # -------------------------------------------------------------------
diff --git a/core/tasks/meta-lic.mk b/core/tasks/meta-lic.mk
index 24adfc8..620b1e2 100644
--- a/core/tasks/meta-lic.mk
+++ b/core/tasks/meta-lic.mk
@@ -225,3 +225,6 @@
 
 # Moved here from hardware/libhardware_legacy/Android.mk
 $(eval $(call declare-1p-copy-files,hardware/libhardware_legacy,))
+
+# Moved here from system/core/rootdir/Android.mk
+$(eval $(call declare-1p-copy-files,system/core/rootdir,))