blob: 4c2a39a216a8d136d0c05a47df5f7d34b2dcac64 [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
Lukasz Majewskiac3c8312011-10-27 10:36:46 +020021COBJS-$(CONFIG_USB_GADGET_S3C_UDC_OTG) += s3c_udc_otg.o
Kuo-Jung Su78ba07d2013-05-15 15:29:24 +080022COBJS-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
Lukasz Majewskic574de52012-08-06 14:41:05 +020023COBJS-$(CONFIG_USBDOWNLOAD_GADGET) += g_dnl.o
Lukasz Majewskib7a15bf2012-08-06 14:41:06 +020024COBJS-$(CONFIG_DFU_FUNCTION) += f_dfu.o
Lukasz Majewskiac3c8312011-10-27 10:36:46 +020025endif
Vitaly Kuzmichev063019b2010-08-12 16:44:39 +040026ifdef CONFIG_USB_ETHER
Pantelis Antoniouc18ea6d2012-12-03 00:10:28 +000027COBJS-y += ether.o
Vitaly Kuzmichev216c4472011-02-11 18:18:34 +030028COBJS-$(CONFIG_USB_ETH_RNDIS) += rndis.o
Lei Wena91ee2a2011-10-05 08:11:40 -070029COBJS-$(CONFIG_MV_UDC) += mv_udc.o
Lukasz Daleka3d757d2012-10-02 17:04:32 +020030COBJS-$(CONFIG_CPU_PXA25X) += pxa25x_udc.o
Vitaly Kuzmichev063019b2010-08-12 16:44:39 +040031else
Remy Bohmerdf063442009-07-29 18:18:43 +020032# Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE
Jean-Christophe PLAGNIOL-VILLARD5a96f922008-11-07 22:46:21 +010033ifdef CONFIG_USB_DEVICE
Jean-Christophe PLAGNIOL-VILLARD8f6bcf42009-04-03 12:46:58 +020034COBJS-y += core.o
35COBJS-y += ep0.o
Vipin KUMAR33cf5bd2012-03-06 23:39:37 +000036COBJS-$(CONFIG_DW_UDC) += designware_udc.o
Jean-Christophe PLAGNIOL-VILLARD8f6bcf42009-04-03 12:46:58 +020037COBJS-$(CONFIG_OMAP1510) += omap1510_udc.o
38COBJS-$(CONFIG_OMAP1610) += omap1510_udc.o
39COBJS-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o
Marek Vasut85cc88a2011-11-26 07:20:07 +010040COBJS-$(CONFIG_CPU_PXA27X) += pxa27x_udc.o
Jean-Christophe PLAGNIOL-VILLARD5a96f922008-11-07 22:46:21 +010041endif
Vitaly Kuzmichev063019b2010-08-12 16:44:39 +040042endif
Jean-Christophe PLAGNIOL-VILLARD780133c2007-11-24 19:40:11 +010043
44COBJS := $(COBJS-y)
Wolfgang Denka1be4762008-05-20 16:00:29 +020045SRCS := $(COBJS:.o=.c)
46OBJS := $(addprefix $(obj),$(COBJS))
Jean-Christophe PLAGNIOL-VILLARD780133c2007-11-24 19:40:11 +010047
48all: $(LIB)
49
50$(LIB): $(obj).depend $(OBJS)
Sebastien Carliera8d426f2010-11-05 15:48:07 +010051 $(call cmd_link_o_target, $(OBJS))
Jean-Christophe PLAGNIOL-VILLARD780133c2007-11-24 19:40:11 +010052
53#########################################################################
54
55# defines $(obj).depend target
56include $(SRCTREE)/rules.mk
57
58sinclude $(obj).depend
59
60#########################################################################