Import 2.3.25pre1
[davej-history.git] / drivers / usb / Makefile
blobdbd8aa1693b3fefc2dac3eb3b1141ae3d707e5ae
2 # Makefile for the kernel usb device drivers.
4 # Note! Dependencies are done automagically by 'make dep', which also
5 # removes any old dependencies. DON'T put your own dependencies here
6 # unless it's something special (ie not a .c file).
8 # Note 2! The CFLAGS definitions are now inherited from the
9 # parent makes..
11 SUB_DIRS :=
12 MOD_SUB_DIRS := $(SUB_DIRS)
13 ALL_SUB_DIRS := $(SUB_DIRS)
15 L_TARGET := usb.a
16 M_OBJS :=
17 L_OBJS :=
18 MOD_LIST_NAME := USB_MODULES
20 ifeq ($(CONFIG_USB),y)
21 L_OBJS += usbcore.o
22 ifeq ($(CONFIG_USB_PROC),y)
23 L_OBJS += proc_usb.o
24 endif
25 endif
26 ifeq ($(CONFIG_USB),m)
27 M_OBJS += usbcore.o
28 MIX_OBJS += usb.o usb-debug.o usb-core.o
29 ifeq ($(CONFIG_USB_PROC),y)
30 MIX_OBJS += proc_usb.o
31 endif
32 endif
34 ifeq ($(CONFIG_USB_UHCI),y)
35 L_OBJS += uhci.o uhci-debug.o
36 endif
38 ifeq ($(CONFIG_USB_UHCI),m)
39 M_OBJS += usb-uhci.o
40 MIX_OBJS += uhci.o uhci-debug.o
41 endif
43 ifeq ($(CONFIG_USB_OHCI),y)
44 L_OBJS += ohci.o ohci-debug.o
45 endif
46 ifeq ($(CONFIG_USB_OHCI),m)
47 M_OBJS += usb-ohci.o
48 MIX_OBJS += ohci.o ohci-debug.o
49 endif
51 ifeq ($(CONFIG_USB_OHCI_HCD),y)
52 L_OBJS += ohci-hcd.o ohci-root-hub.o
53 endif
54 ifeq ($(CONFIG_USB_OHCI_HCD),m)
55 M_OBJS += usb-ohci-hcd.o
56 MIX_OBJS += ohci-hcd.o ohci-root-hub.o
57 endif
59 ifeq ($(CONFIG_USB_MOUSE),y)
60 L_OBJS += mouse.o
61 endif
62 ifeq ($(CONFIG_USB_MOUSE),m)
63 M_OBJS += mouse.o
64 MIX_OBJS += mouse.o
65 endif
67 ifeq ($(CONFIG_USB_HP_SCANNER),y)
68 L_OBJS += hp_scanner.o
69 endif
70 ifeq ($(CONFIG_USB_HP_SCANNER),m)
71 M_OBJS +=hp_scanner.o
72 MIX_OBJS +=hp_scanner.o
73 endif
75 ifeq ($(CONFIG_USB_HUB),y)
76 L_OBJS += hub.o
77 endif
78 ifeq ($(CONFIG_USB_HUB),m)
79 M_OBJS += hub.o
80 MIX_OBJS += hub.o
81 endif
83 ifeq ($(CONFIG_USB_ACM),y)
84 L_OBJS += acm.o
85 endif
86 ifeq ($(CONFIG_USB_ACM),m)
87 M_OBJS += acm.o
88 MIX_OBJS += acm.o
89 endif
91 ifeq ($(CONFIG_USB_PRINTER),y)
92 L_OBJS += printer.o
93 endif
95 ifeq ($(CONFIG_USB_PRINTER),m)
96 M_OBJS += printer.o
97 MIX_OBJS += printer.o
98 endif
100 ifeq ($(CONFIG_USB_SERIAL),y)
101 L_OBJS += usb-serial.o
102 endif
104 ifeq ($(CONFIG_USB_SERIAL),m)
105 M_OBJS += usb-serial.o
106 MIX_OBJS += usb-serial.o
107 endif
109 ifneq ($(CONFIG_ADB_KEYBOARD),y)
110 KEYMAP=keymap
111 else
112 KEYMAP=keymap-mac
113 endif
115 ifeq ($(CONFIG_USB_KBD),y)
116 L_OBJS += keyboard.o $(KEYMAP).o
117 endif
119 ifeq ($(CONFIG_USB_KBD),m)
120 M_OBJS += usb-keyboard.o
121 MIX_OBJS += keyboard.o $(KEYMAP).o
122 endif
124 ifeq ($(CONFIG_USB_AUDIO),y)
125 L_OBJS += audio.o
126 endif
128 ifeq ($(CONFIG_USB_AUDIO),m)
129 M_OBJS += audio.o
130 MIX_OBJS += audio.o
131 endif
133 ifeq ($(CONFIG_USB_CPIA),y)
134 L_OBJS += cpia.o
135 endif
137 ifeq ($(CONFIG_USB_CPIA),m)
138 M_OBJS += cpia.o
139 MIX_OBJS += cpia.o
140 endif
142 ifeq ($(CONFIG_USB_SCSI),y)
143 L_OBJS += usb_scsi.o
144 ifeq ($(CONFIG_USB_SCSI_DEBUG),y)
145 L_OBJS += usb_scsi_debug.o
146 endif
147 endif
149 ifeq ($(CONFIG_USB_SCSI),m)
150 M_OBJS += usb-scsi.o
151 MIX_OBJS += usb_scsi.o
152 ifeq ($(CONFIG_USB_SCSI_DEBUG),y)
153 MIX_OBJS += usb_scsi_debug.o
154 endif
155 endif
157 ifeq ($(CONFIG_USB_EZUSB),y)
158 L_OBJS += ezusb.o
159 endif
161 ifeq ($(CONFIG_USB_EZUSB),m)
162 M_OBJS += ezusb.o
163 MIX_OBJS += ezusb.o
164 endif
166 ifeq ($(CONFIG_USB_USS720),y)
167 L_OBJS += uss720.o
168 endif
170 ifeq ($(CONFIG_USB_USS720),m)
171 M_OBJS += uss720.o
172 MIX_OBJS += uss720.o
173 endif
175 include $(TOPDIR)/Rules.make
177 keymap.o: keymap.c
179 keymap.c: maps/serial.map maps/usb.map maps/fixup.map
180 ./mkmap > $@
182 keymap-mac.o: keymap-mac.c
183 keymap-mac.c: maps/mac.map maps/usb.map
184 ./mkmap.adb > $@
186 usb-keyboard.o: $(KEYMAP).o keyboard.o
187 $(LD) $(LD_RFLAG) -r -o $@ $(KEYMAP).o keyboard.o
189 ifeq ($(CONFIG_USB_SCSI_DEBUG),y)
190 usb-scsi.o: usb_scsi.o usb_scsi_debug.o
191 $(LD) $(LD_RFLAG) -r -o $@ usb_scsi.o usb_scsi_debug.o
192 else
193 usb-scsi.o: usb_scsi.o
194 $(LD) $(LD_RFLAG) -r -o $@ usb_scsi.o
195 endif
197 usb-uhci.o: uhci.o uhci-debug.o
198 $(LD) $(LD_RFLAG) -r -o $@ uhci.o uhci-debug.o
200 usb-ohci.o: ohci.o ohci-debug.o
201 $(LD) $(LD_RFLAG) -r -o $@ ohci.o ohci-debug.o
203 usb-ohci-hcd.o: ohci-hcd.o ohci-root-hub.o
204 $(LD) $(LD_RFLAG) -r -o $@ ohci-hcd.o ohci-root-hub.o
206 ifeq ($(CONFIG_USB_PROC),y)
207 usbcore.o: usb.o usb-debug.o usb-core.o proc_usb.o
208 $(LD) $(LD_RFLAG) -r -o $@ usb.o usb-debug.o usb-core.o proc_usb.o
209 else
210 usbcore.o: usb.o usb-debug.o usb-core.o
211 $(LD) $(LD_RFLAG) -r -o $@ usb.o usb-debug.o usb-core.o
212 endif