]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - stand/usb/usbcore.mk
libcxxrt: don't export nonexistant symbols
[FreeBSD/FreeBSD.git] / stand / usb / usbcore.mk
1 #
2 #
3 # Copyright (c) 2013-2020 Hans Petter Selasky.
4 # Copyright (c) 2014 SRI International
5 # All rights reserved.
6 #
7 # This software was developed by SRI International and the University of
8 # Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
9 # ("CTSRD"), as part of the DARPA CRASH research programme.
10 #
11 # Redistribution and use in source and binary forms, with or without
12 # modification, are permitted provided that the following conditions
13 # are met:
14 # 1. Redistributions of source code must retain the above copyright
15 #    notice, this list of conditions and the following disclaimer.
16 # 2. Redistributions in binary form must reproduce the above copyright
17 #    notice, this list of conditions and the following disclaimer in the
18 #    documentation and/or other materials provided with the distribution.
19 #
20 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
21 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 # ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 # SUCH DAMAGE.
31 #
32
33 USBCOREDIR:=    ${.PARSEDIR}
34 S=${USBCOREDIR}/../../sys
35
36 MACHDEP_DIRS=
37
38 .if defined(HAVE_EXYNOS_EHCI)
39 MACHDEP_DIRS+=  ${S}/arm/samsung/exynos
40 .endif
41
42 .PATH: \
43         ${USBCOREDIR} \
44         ${USBCOREDIR}/storage \
45         ${S}/dev/usb \
46         ${S}/dev/usb/controller \
47         ${S}/dev/usb/serial \
48         ${S}/dev/usb/storage \
49         ${S}/dev/usb/template \
50         ${MACHDEP_DIRS}
51 .undef S
52
53 USB_POOL_SIZE?= 131072
54
55 CFLAGS+=        -DUSB_MSCTEST_BULK_SIZE=65536
56 CFLAGS+=        -DUSB_POOL_SIZE=${USB_POOL_SIZE}
57
58
59 #
60 # BUSDMA implementation
61 #
62 SRCS+=  usb_busdma_loader.c
63
64 #
65 # USB controller drivers
66 #
67
68 KSRCS+= usb_controller.c
69
70 .if defined(HAVE_AT91DCI)
71 CFLAGS += -DUSB_PCI_PROBE_LIST="\"at91dci\""
72 KSRCS+= at91dci.c
73 .endif
74
75 .if defined(HAVE_ATMEGADCI)
76 CFLAGS += -DUSB_PCI_PROBE_LIST="\"atmegadci\""
77 KSRCS+= atmegadci.c
78 .endif
79
80 .if defined(HAVE_AVR32DCI)
81 CFLAGS += -DUSB_PCI_PROBE_LIST="\"avr32dci\""
82 KSRCS+= avr32dci.c
83 .endif
84
85 .if defined(HAVE_DWCOTG)
86 CFLAGS += -DUSB_PCI_PROBE_LIST="\"dwcotg\""
87 KSRCS+= dwcotg.c
88 .endif
89
90 .if defined(HAVE_MUSBOTG)
91 CFLAGS += -DUSB_PCI_PROBE_LIST="\"musbotg\""
92 KSRCS+= musbotg.c
93 .endif
94
95 .if defined(HAVE_EHCI)
96 CFLAGS += -DUSB_PCI_PROBE_LIST="\"ehci\""
97 KSRCS+= ehci.c
98 .endif
99
100 .if defined(HAVE_EXYNOS_EHCI)
101 CFLAGS += -DUSB_PCI_PROBE_LIST="\"combiner\", \"pad\", \"ehci\""
102 KSRCS+= ehci.c
103 KSRCS+= exynos5_combiner.c
104 KSRCS+= exynos5_pad.c
105 KSRCS+= exynos5_ehci.c
106 .endif
107
108 .if defined(HAVE_OHCI)
109 CFLAGS += -DUSB_PCI_PROBE_LIST="\"ohci\""
110 KSRCS+= ohci.c
111 .endif
112
113 .if defined(HAVE_UHCI)
114 CFLAGS += -DUSB_PCI_PROBE_LIST="\"uhci\""
115 KSRCS+= uhci.c
116 .endif
117
118 .if defined(HAVE_XHCI)
119 CFLAGS += -DUSB_PCI_PROBE_LIST="\"xhci\""
120 KSRCS+= xhci.c
121 .endif
122
123 .if defined(HAVE_USS820DCI)
124 CFLAGS += -DUSB_PCI_PROBE_LIST="\"uss820dci\""
125 KSRCS+= uss820dci.c
126 .endif
127
128 #
129 # USB core and templates
130 #
131 KSRCS+= usb_core.c
132 KSRCS+= usb_debug.c
133 KSRCS+= usb_device.c
134 KSRCS+= usb_dynamic.c
135 KSRCS+= usb_error.c
136 KSRCS+= usb_handle_request.c
137 KSRCS+= usb_hid.c
138 KSRCS+= usb_hub.c
139 KSRCS+= usb_lookup.c
140 KSRCS+= usb_msctest.c
141 KSRCS+= usb_parse.c
142 KSRCS+= usb_request.c
143 KSRCS+= usb_transfer.c
144 KSRCS+= usb_util.c
145 KSRCS+= usb_template.c
146 KSRCS+= usb_template_cdce.c
147 KSRCS+= usb_template_msc.c
148 KSRCS+= usb_template_mtp.c
149 KSRCS+= usb_template_modem.c
150 KSRCS+= usb_template_mouse.c
151 KSRCS+= usb_template_kbd.c
152 KSRCS+= usb_template_audio.c
153 KSRCS+= usb_template_phone.c
154 KSRCS+= usb_template_serialnet.c
155 KSRCS+= usb_template_midi.c
156 KSRCS+= usb_template_multi.c
157 KSRCS+= usb_template_cdceem.c
158
159 #
160 # USB mass storage support
161 #
162 SRCS+=  umass_common.c
163
164 .if defined(HAVE_UMASS_LOADER)
165 CFLAGS+=        -I${.CURDIR}/../common
166 SRCS+=  umass_loader.c
167 .endif
168