xref: /linux/drivers/pci/Makefile (revision d67b569f5f620c0fb95d5212642746b7ba9d29e4)
1#
2# Makefile for the PCI bus specific drivers.
3#
4
5obj-y		+= access.o bus.o probe.o remove.o pci.o quirks.o \
6			names.o pci-driver.o search.o pci-sysfs.o \
7			rom.o
8obj-$(CONFIG_PROC_FS) += proc.o
9
10ifndef CONFIG_SPARC64
11obj-y += setup-res.o
12endif
13
14obj-$(CONFIG_HOTPLUG) += hotplug.o
15
16# Build the PCI Hotplug drivers if we were asked to
17obj-$(CONFIG_HOTPLUG_PCI) += hotplug/
18
19#
20# Some architectures use the generic PCI setup functions
21#
22obj-$(CONFIG_X86) += setup-bus.o
23obj-$(CONFIG_ALPHA) += setup-bus.o setup-irq.o
24obj-$(CONFIG_ARM) += setup-bus.o setup-irq.o
25obj-$(CONFIG_PARISC) += setup-bus.o
26obj-$(CONFIG_SUPERH) += setup-bus.o setup-irq.o
27obj-$(CONFIG_PPC32) += setup-irq.o
28obj-$(CONFIG_PPC64) += setup-bus.o
29obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o
30obj-$(CONFIG_X86_VISWS) += setup-irq.o
31obj-$(CONFIG_PCI_MSI) += msi.o
32
33#
34# ACPI Related PCI FW Functions
35#
36obj-$(CONFIG_ACPI)    += pci-acpi.o
37
38# Cardbus & CompactPCI use setup-bus
39obj-$(CONFIG_HOTPLUG) += setup-bus.o
40
41ifndef CONFIG_X86
42obj-y += syscall.o
43endif
44
45ifeq ($(CONFIG_PCI_DEBUG),y)
46EXTRA_CFLAGS += -DDEBUG
47endif
48
49hostprogs-y := gen-devlist
50
51# Dependencies on generated files need to be listed explicitly
52$(obj)/names.o: $(obj)/devlist.h $(obj)/classlist.h
53$(obj)/classlist.h: $(obj)/devlist.h
54
55# And that's how to generate them
56quiet_cmd_devlist = DEVLIST $@
57      cmd_devlist = ( cd $(obj); ./gen-devlist ) < $<
58$(obj)/devlist.h: $(src)/pci.ids $(obj)/gen-devlist
59	$(call cmd,devlist)
60
61# Files generated that shall be removed upon make clean
62clean-files := devlist.h classlist.h
63
64# Build PCI Express stuff if needed
65obj-$(CONFIG_PCIEPORTBUS) += pcie/
66
67