blob: afaf5ce872f1c4bc73fda97d619e65cc0293fc43 [file] [log] [blame]
Jean-Christophe PLAGNIOL-VILLARD780133c2007-11-24 19:40:11 +01001#
2# (C) Copyright 2000-2007
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005# SPDX-License-Identifier: GPL-2.0+
Jean-Christophe PLAGNIOL-VILLARD780133c2007-11-24 19:40:11 +01006#
7
8include $(TOPDIR)/config.mk
9
Sebastien Carliera8d426f2010-11-05 15:48:07 +010010LIB := $(obj)libusb_gadget.o
Jean-Christophe PLAGNIOL-VILLARD780133c2007-11-24 19:40:11 +010011
Pantelis Antoniouc18ea6d2012-12-03 00:10:28 +000012# 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
Vitaly Kuzmichev063019b2010-08-12 16:44:39 +040019# new USB gadget layer dependencies
Lukasz Majewskiac3c8312011-10-27 10:36:46 +020020ifdef CONFIG_USB_GADGET
Bo Shen70a67fd2013-09-11 18:24:49 +080021COBJS-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
Lukasz Majewskiac3c8312011-10-27 10:36:46 +020022COBJS-$(CONFIG_USB_GADGET_S3C_UDC_OTG) += s3c_udc_otg.o
Kuo-Jung Su78ba07d2013-05-15 15:29:24 +080023COBJS-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
Lukasz Majewski61e54932013-10-08 14:30:42 +020024COBJS-$(CONFIG_THOR_FUNCTION) += f_thor.o
Lukasz Majewskic574de52012-08-06 14:41:05 +020025COBJS-$(CONFIG_USBDOWNLOAD_GADGET) += g_dnl.o
Lukasz Majewskib7a15bf2012-08-06 14:41:06 +020026COBJS-$(CONFIG_DFU_FUNCTION) += f_dfu.o
Lukasz Majewski0c635232013-09-17 15:58:21 +020027COBJS-$(CONFIG_USB_GADGET_MASS_STORAGE) += f_mass_storage.o
Lukasz Majewskiac3c8312011-10-27 10:36:46 +020028endif
Vitaly Kuzmichev063019b2010-08-12 16:44:39 +040029ifdef CONFIG_USB_ETHER
Pantelis Antoniouc18ea6d2012-12-03 00:10:28 +000030COBJS-y += ether.o
Vitaly Kuzmichev216c4472011-02-11 18:18:34 +030031COBJS-$(CONFIG_USB_ETH_RNDIS) += rndis.o
Lei Wena91ee2a2011-10-05 08:11:40 -070032COBJS-$(CONFIG_MV_UDC) += mv_udc.o
Lukasz Daleka3d757d2012-10-02 17:04:32 +020033COBJS-$(CONFIG_CPU_PXA25X) += pxa25x_udc.o
Vitaly Kuzmichev063019b2010-08-12 16:44:39 +040034else
Remy Bohmerdf063442009-07-29 18:18:43 +020035# Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE
Jean-Christophe PLAGNIOL-VILLARD5a96f922008-11-07 22:46:21 +010036ifdef CONFIG_USB_DEVICE
Jean-Christophe PLAGNIOL-VILLARD8f6bcf42009-04-03 12:46:58 +020037COBJS-y += core.o
38COBJS-y += ep0.o
Vipin KUMAR33cf5bd2012-03-06 23:39:37 +000039COBJS-$(CONFIG_DW_UDC) += designware_udc.o
Jean-Christophe PLAGNIOL-VILLARD8f6bcf42009-04-03 12:46:58 +020040COBJS-$(CONFIG_OMAP1510) += omap1510_udc.o
41COBJS-$(CONFIG_OMAP1610) += omap1510_udc.o
42COBJS-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o
Marek Vasut85cc88a2011-11-26 07:20:07 +010043COBJS-$(CONFIG_CPU_PXA27X) += pxa27x_udc.o
Jean-Christophe PLAGNIOL-VILLARD5a96f922008-11-07 22:46:21 +010044endif
Vitaly Kuzmichev063019b2010-08-12 16:44:39 +040045endif
Jean-Christophe PLAGNIOL-VILLARD780133c2007-11-24 19:40:11 +010046
47COBJS := $(COBJS-y)
Wolfgang Denka1be4762008-05-20 16:00:29 +020048SRCS := $(COBJS:.o=.c)
49OBJS := $(addprefix $(obj),$(COBJS))
Jean-Christophe PLAGNIOL-VILLARD780133c2007-11-24 19:40:11 +010050
51all: $(LIB)
52
53$(LIB): $(obj).depend $(OBJS)
Sebastien Carliera8d426f2010-11-05 15:48:07 +010054 $(call cmd_link_o_target, $(OBJS))
Jean-Christophe PLAGNIOL-VILLARD780133c2007-11-24 19:40:11 +010055
56#########################################################################
57
58# defines $(obj).depend target
59include $(SRCTREE)/rules.mk
60
61sinclude $(obj).depend
62
63#########################################################################