2 # (C) Copyright 2000-2007
3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 # SPDX-License-Identifier: GPL-2.0+
8 include $(TOPDIR)/config.mk
10 LIB := $(obj)libusb_gadget.o
12 # if defined(CONFIG_USB_GADGET) || defined(CONFIG_USB_ETHER)
13 # Everytime you forget how crufty makefiles can get things like
15 ifneq (,$(CONFIG_USB_GADGET)$(CONFIG_USB_ETHER))
16 COBJS-y += epautoconf.o config.o usbstring.o
19 # new USB gadget layer dependencies
20 ifdef CONFIG_USB_GADGET
21 COBJS-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
22 COBJS-$(CONFIG_USB_GADGET_S3C_UDC_OTG) += s3c_udc_otg.o
23 COBJS-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
24 COBJS-$(CONFIG_USBDOWNLOAD_GADGET) += g_dnl.o
25 COBJS-$(CONFIG_DFU_FUNCTION) += f_dfu.o
27 ifdef CONFIG_USB_ETHER
29 COBJS-$(CONFIG_USB_ETH_RNDIS) += rndis.o
30 COBJS-$(CONFIG_MV_UDC) += mv_udc.o
31 COBJS-$(CONFIG_CPU_PXA25X) += pxa25x_udc.o
33 # Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE
34 ifdef CONFIG_USB_DEVICE
37 COBJS-$(CONFIG_DW_UDC) += designware_udc.o
38 COBJS-$(CONFIG_OMAP1510) += omap1510_udc.o
39 COBJS-$(CONFIG_OMAP1610) += omap1510_udc.o
40 COBJS-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o
41 COBJS-$(CONFIG_CPU_PXA27X) += pxa27x_udc.o
46 SRCS := $(COBJS:.o=.c)
47 OBJS := $(addprefix $(obj),$(COBJS))
51 $(LIB): $(obj).depend $(OBJS)
52 $(call cmd_link_o_target, $(OBJS))
54 #########################################################################
56 # defines $(obj).depend target
57 include $(SRCTREE)/rules.mk
59 sinclude $(obj).depend
61 #########################################################################