2 # Makefile for the kernel USB device drivers.
8 MOD_SUB_DIRS
:= $(SUB_DIRS
)
9 MOD_IN_SUB_DIRS
:= $(SUB_DIRS
)
10 ALL_SUB_DIRS
:= $(SUB_DIRS
) serial
12 # The target object and module list name.
17 MOD_LIST_NAME
:= USB_MODULES
19 # Objects that export symbols.
21 export-objs
:= usb.o input.o
25 list-multi
:= usbcore.o
26 usbcore-objs
:= usb.o usb-debug.o usb-core.o hub.o
28 # Optional parts of multipart objects.
30 ifeq ($(CONFIG_USB_DEVICEFS
),y
)
31 usbcore-objs
+= devio.o inode.o drivers.o devices.o
41 # Object files in subdirectories
43 ifeq ($(CONFIG_USB_SERIAL
),y
)
45 obj-y
+= serial
/usb-serial.o
47 ifeq ($(CONFIG_USB_SERIAL
),m
)
48 MOD_IN_SUB_DIRS
+= serial
53 # Each configuration option enables a list of files.
55 obj-
$(CONFIG_USB
) += usbcore.o
56 obj-
$(CONFIG_USB_UHCI
) += usb-uhci.o
57 obj-
$(CONFIG_USB_UHCI_ALT
) += uhci.o
58 obj-
$(CONFIG_USB_OHCI
) += usb-ohci.o
60 obj-
$(CONFIG_USB_MOUSE
) += usbmouse.o input.o
61 obj-
$(CONFIG_USB_HID
) += hid.o input.o
62 obj-
$(CONFIG_USB_KBD
) += usbkbd.o input.o
63 obj-
$(CONFIG_USB_WACOM
) += wacom.o input.o
64 obj-
$(CONFIG_INPUT_IFORCE
) += iforce.o input.o
65 obj-
$(CONFIG_INPUT_KEYBDEV
) += keybdev.o input.o
66 obj-
$(CONFIG_INPUT_MOUSEDEV
) += mousedev.o input.o
67 obj-
$(CONFIG_INPUT_JOYDEV
) += joydev.o input.o
68 obj-
$(CONFIG_INPUT_EVDEV
) += evdev.o input.o
70 obj-
$(CONFIG_USB_SCANNER
) += scanner.o
71 obj-
$(CONFIG_USB_ACM
) += acm.o
72 obj-
$(CONFIG_USB_PRINTER
) += printer.o
73 obj-
$(CONFIG_USB_AUDIO
) += audio.o
74 obj-
$(CONFIG_USB_IBMCAM
) += ibmcam.o
75 obj-
$(CONFIG_USB_DC2XX
) += dc2xx.o
76 obj-
$(CONFIG_USB_MDC800
) += mdc800.o
77 obj-
$(CONFIG_USB_STORAGE
) += usb-storage.o
78 obj-
$(CONFIG_USB_USS720
) += uss720.o
79 obj-
$(CONFIG_USB_DABUSB
) += dabusb.o
80 obj-
$(CONFIG_USB_PLUSB
) += plusb.o
81 obj-
$(CONFIG_USB_OV511
) += ov511.o
82 obj-
$(CONFIG_USB_PEGASUS
) += pegasus.o
83 obj-
$(CONFIG_USB_RIO500
) += rio500.o
84 obj-
$(CONFIG_USB_DSBR
) += dsbr100.o
85 obj-
$(CONFIG_USB_MICROTEK
) += microtek.o
87 # Extract lists of the multi-part drivers.
88 # The 'int-*' lists are the intermediate files used to build the multi's.
90 multi-y
:= $(filter $(list-multi
), $(obj-y
))
91 multi-m
:= $(filter $(list-multi
), $(obj-m
))
92 int-y
:= $(sort $(foreach m
, $(multi-y
), $($(basename $(m
))-objs
)))
93 int-m
:= $(sort $(foreach m
, $(multi-m
), $($(basename $(m
))-objs
)))
95 # Files that are both resident and modular: remove from modular.
97 obj-m
:= $(filter-out $(obj-y
), $(obj-m
))
98 int-m
:= $(filter-out $(int-y
), $(int-m
))
100 # Take multi-part drivers out of obj-y and put components in.
102 obj-y
:= $(filter-out $(list-multi
), $(obj-y
)) $(int-y
)
104 # Translate to Rules.make lists.
106 O_OBJS
:= $(sort $(filter-out $(export-objs
), $(obj-y
)))
107 OX_OBJS
:= $(sort $(filter $(export-objs
), $(obj-y
)))
108 M_OBJS
:= $(sort $(filter-out $(export-objs
), $(obj-m
)))
109 MX_OBJS
:= $(sort $(filter $(export-objs
), $(obj-m
)))
110 MI_OBJS
:= $(sort $(filter-out $(export-objs
), $(int-m
)))
111 MIX_OBJS
:= $(sort $(filter $(export-objs
), $(int-m
)))
113 # The global Rules.make.
115 include $(TOPDIR
)/Rules.make
117 # Link rules for multi-part drivers.
119 usbcore.o
: $(usbcore-objs
)
120 $(LD
) -r
-o
$@
$(usbcore-objs
)