patch-2.3.4 linux/drivers/usb/Makefile

Next file: linux/drivers/usb/acm.c
Previous file: linux/drivers/usb/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.3/linux/drivers/usb/Makefile linux/drivers/usb/Makefile
@@ -7,8 +7,6 @@
 #
 # 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)
@@ -17,67 +15,100 @@
 L_TARGET := usb.a
 M_OBJS   :=
 L_OBJS   :=
-LX_OBJS  :=
-USBX_OBJS := usb.o hub.o usb-debug.o
+
+ifeq ($(CONFIG_USB),y)
+  L_OBJS +=usbcore.o
+endif
+ifeq ($(CONFIG_USB),m)
+  M_OBJS +=usbcore.o
+  MIX_OBJS +=usb.o usb-debug.o usb-core.o
+endif
+
+ifeq ($(CONFIG_USB_UHCI),y)
+    L_OBJS += uhci.o uhci-debug.o
+endif
+
+ifeq ($(CONFIG_USB_UHCI),m)
+      M_OBJS += usb-uhci.o
+    MIX_OBJS += uhci.o uhci-debug.o
+endif
+
+ifeq ($(CONFIG_USB_OHCI),y)
+    L_OBJS += ohci.o ohci-debug.o
+endif
+ifeq ($(CONFIG_USB_OHCI),m)
+      M_OBJS += usb-ohci.o
+      MIX_OBJS += ohci.o ohci-debug.o
+endif
+
+ifeq ($(CONFIG_USB_OHCI_HCD),y)
+    L_OBJS += ohci-hcd.o ohci-root-hub.o
+endif
+ifeq ($(CONFIG_USB_OHCI_HCD),m)
+      M_OBJS += usb-ohci-hcd.o
+      MIX_OBJS += ohci-hcd.o ohci-root-hub.o
+endif
 
 ifeq ($(CONFIG_USB_MOUSE),y)
-  USBX_OBJS += mouse.o
+  L_OBJS += mouse.o
+endif
+ifeq ($(CONFIG_USB_MOUSE),m)
+  M_OBJS  +=mouse.o	
+  MIX_OBJS +=mouse.o
+endif
+
+ifeq ($(CONFIG_USB_HUB),y)
+  L_OBJS += hub.o
+endif
+ifeq ($(CONFIG_USB_HUB),m)
+  M_OBJS  +=hub.o
+  MIX_OBJS +=hub.o	
 endif
 
 ifeq ($(CONFIG_USB_ACM),y)
-  USBX_OBJS += acm.o
+  L_OBJS += acm.o
+endif
+ifeq ($(CONFIG_USB_ACM),m)
+  M_OBJS += acm.o
+  MIX_OBJS +=acm.o
 endif
 
-ifeq ($(CONFIG_USB_KBD),y)
-  USBX_OBJS += keyboard.o keymap.o
+ifeq ($(CONFIG_USB_PRINTER),y)
+  L_OBJS += printer.o
 endif
 
-ifeq ($(CONFIG_USB_AUDIO),y)
-  USBX_OBJS += audio.o
+ifeq ($(CONFIG_USB_PRINTER),m)
+  M_OBJS += printer.o
+  MIX_OBJS += printer.o  
 endif
 
-ifeq ($(CONFIG_USB_CPIA),y)
-  USBX_OBJS += cpia.o
+ifeq ($(CONFIG_USB_KBD),y)
+  L_OBJS += keyboard.o keymap.o
 endif
 
-ifeq ($(CONFIG_USB), y)
-  L_OBJS += $(USBX_OBJS)
+ifeq ($(CONFIG_USB_KBD),m)
+  M_OBJS += usb-keyboard.o
+  MIX_OBJS += keyboard.o keymap.o
 endif
 
-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
+ifeq ($(CONFIG_USB_AUDIO),y)
+  L_OBJS += audio.o
 endif
 
-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
+ifeq ($(CONFIG_USB_AUDIO),m)
+  M_OBJS += audio.o
+  MIX_OBJS += audio.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
+ifeq ($(CONFIG_USB_CPIA),y)
+  L_OBJS += cpia.o
+endif
+
+ifeq ($(CONFIG_USB_CPIA),m)
+  M_OBJS += cpia.o
+  MIX_OBJS += cpia.o
 endif
+
 include $(TOPDIR)/Rules.make
 
 keymap.o: keymap.c
@@ -85,12 +116,19 @@
 keymap.c: maps/serial.map maps/usb.map maps/fixup.map
 	./mkmap > $@
 
-usb-uhci.o: uhci.o uhci-debug.o $(USBX_OBJS)
-	$(LD) $(LD_RFLAG) -r -o $@  uhci.o uhci-debug.o $(USBX_OBJS)
+usb-keyboard.o: keymap.o keyboard.o
+	$(LD) $(LD_RFLAG) -r -o $@  keymap.o keyboard.o 
+
+usb-uhci.o: uhci.o uhci-debug.o 
+	$(LD) $(LD_RFLAG) -r -o $@  uhci.o uhci-debug.o 
 
-usb-ohci.o: ohci.o ohci-debug.o $(USBX_OBJS)
-	$(LD) $(LD_RFLAG) -r -o $@ ohci.o ohci-debug.o $(USBX_OBJS)
+usb-ohci.o: ohci.o ohci-debug.o 
+	$(LD) $(LD_RFLAG) -r -o $@ ohci.o ohci-debug.o 
+       
+usb-ohci-hcd.o: ohci-hcd.o ohci-root-hub.o 
+	$(LD) $(LD_RFLAG) -r -o $@ ohci-hcd.o ohci-root-hub.o 
+       
+usbcore.o: usb.o usb-debug.o usb-core.o
+	$(LD) $(LD_RFLAG) -r -o $@ usb.o usb-debug.o usb-core.o
 
-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)