1# 2# Makefile for the kernel ata, atapi, and ide block device drivers. 3# 4# 12 September 2000, Bartlomiej Zolnierkiewicz <bkz@linux-ide.org> 5# Rewritten to use lists instead of if-statements. 6# 7# Note : at this point, these files are compiled on all systems. 8# In the future, some of these should be built conditionally. 9# 10 11 12export-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 13 14all-subdirs := arm legacy pci ppc raid 15mod-subdirs := arm legacy pci ppc raid 16 17obj-y := 18obj-m := 19ide-obj-y := 20 21subdir-$(CONFIG_BLK_DEV_IDE) += legacy ppc arm raid pci 22 23# First come modules that register themselves with the core 24 25ifeq ($(CONFIG_BLK_DEV_IDE),y) 26 obj-y += pci/idedriver-pci.o 27endif 28 29# Core IDE code - must come before legacy 30 31ide-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 33ide-detect-objs := ide-probe-mini.o 34 35ifeq ($(CONFIG_PROC_FS),y) 36ide-core-objs += ide-proc.o 37endif 38ifeq ($(CONFIG_BLK_DEV_IDEPCI),y) 39ide-core-objs += setup-pci.o 40endif 41ifeq ($(CONFIG_BLK_DEV_IDEDMA_PCI),y) 42ide-core-objs += ide-dma.o 43endif 44 45# Initialisation order: 46# Core sets up 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 51 52obj-$(CONFIG_BLK_DEV_IDE) += ide-core.o 53 54ifeq ($(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 58else 59 ifeq ($(CONFIG_BLK_DEV_HD_ONLY),y) 60 subdir-$(CONFIG_BLK_DEV_HD_ONLY) += legacy 61 obj-y += legacy/idedriver-legacy.o 62 endif 63endif 64 65obj-$(CONFIG_BLK_DEV_ISAPNP) += ide-pnp.o 66 67obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o 68obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o 69obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o 70obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o 71 72obj-$(CONFIG_BLK_DEV_IDE) += ide-detect.o 73 74ifeq ($(CONFIG_BLK_DEV_IDE),y) 75# RAID must be last of all 76 obj-y += raid/idedriver-raid.o 77endif 78 79list-multi := ide-core.o ide-detect.o 80O_TARGET := idedriver.o 81 82include $(TOPDIR)/Rules.make 83 84ide-core.o: $(ide-core-objs) 85 $(LD) -r -o $@ $(ide-core-objs) 86 87ide-detect.o: $(ide-detect-objs) 88 $(LD) -r -o $@ $(ide-detect-objs) 89 90