]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/usb/gadget/Makefile
Switch from archive libraries to partial linking
[people/ms/u-boot.git] / drivers / usb / gadget / Makefile
index 1d7362dc979c058148982c65665eb8bada42f78f..f1378173910e31f1335f9127dd479510f826955c 100644 (file)
 
 include $(TOPDIR)/config.mk
 
-LIB    := $(obj)libusb_gadget.a
+LIB    := $(obj)libusb_gadget.o
 
+# new USB gadget layer dependencies
+ifdef CONFIG_USB_ETHER
+COBJS-y += ether.o epautoconf.o config.o usbstring.o
+else
+# Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE
 ifdef CONFIG_USB_DEVICE
 COBJS-y += core.o
 COBJS-y += ep0.o
@@ -34,6 +39,7 @@ COBJS-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o
 COBJS-$(CONFIG_PXA27X) += pxa27x_udc.o
 COBJS-$(CONFIG_SPEARUDC) += spr_udc.o
 endif
+endif
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
@@ -42,7 +48,7 @@ OBJS  := $(addprefix $(obj),$(COBJS))
 all:   $(LIB)
 
 $(LIB):        $(obj).depend $(OBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS)
+       $(call cmd_link_o_target, $(OBJS))
 
 #########################################################################