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 26endif 27ifdef CONFIG_USB_ETHER 28COBJS-y += ether.o 29COBJS-$(CONFIG_USB_ETH_RNDIS) += rndis.o 30COBJS-$(CONFIG_MV_UDC) += mv_udc.o 31COBJS-$(CONFIG_CPU_PXA25X) += pxa25x_udc.o 32else 33# Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE 34ifdef CONFIG_USB_DEVICE 35COBJS-y += core.o 36COBJS-y += ep0.o 37COBJS-$(CONFIG_DW_UDC) += designware_udc.o 38COBJS-$(CONFIG_OMAP1510) += omap1510_udc.o 39COBJS-$(CONFIG_OMAP1610) += omap1510_udc.o 40COBJS-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o 41COBJS-$(CONFIG_CPU_PXA27X) += pxa27x_udc.o 42endif 43endif 44 45COBJS := $(COBJS-y) 46SRCS := $(COBJS:.o=.c) 47OBJS := $(addprefix $(obj),$(COBJS)) 48 49all: $(LIB) 50 51$(LIB): $(obj).depend $(OBJS) 52 $(call cmd_link_o_target, $(OBJS)) 53 54######################################################################### 55 56# defines $(obj).depend target 57include $(SRCTREE)/rules.mk 58 59sinclude $(obj).depend 60 61######################################################################### 62