patch-2.2.18 linux/drivers/usb/Makefile
Next file: linux/drivers/usb/README.kbd
Previous file: linux/drivers/usb/Config.in
Back to the patch index
Back to the overall index
- Lines: 195
- Date:
Tue Sep 12 12:52:02 2000
- Orig file:
v2.2.17/drivers/usb/Makefile
- Orig date:
Fri Apr 21 12:46:37 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/drivers/usb/Makefile linux/drivers/usb/Makefile
@@ -1,88 +1,123 @@
#
-# Makefile for the kernel usb device drivers.
+# Makefile for the kernel USB device drivers.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now inherited from the
-# parent makes..
-#
-# This isn't actually supported yet. Don't try to use it.
-SUB_DIRS :=
-MOD_SUB_DIRS := $(SUB_DIRS)
-ALL_SUB_DIRS := $(SUB_DIRS)
-
-L_TARGET := usb.a
-M_OBJS :=
-L_OBJS :=
-LX_OBJS :=
-USBX_OBJS := usb.o hub.o usb-debug.o
+# Subdirs.
-ifeq ($(CONFIG_USB_MOUSE),y)
- USBX_OBJS += mouse.o
-endif
+SUB_DIRS :=
+MOD_SUB_DIRS := $(SUB_DIRS)
+MOD_IN_SUB_DIRS := $(SUB_DIRS)
+ALL_SUB_DIRS := $(SUB_DIRS) serial
-ifeq ($(CONFIG_USB_KBD),y)
- USBX_OBJS += keyboard.o keymap.o
-endif
+# The target object and module list name.
-ifeq ($(CONFIG_USB_AUDIO),y)
- USBX_OBJS += audio.o
-endif
+O_TARGET := usbdrv.o
+M_OBJS :=
+O_OBJS :=
+MOD_LIST_NAME := USB_MODULES
-ifeq ($(CONFIG_USB), y)
- L_OBJS += $(USBX_OBJS)
-endif
+# Objects that export symbols.
-ifeq ($(CONFIG_USB_UHCI),y)
- ifeq ($(CONFIG_USB), y)
- L_OBJS += uhci.o uhci-debug.o
- else
- ifeq ($(CONFIG_USB),m)
- M_OBJS += usb-uhci.o
- MIX_OBJS += $(USBX_OBJS)
- endif
- endif
-endif
+export-objs := usb.o input.o
-ifeq ($(CONFIG_USB_OHCI),y)
- ifeq ($(CONFIG_USB), y)
- L_OBJS += ohci.o ohci-debug.o
- else
- ifeq ($(CONFIG_USB),m)
- USBO_OBJS += ohci.o ohci-debug.o
- M_OBJS += usb-ohci.o
- MIX_OBJS += $(USBX_OBJS)
- endif
- endif
+# Multipart objects.
+
+list-multi := usbcore.o
+usbcore-objs := usb.o usb-debug.o usb-core.o hub.o
+
+# Optional parts of multipart objects.
+
+ifeq ($(CONFIG_USB_DEVICEFS),y)
+ usbcore-objs += devio.o inode.o drivers.o devices.o
endif
-ifeq ($(CONFIG_USB_OHCI_HCD),y)
- ifeq ($(CONFIG_USB), y)
- L_OBJS += ohci-hcd.o ohci-root-hub.o
- else
- ifeq ($(CONFIG_USB),m)
- USBO_OBJS += ohci-hcd.o ohci-root-hub.o
- M_OBJS += usb-ohci-hcd.o
- MIX_OBJS += $(USBX_OBJS)
- endif
- endif
+# Object file lists.
+
+obj-y :=
+obj-m :=
+obj-n :=
+obj- :=
+
+# Object files in subdirectories
+
+ifeq ($(CONFIG_USB_SERIAL),y)
+ SUB_DIRS += serial
+ obj-y += serial/usb-serial.o
+else
+ ifeq ($(CONFIG_USB_SERIAL),m)
+ MOD_IN_SUB_DIRS += serial
+ endif
endif
-include $(TOPDIR)/Rules.make
-keymap.o: keymap.c
-keymap.c: maps/serial.map maps/usb.map maps/fixup.map
- ./mkmap > $@
+# Each configuration option enables a list of files.
+
+obj-$(CONFIG_USB) += usbcore.o
+obj-$(CONFIG_USB_UHCI) += usb-uhci.o
+obj-$(CONFIG_USB_UHCI_ALT) += uhci.o
+obj-$(CONFIG_USB_OHCI) += usb-ohci.o
+
+obj-$(CONFIG_USB_MOUSE) += usbmouse.o input.o
+obj-$(CONFIG_USB_HID) += hid.o input.o
+obj-$(CONFIG_USB_KBD) += usbkbd.o input.o
+obj-$(CONFIG_USB_WACOM) += wacom.o input.o
+obj-$(CONFIG_USB_WMFORCE) += wmforce.o input.o
+obj-$(CONFIG_INPUT_KEYBDEV) += keybdev.o input.o
+obj-$(CONFIG_INPUT_MOUSEDEV) += mousedev.o input.o
+obj-$(CONFIG_INPUT_JOYDEV) += joydev.o input.o
+obj-$(CONFIG_INPUT_EVDEV) += evdev.o input.o
+
+obj-$(CONFIG_USB_SCANNER) += scanner.o
+obj-$(CONFIG_USB_ACM) += acm.o
+obj-$(CONFIG_USB_PRINTER) += printer.o
+obj-$(CONFIG_USB_AUDIO) += audio.o
+obj-$(CONFIG_USB_IBMCAM) += ibmcam.o
+obj-$(CONFIG_USB_DC2XX) += dc2xx.o
+obj-$(CONFIG_USB_MDC800) += mdc800.o
+obj-$(CONFIG_USB_STORAGE) += usb-storage.o
+obj-$(CONFIG_USB_USS720) += uss720.o
+obj-$(CONFIG_USB_DABUSB) += dabusb.o
+obj-$(CONFIG_USB_PLUSB) += plusb.o
+obj-$(CONFIG_USB_OV511) += ov511.o
+obj-$(CONFIG_USB_PEGASUS) += pegasus.o
+obj-$(CONFIG_USB_RIO500) += rio500.o
+obj-$(CONFIG_USB_DSBR) += dsbr100.o
+obj-$(CONFIG_USB_MICROTEK) += microtek.o
+obj-$(CONFIG_USB_KAWETH) += kaweth.o
+obj-$(CONFIG_USB_BLUETOOTH) += bluetooth.o
+
+# Extract lists of the multi-part drivers.
+# The 'int-*' lists are the intermediate files used to build the multi's.
+
+multi-y := $(filter $(list-multi), $(obj-y))
+multi-m := $(filter $(list-multi), $(obj-m))
+int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs)))
+int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs)))
+
+# Files that are both resident and modular: remove from modular.
+
+obj-m := $(filter-out $(obj-y), $(obj-m))
+int-m := $(filter-out $(int-y), $(int-m))
+
+# Take multi-part drivers out of obj-y and put components in.
+
+obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y)
+
+# Translate to Rules.make lists.
+
+O_OBJS := $(sort $(filter-out $(export-objs), $(obj-y)))
+OX_OBJS := $(sort $(filter $(export-objs), $(obj-y)))
+M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m)))
+MX_OBJS := $(sort $(filter $(export-objs), $(obj-m)))
+MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m)))
+MIX_OBJS := $(sort $(filter $(export-objs), $(int-m)))
+
+# The global Rules.make.
+
+include $(TOPDIR)/Rules.make
-usb-uhci.o: uhci.o uhci-debug.o $(USBX_OBJS)
- $(LD) $(LD_RFLAG) -r -o $@ uhci.o uhci-debug.o $(USBX_OBJS)
+# Link rules for multi-part drivers.
-usb-ohci.o: ohci.o ohci-debug.o $(USBX_OBJS)
- $(LD) $(LD_RFLAG) -r -o $@ ohci.o ohci-debug.o $(USBX_OBJS)
+usbcore.o: $(usbcore-objs)
+ $(LD) -r -o $@ $(usbcore-objs)
-usb-ohci-hcd.o: ohci-hcd.o ohci-root-hub.o $(USBX_OBJS)
- $(LD) $(LD_RFLAG) -r -o $@ ohci-hcd.o ohci-root-hub.o $(USBX_OBJS)
-
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)