2 # Makefile for the kernel ata, atapi, and ide block device drivers.
4 # 12 September 2000, Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
5 # Rewritten to use lists instead of if-statements.
7 # Note : at this point, these files are compiled on all systems.
8 # In the future, some of these should be built conditionally.
12 export-objs := ide-iops.o ide-taskfile.o ide-proc.o ide.o ide-probe.o ide-probe-mini.o ide-dma.o ide-lib.o setup-pci.o ide-io.o ide-disk.o
14 all-subdirs := arm legacy pci ppc raid
15 mod-subdirs := arm legacy pci ppc raid
21 subdir-$(CONFIG_BLK_DEV_IDE) += legacy ppc arm raid pci
23 # First come modules that register themselves with the core
25 ifeq ($(CONFIG_BLK_DEV_IDE),y)
26 obj-y += pci/idedriver-pci.o
29 # Core IDE code - must come before legacy
31 ide-core-objs := ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-io.o \
32 ide-default.o ide-probe.o ide-geometry.o
33 ide-detect-objs := ide-probe-mini.o
35 ifeq ($(CONFIG_PROC_FS),y)
36 ide-core-objs += ide-proc.o
38 ifeq ($(CONFIG_BLK_DEV_IDEPCI),y)
39 ide-core-objs += setup-pci.o
41 ifeq ($(CONFIG_BLK_DEV_IDEDMA_PCI),y)
42 ide-core-objs += ide-dma.o
45 # Initialisation order:
47 # Legacy drivers may register a callback
48 # Drivers are pre initialised
49 # Probe inits the drivers and driver callbacks
50 # Raid scans the devices
52 obj-$(CONFIG_BLK_DEV_IDE) += ide-core.o
54 ifeq ($(CONFIG_BLK_DEV_IDE),y)
55 obj-y += legacy/idedriver-legacy.o
56 obj-y += ppc/idedriver-ppc.o
57 obj-y += arm/idedriver-arm.o
59 ifeq ($(CONFIG_BLK_DEV_HD_ONLY),y)
60 subdir-$(CONFIG_BLK_DEV_HD_ONLY) += legacy
61 obj-y += legacy/idedriver-legacy.o
65 obj-$(CONFIG_BLK_DEV_ISAPNP) += ide-pnp.o
67 obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o
68 obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o
69 obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o
70 obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o
72 obj-$(CONFIG_BLK_DEV_IDE) += ide-detect.o
74 ifeq ($(CONFIG_BLK_DEV_IDE),y)
75 # RAID must be last of all
76 obj-y += raid/idedriver-raid.o
79 list-multi := ide-core.o ide-detect.o
80 O_TARGET := idedriver.o
82 include $(TOPDIR)/Rules.make
84 ide-core.o: $(ide-core-objs)
85 $(LD) -r -o $@ $(ide-core-objs)
87 ide-detect.o: $(ide-detect-objs)
88 $(LD) -r -o $@ $(ide-detect-objs)