xref: /openbmc/u-boot/drivers/usb/gadget/Makefile (revision f9727161)
1#
2# (C) Copyright 2000-2007
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
5# SPDX-License-Identifier:	GPL-2.0+
6#
7
8include $(TOPDIR)/config.mk
9
10LIB	:= $(obj)libusb_gadget.o
11
12# if defined(CONFIG_USB_GADGET) || defined(CONFIG_USB_ETHER)
13#   Everytime you forget how crufty makefiles can get things like
14#   this remind you...
15ifneq (,$(CONFIG_USB_GADGET)$(CONFIG_USB_ETHER))
16COBJS-y += epautoconf.o config.o usbstring.o
17endif
18
19# new USB gadget layer dependencies
20ifdef CONFIG_USB_GADGET
21COBJS-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
22COBJS-$(CONFIG_USB_GADGET_S3C_UDC_OTG) += s3c_udc_otg.o
23COBJS-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
24COBJS-$(CONFIG_USBDOWNLOAD_GADGET) += g_dnl.o
25COBJS-$(CONFIG_DFU_FUNCTION) += f_dfu.o
26COBJS-$(CONFIG_USB_GADGET_MASS_STORAGE) += f_mass_storage.o
27endif
28ifdef CONFIG_USB_ETHER
29COBJS-y += ether.o
30COBJS-$(CONFIG_USB_ETH_RNDIS) += rndis.o
31COBJS-$(CONFIG_MV_UDC)	+= mv_udc.o
32COBJS-$(CONFIG_CPU_PXA25X) += pxa25x_udc.o
33else
34# Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE
35ifdef CONFIG_USB_DEVICE
36COBJS-y += core.o
37COBJS-y += ep0.o
38COBJS-$(CONFIG_DW_UDC) += designware_udc.o
39COBJS-$(CONFIG_OMAP1510) += omap1510_udc.o
40COBJS-$(CONFIG_OMAP1610) += omap1510_udc.o
41COBJS-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o
42COBJS-$(CONFIG_CPU_PXA27X) += pxa27x_udc.o
43endif
44endif
45
46COBJS	:= $(COBJS-y)
47SRCS	:= $(COBJS:.o=.c)
48OBJS	:= $(addprefix $(obj),$(COBJS))
49
50all:	$(LIB)
51
52$(LIB):	$(obj).depend $(OBJS)
53	$(call cmd_link_o_target, $(OBJS))
54
55#########################################################################
56
57# defines $(obj).depend target
58include $(SRCTREE)/rules.mk
59
60sinclude $(obj).depend
61
62#########################################################################
63