update atp870u driver to 0.78 from D-Link source
[linux-2.4.git] / drivers / ide / Makefile
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
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
13
14 all-subdirs     := arm legacy pci ppc raid
15 mod-subdirs     := arm legacy pci ppc raid
16
17 obj-y           :=
18 obj-m           :=
19 ide-obj-y       :=
20
21 subdir-$(CONFIG_BLK_DEV_IDE) += legacy ppc arm raid pci
22
23 # First come modules that register themselves with the core
24
25 ifeq ($(CONFIG_BLK_DEV_IDE),y)
26   obj-y         += pci/idedriver-pci.o
27 endif
28
29 # Core IDE code - must come before legacy
30
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
34
35 ifeq ($(CONFIG_PROC_FS),y)
36 ide-core-objs   += ide-proc.o
37 endif
38 ifeq ($(CONFIG_BLK_DEV_IDEPCI),y)
39 ide-core-objs += setup-pci.o
40 endif
41 ifeq ($(CONFIG_BLK_DEV_IDEDMA_PCI),y)
42 ide-core-objs += ide-dma.o
43 endif
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
52 obj-$(CONFIG_BLK_DEV_IDE)               += ide-core.o
53
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
58 else
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
63 endif
64
65 obj-$(CONFIG_BLK_DEV_ISAPNP)            += ide-pnp.o
66
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
71
72 obj-$(CONFIG_BLK_DEV_IDE) += ide-detect.o
73
74 ifeq ($(CONFIG_BLK_DEV_IDE),y)
75 # RAID must be last of all
76   obj-y         += raid/idedriver-raid.o
77 endif
78
79 list-multi      := ide-core.o ide-detect.o
80 O_TARGET := idedriver.o
81
82 include $(TOPDIR)/Rules.make
83
84 ide-core.o:     $(ide-core-objs)
85         $(LD) -r -o $@ $(ide-core-objs)
86
87 ide-detect.o:   $(ide-detect-objs)
88         $(LD) -r -o $@ $(ide-detect-objs)
89