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