summaryrefslogtreecommitdiffstats
path: root/src/Makefile.housekeeping
diff options
context:
space:
mode:
authorMichael Brown2015-04-22 13:14:16 +0200
committerMichael Brown2015-04-22 13:21:14 +0200
commitdc19e630cb44b8ee313ac4b3852d92fcdf050dfc (patch)
tree6a33fb379d43f2b3cbcba8af65dee58d04c4d1dc /src/Makefile.housekeeping
parent[rtl818x] Obviate RTL_ROM() hack (diff)
downloadipxe-dc19e630cb44b8ee313ac4b3852d92fcdf050dfc.tar.gz
ipxe-dc19e630cb44b8ee313ac4b3852d92fcdf050dfc.tar.xz
ipxe-dc19e630cb44b8ee313ac4b3852d92fcdf050dfc.zip
[build] Construct all-drivers list based on driver class
The USB bus drivers (ehci.c and xhci.c) have PCI device ID tables and hence PCI_ROM() lines, but should probably not be included in the all-drivers build on this basis, since they do nothing useful unless a USB network driver is also present. Fix by constructing the all-drivers list based on the driver class (i.e. the portion of the source path immediately after "drivers/"). Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/Makefile.housekeeping')
-rw-r--r--src/Makefile.housekeeping9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
index 51d71f13..be9ad7c4 100644
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -915,6 +915,8 @@ BOBJS += $(patsubst %,$(BIN)/%.ids.o,$(DRIVERS))
#
bobjs :
@$(ECHO) $(BOBJS)
+drivers_% :
+ @$(ECHO) $(DRIVERS_$*)
drivers :
@$(ECHO) $(DRIVERS)
.PHONY : drivers
@@ -945,6 +947,12 @@ $(BIN)/NIC : $(AUTO_DEPS)
@perl -ne 'chomp; print "$$1\n" if /\# NIC\t(.*)$$/' $^ >> $@
CLEANUP += $(BIN)/NIC # Doesn't match the $(BIN)/*.* pattern
+# Select drivers to be included in the all-drivers build
+#
+DRIVERS = $(DRIVERS_net) $(DRIVERS_infiniband) \
+ $(DRIVERS_xen) $(DRIVERS_hyperv)
+DRIVERS_ipxe = $(DRIVERS)
+
# Analyse a target name (e.g. "bin/dfe538--prism2_pci.rom.tmp") and
# derive the variables:
#
@@ -953,7 +961,6 @@ CLEANUP += $(BIN)/NIC # Doesn't match the $(BIN)/*.* pattern
# TGT_DRIVERS : the driver for each element (e.g. "rtl8139 prism2_pci")
# TGT_ROM_NAME : the ROM name (e.g. "dfe538")
#
-DRIVERS_ipxe = $(DRIVERS)
CARD_DRIVER = $(firstword $(DRIVER_$(1)) $(1))
TGT_ELEMENTS = $(subst --, ,$(firstword $(subst ., ,$(notdir $@))))
TGT_ROM_NAME = $(firstword $(TGT_ELEMENTS))