summaryrefslogtreecommitdiff
path: root/src/ec
diff options
context:
space:
mode:
Diffstat (limited to 'src/ec')
-rw-r--r--src/ec/Makefile.inc2
-rw-r--r--src/ec/acpi/Makefile.inc4
-rw-r--r--src/ec/compal/Makefile.inc1
-rw-r--r--src/ec/compal/ene932/Makefile.inc4
-rw-r--r--src/ec/google/Makefile.inc1
-rw-r--r--src/ec/google/chromeec/Makefile.inc4
-rw-r--r--src/ec/kontron/Makefile.inc1
-rw-r--r--src/ec/kontron/it8516e/Makefile.inc4
-rw-r--r--src/ec/lenovo/Makefile.inc2
-rw-r--r--src/ec/lenovo/h8/Makefile.inc4
-rw-r--r--src/ec/lenovo/pmh7/Makefile.inc4
-rw-r--r--src/ec/quanta/Makefile.inc2
-rw-r--r--src/ec/quanta/ene_kb3940q/Makefile.inc5
-rw-r--r--src/ec/quanta/it8518/Makefile.inc4
-rw-r--r--src/ec/smsc/Makefile.inc1
-rw-r--r--src/ec/smsc/mec1308/Makefile.inc4
16 files changed, 36 insertions, 11 deletions
diff --git a/src/ec/Makefile.inc b/src/ec/Makefile.inc
deleted file mode 100644
index be3da455f2..0000000000
--- a/src/ec/Makefile.inc
+++ /dev/null
@@ -1,2 +0,0 @@
-subdirs-$(CONFIG_EC_ACPI) += acpi
-subdirs-y += compal google kontron lenovo smsc quanta
diff --git a/src/ec/acpi/Makefile.inc b/src/ec/acpi/Makefile.inc
index b39aaa2f94..efdd4b1e61 100644
--- a/src/ec/acpi/Makefile.inc
+++ b/src/ec/acpi/Makefile.inc
@@ -1,3 +1,7 @@
+ifeq ($(CONFIG_EC_ACPI),y)
+
ramstage-y += ec.c
smm-$(CONFIG_HAVE_SMI_HANDLER) += ec.c
romstage-$(CONFIG_BOARD_LENOVO_X201) += ec.c
+
+endif
diff --git a/src/ec/compal/Makefile.inc b/src/ec/compal/Makefile.inc
deleted file mode 100644
index ce75ca6339..0000000000
--- a/src/ec/compal/Makefile.inc
+++ /dev/null
@@ -1 +0,0 @@
-subdirs-$(CONFIG_EC_COMPAL_ENE932) += ene932
diff --git a/src/ec/compal/ene932/Makefile.inc b/src/ec/compal/ene932/Makefile.inc
index fb898bedb0..effe34cdda 100644
--- a/src/ec/compal/ene932/Makefile.inc
+++ b/src/ec/compal/ene932/Makefile.inc
@@ -1,3 +1,7 @@
+ifeq ($(CONFIG_EC_COMPAL_ENE932),y)
+
ramstage-y += ec.c
smm-y += ec.c
smm-y += ../../../lib/delay.c
+
+endif
diff --git a/src/ec/google/Makefile.inc b/src/ec/google/Makefile.inc
deleted file mode 100644
index 9ca3f0f71a..0000000000
--- a/src/ec/google/Makefile.inc
+++ /dev/null
@@ -1 +0,0 @@
-subdirs-$(CONFIG_EC_GOOGLE_CHROMEEC) += chromeec
diff --git a/src/ec/google/chromeec/Makefile.inc b/src/ec/google/chromeec/Makefile.inc
index 70db2e2c98..89d64ca9ca 100644
--- a/src/ec/google/chromeec/Makefile.inc
+++ b/src/ec/google/chromeec/Makefile.inc
@@ -1,3 +1,5 @@
+ifeq ($(CONFIG_EC_GOOGLE_CHROMEEC),y)
+
ramstage-y += ec.c crosec_proto.c
ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC_I2C) += ec_i2c.c
ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC_LPC) += ec_lpc.c
@@ -18,3 +20,5 @@ verstage-$(CONFIG_EC_GOOGLE_CHROMEEC_I2C) += ec_i2c.c
verstage-$(CONFIG_EC_GOOGLE_CHROMEEC_LPC) += ec_lpc.c
verstage-$(CONFIG_EC_GOOGLE_CHROMEEC_MEC) += ec_mec.c
verstage-$(CONFIG_EC_GOOGLE_CHROMEEC_SPI) += ec_spi.c
+
+endif
diff --git a/src/ec/kontron/Makefile.inc b/src/ec/kontron/Makefile.inc
deleted file mode 100644
index 8c3b7c78f7..0000000000
--- a/src/ec/kontron/Makefile.inc
+++ /dev/null
@@ -1 +0,0 @@
-subdirs-$(CONFIG_EC_KONTRON_IT8516E) += it8516e
diff --git a/src/ec/kontron/it8516e/Makefile.inc b/src/ec/kontron/it8516e/Makefile.inc
index 1275cf3717..6ef87cd992 100644
--- a/src/ec/kontron/it8516e/Makefile.inc
+++ b/src/ec/kontron/it8516e/Makefile.inc
@@ -1 +1,5 @@
+ifeq ($(CONFIG_EC_KONTRON_IT8516E),y)
+
ramstage-y += ec.c
+
+endif
diff --git a/src/ec/lenovo/Makefile.inc b/src/ec/lenovo/Makefile.inc
deleted file mode 100644
index 8865030ea1..0000000000
--- a/src/ec/lenovo/Makefile.inc
+++ /dev/null
@@ -1,2 +0,0 @@
-subdirs-$(CONFIG_EC_LENOVO_H8) += h8
-subdirs-$(CONFIG_EC_LENOVO_PMH7) += pmh7
diff --git a/src/ec/lenovo/h8/Makefile.inc b/src/ec/lenovo/h8/Makefile.inc
index 9fef94c547..4829e7b624 100644
--- a/src/ec/lenovo/h8/Makefile.inc
+++ b/src/ec/lenovo/h8/Makefile.inc
@@ -1 +1,5 @@
+ifeq ($(CONFIG_EC_LENOVO_H8),y)
+
ramstage-y += h8.c
+
+endif
diff --git a/src/ec/lenovo/pmh7/Makefile.inc b/src/ec/lenovo/pmh7/Makefile.inc
index f42e0e4cb8..a619cc7a3f 100644
--- a/src/ec/lenovo/pmh7/Makefile.inc
+++ b/src/ec/lenovo/pmh7/Makefile.inc
@@ -1,3 +1,7 @@
+ifeq ($(CONFIG_EC_LENOVO_PMH7),y)
+
ramstage-y += pmh7.c
smm-$(CONFIG_HAVE_SMI_HANDLER) += pmh7.c
romstage-y += pmh7.c
+
+endif
diff --git a/src/ec/quanta/Makefile.inc b/src/ec/quanta/Makefile.inc
deleted file mode 100644
index c128aec534..0000000000
--- a/src/ec/quanta/Makefile.inc
+++ /dev/null
@@ -1,2 +0,0 @@
-subdirs-$(CONFIG_EC_QUANTA_ENE_KB3940Q) += ene_kb3940q
-subdirs-$(CONFIG_EC_QUANTA_IT8518) += it8518
diff --git a/src/ec/quanta/ene_kb3940q/Makefile.inc b/src/ec/quanta/ene_kb3940q/Makefile.inc
index 1ce9a46f88..a1ae764fc8 100644
--- a/src/ec/quanta/ene_kb3940q/Makefile.inc
+++ b/src/ec/quanta/ene_kb3940q/Makefile.inc
@@ -1,4 +1,7 @@
+ifeq ($(CONFIG_EC_QUANTA_ENE_KB3940Q),y)
+
ramstage-y += ec.c
smm-y += ec.c
-
smm-y += ../../../lib/delay.c
+
+endif
diff --git a/src/ec/quanta/it8518/Makefile.inc b/src/ec/quanta/it8518/Makefile.inc
index ccceb6f838..daf75ef1f9 100644
--- a/src/ec/quanta/it8518/Makefile.inc
+++ b/src/ec/quanta/it8518/Makefile.inc
@@ -1,4 +1,8 @@
+ifeq ($(CONFIG_EC_QUANTA_IT8518),y)
+
romstage-y += ec.c
ramstage-y += ec.c
smm-y += ec.c
smm-y += ../../../lib/delay.c
+
+endif
diff --git a/src/ec/smsc/Makefile.inc b/src/ec/smsc/Makefile.inc
deleted file mode 100644
index 3dd9cce440..0000000000
--- a/src/ec/smsc/Makefile.inc
+++ /dev/null
@@ -1 +0,0 @@
-subdirs-$(CONFIG_EC_SMSC_MEC1308) += mec1308
diff --git a/src/ec/smsc/mec1308/Makefile.inc b/src/ec/smsc/mec1308/Makefile.inc
index 0accda3f55..c45f65dcd8 100644
--- a/src/ec/smsc/mec1308/Makefile.inc
+++ b/src/ec/smsc/mec1308/Makefile.inc
@@ -1,2 +1,6 @@
+ifeq ($(CONFIG_EC_SMSC_MEC1308),y)
+
ramstage-y += ec.c
smm-y += ec.c
+
+endif