2007-11-24 18:40:11 +00:00
|
|
|
#
|
|
|
|
# (C) Copyright 2000-2007
|
|
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
#
|
2013-07-08 07:37:19 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2007-11-24 18:40:11 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/config.mk
|
|
|
|
|
2010-11-05 14:48:07 +00:00
|
|
|
LIB := $(obj)libusb_gadget.o
|
2007-11-24 18:40:11 +00:00
|
|
|
|
2012-12-03 00:10:28 +00:00
|
|
|
# if defined(CONFIG_USB_GADGET) || defined(CONFIG_USB_ETHER)
|
|
|
|
# Everytime you forget how crufty makefiles can get things like
|
|
|
|
# this remind you...
|
|
|
|
ifneq (,$(CONFIG_USB_GADGET)$(CONFIG_USB_ETHER))
|
|
|
|
COBJS-y += epautoconf.o config.o usbstring.o
|
|
|
|
endif
|
|
|
|
|
2010-08-12 12:44:39 +00:00
|
|
|
# new USB gadget layer dependencies
|
2011-10-27 08:36:46 +00:00
|
|
|
ifdef CONFIG_USB_GADGET
|
2013-09-11 10:24:49 +00:00
|
|
|
COBJS-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
|
2011-10-27 08:36:46 +00:00
|
|
|
COBJS-$(CONFIG_USB_GADGET_S3C_UDC_OTG) += s3c_udc_otg.o
|
2013-05-15 07:29:24 +00:00
|
|
|
COBJS-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
|
2012-08-06 12:41:05 +00:00
|
|
|
COBJS-$(CONFIG_USBDOWNLOAD_GADGET) += g_dnl.o
|
2012-08-06 12:41:06 +00:00
|
|
|
COBJS-$(CONFIG_DFU_FUNCTION) += f_dfu.o
|
2013-09-17 13:58:21 +00:00
|
|
|
COBJS-$(CONFIG_USB_GADGET_MASS_STORAGE) += f_mass_storage.o
|
2011-10-27 08:36:46 +00:00
|
|
|
endif
|
2010-08-12 12:44:39 +00:00
|
|
|
ifdef CONFIG_USB_ETHER
|
2012-12-03 00:10:28 +00:00
|
|
|
COBJS-y += ether.o
|
2011-02-11 15:18:34 +00:00
|
|
|
COBJS-$(CONFIG_USB_ETH_RNDIS) += rndis.o
|
2011-10-05 15:11:40 +00:00
|
|
|
COBJS-$(CONFIG_MV_UDC) += mv_udc.o
|
2012-10-02 15:04:32 +00:00
|
|
|
COBJS-$(CONFIG_CPU_PXA25X) += pxa25x_udc.o
|
2010-08-12 12:44:39 +00:00
|
|
|
else
|
2009-07-29 16:18:43 +00:00
|
|
|
# Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE
|
2008-11-07 21:46:21 +00:00
|
|
|
ifdef CONFIG_USB_DEVICE
|
2009-04-03 10:46:58 +00:00
|
|
|
COBJS-y += core.o
|
|
|
|
COBJS-y += ep0.o
|
2012-03-06 23:39:37 +00:00
|
|
|
COBJS-$(CONFIG_DW_UDC) += designware_udc.o
|
2009-04-03 10:46:58 +00:00
|
|
|
COBJS-$(CONFIG_OMAP1510) += omap1510_udc.o
|
|
|
|
COBJS-$(CONFIG_OMAP1610) += omap1510_udc.o
|
|
|
|
COBJS-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o
|
2011-11-26 06:20:07 +00:00
|
|
|
COBJS-$(CONFIG_CPU_PXA27X) += pxa27x_udc.o
|
2008-11-07 21:46:21 +00:00
|
|
|
endif
|
2010-08-12 12:44:39 +00:00
|
|
|
endif
|
2007-11-24 18:40:11 +00:00
|
|
|
|
|
|
|
COBJS := $(COBJS-y)
|
2008-05-20 14:00:29 +00:00
|
|
|
SRCS := $(COBJS:.o=.c)
|
|
|
|
OBJS := $(addprefix $(obj),$(COBJS))
|
2007-11-24 18:40:11 +00:00
|
|
|
|
|
|
|
all: $(LIB)
|
|
|
|
|
|
|
|
$(LIB): $(obj).depend $(OBJS)
|
2010-11-05 14:48:07 +00:00
|
|
|
$(call cmd_link_o_target, $(OBJS))
|
2007-11-24 18:40:11 +00:00
|
|
|
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
# defines $(obj).depend target
|
|
|
|
include $(SRCTREE)/rules.mk
|
|
|
|
|
|
|
|
sinclude $(obj).depend
|
|
|
|
|
|
|
|
#########################################################################
|