$top/Makefile.inc: Move common folder before other sibling ones

Putting
src/soc/*/common    before  src/soc/*/*, and
src/superio/common  before  src/superio/*,(which is already moved but
with duplicated folder "common")
can make the variables in
common Makefile get the expected value before they are used in other
subdirs.

The later "*" also contains "common", which needs to be eliminated by
"filter-out".

Then we can put some common variables from all the subdir Makefile.inc
to the common Makefile.inc to reduce code redundancy.

Change-Id: I99597af22cac6d12aaef348789664cd7db02ba06
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62750
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
diff --git a/Makefile.inc b/Makefile.inc
index ec2d097..929c236 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -81,8 +81,9 @@
 # root source directories of coreboot
 subdirs-y := src/lib src/commonlib/ src/console src/device src/acpi src/superio/common
 subdirs-y += src/ec/acpi $(wildcard src/ec/*/*) $(wildcard src/southbridge/*/*)
-subdirs-y += $(wildcard src/soc/*) $(wildcard src/soc/*/*) $(wildcard src/northbridge/*/*)
-subdirs-y += $(wildcard src/superio/*) $(wildcard src/superio/*/*)
+subdirs-y += $(wildcard src/soc/*) $(wildcard src/soc/*/common) $(filter-out $(wildcard src/soc/*/common),$(wildcard src/soc/*/*))
+subdirs-y += $(wildcard src/northbridge/*/*)
+subdirs-y += $(filter-out src/superio/common,$(wildcard src/superio/*)) $(wildcard src/superio/*/*)
 subdirs-y += $(wildcard src/drivers/*) $(wildcard src/drivers/*/*) $(wildcard src/drivers/*/*/*)
 subdirs-y += src/cpu src/vendorcode
 subdirs-y += util/cbfstool util/sconfig util/nvramtool util/pgtblgen util/amdfwtool