xref: /freebsd/sys/modules/usb/Makefile (revision df3394b3de0c40cae69e46b795dc794db3a80c2e)
17d0d268bSAndrew Thompson#
27d0d268bSAndrew Thompson# $FreeBSD$
37d0d268bSAndrew Thompson#
47d0d268bSAndrew Thompson# Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
57d0d268bSAndrew Thompson#
67d0d268bSAndrew Thompson# Redistribution and use in source and binary forms, with or without
77d0d268bSAndrew Thompson# modification, are permitted provided that the following conditions
87d0d268bSAndrew Thompson# are met:
97d0d268bSAndrew Thompson# 1. Redistributions of source code must retain the above copyright
107d0d268bSAndrew Thompson#    notice, this list of conditions and the following disclaimer.
117d0d268bSAndrew Thompson# 2. Redistributions in binary form must reproduce the above copyright
127d0d268bSAndrew Thompson#    notice, this list of conditions and the following disclaimer in the
137d0d268bSAndrew Thompson#    documentation and/or other materials provided with the distribution.
147d0d268bSAndrew Thompson#
157d0d268bSAndrew Thompson# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
167d0d268bSAndrew Thompson# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
177d0d268bSAndrew Thompson# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
187d0d268bSAndrew Thompson# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
197d0d268bSAndrew Thompson# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
207d0d268bSAndrew Thompson# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
217d0d268bSAndrew Thompson# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
227d0d268bSAndrew Thompson# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
237d0d268bSAndrew Thompson# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
247d0d268bSAndrew Thompson# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
257d0d268bSAndrew Thompson# SUCH DAMAGE.
267d0d268bSAndrew Thompson#
277d0d268bSAndrew Thompson
28*df3394b3SWarner LoshSYSDIR?=${.CURDIR}/../..
29*df3394b3SWarner Losh.include "${SYSDIR}/conf/kern.opts.mk"
304a47892cSRobert Millan
315708bf48SHans Petter Selasky#
325708bf48SHans Petter Selasky# Check for common USB debug flags to pass when building the USB
335708bf48SHans Petter Selasky# modules in this directory:
345708bf48SHans Petter Selasky#
355708bf48SHans Petter Selasky.if defined(USB_DEBUG)
365708bf48SHans Petter SelaskyMAKE+=" DEBUG_FLAGS+=-DUSB_DEBUG"
375708bf48SHans Petter Selasky.endif
385708bf48SHans Petter Selasky
395708bf48SHans Petter Selasky.if defined(USB_DEBUG) && defined(USB_REQ_DEBUG)
405708bf48SHans Petter SelaskyMAKE+=" DEBUG_FLAGS+=-DUSB_REQ_DEBUG"
415708bf48SHans Petter Selasky.endif
425708bf48SHans Petter Selasky
434a47892cSRobert Millan# Modules that include binary-only blobs of microcode should be selectable by
444a47892cSRobert Millan# MK_SOURCELESS_UCODE option (see below).
454a47892cSRobert Millan
467d0d268bSAndrew ThompsonSUBDIR = usb
4731d98677SRui PauloSUBDIR += ${_dwc_otg} ehci ${_musb} ohci uhci xhci ${_uss820dci} ${_at91dci} \
480b4dc07dSHans Petter Selasky	  ${_atmegadci} ${_avr32dci} ${_rsu} ${_rsufw} ${_saf1761otg}
49a99fe630SRui PauloSUBDIR += ${_rum} ${_run} ${_runfw} ${_uath} upgt usie ural ${_zyd} ${_urtw}
50a99fe630SRui PauloSUBDIR += ${_urtwn} ${_urtwnfw}
51eed447b5SHans Petter SelaskySUBDIR += atp uhid ukbd ums udbp ufm uep wsp
52b20adc2bSAndrew ThompsonSUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \
53884a2a69SHans Petter Selasky	  umct umcs umodem umoscom uplcom uslcom uvisor uvscom
54da089c14SMark JohnstonSUBDIR += uether aue axe axge cdce cue ${_kue} mos rue smsc udav uhso ipheth
5529311227SHans Petter SelaskySUBDIR += urndis
567d0d268bSAndrew ThompsonSUBDIR += usfs umass urio
577d0d268bSAndrew ThompsonSUBDIR += quirk template
5846902503SHans Petter SelaskySUBDIR += ${_g_audio} ${_g_keyboard} ${_g_modem} ${_g_mouse}
5946902503SHans Petter Selasky
6046902503SHans Petter Selasky.if ${MK_USB_GADGET_EXAMPLES} == "yes"
6146902503SHans Petter Selasky_g_audio=	g_audio
6246902503SHans Petter Selasky_g_keyboard=	g_keyboard
6346902503SHans Petter Selasky_g_modem=	g_modem
6446902503SHans Petter Selasky_g_mouse=	g_mouse
6546902503SHans Petter Selasky.endif
667d0d268bSAndrew Thompson
674a47892cSRobert Millan.if ${MK_SOURCELESS_UCODE} != "no"
684a47892cSRobert Millan_rum=		rum
694a47892cSRobert Millan_uath=		uath
704a47892cSRobert Millan_zyd=		zyd
714a47892cSRobert Millan_kue=		kue
72a99fe630SRui Paulo_urtwn=		urtwn
73a99fe630SRui Paulo_urtwnfw=	urtwnfw
74a99fe630SRui Paulo_run=		run
75a99fe630SRui Paulo_runfw=		runfw
76a99fe630SRui Paulo_rsu=		rsu
77a99fe630SRui Paulo_rsufw=		rsufw
784a47892cSRobert Millan.endif
794a47892cSRobert Millan
80c09808d0SWarner Losh.if ${MACHINE_CPUARCH} == "amd64"
8118b223feSWeongyo Jeong_urtw=		urtw
8218b223feSWeongyo Jeong.endif
8318b223feSWeongyo Jeong
84c09808d0SWarner Losh.if ${MACHINE_CPUARCH} == "arm"
857d0d268bSAndrew Thompson_at91dci=	at91dci
867d0d268bSAndrew Thompson_atmegadci=	atmegadci
87e8052eb4SHans Petter Selasky_dwc_otg=	dwc_otg
88e8052eb4SHans Petter Selasky_musb=		musb
89e8052eb4SHans Petter Selasky_uss820dci=	uss820dci
907d0d268bSAndrew Thompson.endif
917d0d268bSAndrew Thompson
92c09808d0SWarner Losh.if ${MACHINE_CPUARCH} == "i386"
9318b223feSWeongyo Jeong_urtw=		urtw
9418b223feSWeongyo Jeong.endif
9518b223feSWeongyo Jeong
962e141748SHans Petter Selasky.if ${MACHINE_CPUARCH} == "avr32"
972e141748SHans Petter Selasky_avr32dci=	avr32dci
982e141748SHans Petter Selasky.endif
992e141748SHans Petter Selasky
1000b4dc07dSHans Petter Selasky.if ${MACHINE_CPUARCH} == "mips"
1010b4dc07dSHans Petter Selasky_saf1761otg=	saf1761otg
1020b4dc07dSHans Petter Selasky.endif
1030b4dc07dSHans Petter Selasky
1047d0d268bSAndrew Thompson.include <bsd.subdir.mk>
105