jtag: drivers: provide initial support for usb path filtering
[openocd.git] / src / jtag / drivers / Makefile.am
1 noinst_LTLIBRARIES += %D%/libocdjtagdrivers.la
2 %C%_libocdjtagdrivers_la_LIBADD =
3
4 %C%_libocdjtagdrivers_la_SOURCES = \
5         $(DRIVERFILES) \
6         $(DRIVERHEADERS)
7
8 %C%_libocdjtagdrivers_la_CPPFLAGS = $(AM_CPPFLAGS)
9
10 ULINK_FIRMWARE = %D%/OpenULINK
11
12 EXTRA_DIST += $(ULINK_FIRMWARE) \
13         %D%/usb_blaster/README.CheapClone \
14         %D%/Makefile.rlink \
15         %D%/rlink_call.m4 \
16         %D%/rlink_init.m4
17
18 DRIVERFILES =
19
20 # Standard Driver: common files
21 DRIVERFILES += %D%/driver.c
22 DRIVERFILES += %D%/jtag_usb_common.c
23
24 if USE_LIBUSB1
25 DRIVERFILES += %D%/libusb1_common.c
26 %C%_libocdjtagdrivers_la_CPPFLAGS += $(LIBUSB1_CFLAGS)
27 %C%_libocdjtagdrivers_la_LIBADD += $(LIBUSB1_LIBS)
28 endif
29
30 if USE_LIBUSB0
31 DRIVERFILES += %D%/usb_common.c
32 %C%_libocdjtagdrivers_la_CPPFLAGS += $(LIBUSB0_CFLAGS)
33 %C%_libocdjtagdrivers_la_LIBADD += $(LIBUSB0_LIBS)
34 if !USE_LIBUSB1
35 DRIVERFILES += %D%/libusb0_common.c
36 endif
37 endif
38
39 if USE_LIBFTDI
40 %C%_libocdjtagdrivers_la_CPPFLAGS += $(LIBFTDI_CFLAGS)
41 %C%_libocdjtagdrivers_la_LIBADD += $(LIBFTDI_LIBS)
42 endif
43
44 if USE_HIDAPI
45 %C%_libocdjtagdrivers_la_CPPFLAGS += $(HIDAPI_CFLAGS)
46 %C%_libocdjtagdrivers_la_LIBADD += $(HIDAPI_LIBS)
47 endif
48
49 if USE_LIBJAYLINK
50 %C%_libocdjtagdrivers_la_CPPFLAGS += $(LIBJAYLINK_CFLAGS)
51 %C%_libocdjtagdrivers_la_LIBADD += $(LIBJAYLINK_LIBS)
52 endif
53
54 if JLINK
55 DRIVERFILES += %D%/jlink.c
56 if INTERNAL_LIBJAYLINK
57 SUBDIRS += %D%/libjaylink
58 DIST_SUBDIRS += %D%/libjaylink
59
60 %C%_libocdjtagdrivers_la_LIBADD += %D%/libjaylink/libjaylink/libjaylink.la
61 %C%_libocdjtagdrivers_la_CPPFLAGS += -I$(builddir)/%D%/libjaylink/libjaylink -I$(srcdir)/%D%/libjaylink
62 endif
63 endif
64
65 if BITBANG
66 DRIVERFILES += %D%/bitbang.c
67 endif
68 if PARPORT
69 DRIVERFILES += %D%/parport.c
70 endif
71 if DUMMY
72 DRIVERFILES += %D%/dummy.c
73 endif
74 if FTDI
75 DRIVERFILES += %D%/ftdi.c %D%/mpsse.c
76 endif
77 if JTAG_VPI
78 DRIVERFILES += %D%/jtag_vpi.c
79 endif
80 if USB_BLASTER_DRIVER
81 %C%_libocdjtagdrivers_la_LIBADD += %D%/usb_blaster/libocdusbblaster.la
82 include %D%/usb_blaster/Makefile.am
83 endif
84 if FT232R
85 DRIVERFILES += %D%/ft232r.c
86 endif
87 if AMTJTAGACCEL
88 DRIVERFILES += %D%/amt_jtagaccel.c
89 endif
90 if EP93XX
91 DRIVERFILES += %D%/ep93xx.c
92 endif
93 if AT91RM9200
94 DRIVERFILES += %D%/at91rm9200.c
95 endif
96 if GW16012
97 DRIVERFILES += %D%/gw16012.c
98 endif
99 if BITQ
100 DRIVERFILES += %D%/bitq.c
101 endif
102 if PRESTO
103 DRIVERFILES += %D%/presto.c
104 endif
105 if USBPROG
106 DRIVERFILES += %D%/usbprog.c
107 endif
108 if RLINK
109 DRIVERFILES += %D%/rlink.c %D%/rlink_speed_table.c
110 endif
111 if ULINK
112 DRIVERFILES += %D%/ulink.c
113 ulinkdir = $(pkgdatadir)/OpenULINK
114 dist_ulink_DATA = $(ULINK_FIRMWARE)/ulink_firmware.hex
115 %C%_libocdjtagdrivers_la_LIBADD += -lm
116 endif
117 if VSLLINK
118 DRIVERFILES += %D%/versaloon/usbtoxxx/usbtogpio.c
119 DRIVERFILES += %D%/versaloon/usbtoxxx/usbtojtagraw.c
120 DRIVERFILES += %D%/versaloon/usbtoxxx/usbtoswd.c
121 DRIVERFILES += %D%/versaloon/usbtoxxx/usbtopwr.c
122 DRIVERFILES += %D%/versaloon/usbtoxxx/usbtoxxx.c
123 DRIVERFILES += %D%/versaloon/versaloon.c
124 DRIVERFILES += %D%/vsllink.c
125 endif
126 if ARMJTAGEW
127 DRIVERFILES += %D%/arm-jtag-ew.c
128 endif
129 if BUSPIRATE
130 DRIVERFILES += %D%/buspirate.c
131 endif
132 if REMOTE_BITBANG
133 DRIVERFILES += %D%/remote_bitbang.c
134 endif
135 if HLADAPTER
136 DRIVERFILES += %D%/stlink_usb.c
137 DRIVERFILES += %D%/ti_icdi_usb.c
138 endif
139 if OSBDM
140 DRIVERFILES += %D%/osbdm.c
141 endif
142 if OPENDOUS
143 DRIVERFILES += %D%/opendous.c
144 endif
145 if SYSFSGPIO
146 DRIVERFILES += %D%/sysfsgpio.c
147 endif
148 if BCM2835GPIO
149 DRIVERFILES += %D%/bcm2835gpio.c
150 endif
151 if OPENJTAG
152 DRIVERFILES += %D%/openjtag.c
153 endif
154 if CMSIS_DAP
155 DRIVERFILES += %D%/cmsis_dap_usb.c
156 endif
157 if IMX_GPIO
158 DRIVERFILES += %D%/imx_gpio.c
159 endif
160 if KITPROG
161 DRIVERFILES += %D%/kitprog.c
162 endif
163 if XDS110
164 DRIVERFILES += %D%/xds110.c
165 endif
166
167 DRIVERHEADERS = \
168         %D%/bitbang.h \
169         %D%/bitq.h \
170         %D%/jtag_usb_common.h \
171         %D%/libusb0_common.h \
172         %D%/libusb1_common.h \
173         %D%/libusb_common.h \
174         %D%/minidriver_imp.h \
175         %D%/mpsse.h \
176         %D%/rlink.h \
177         %D%/rlink_dtc_cmd.h \
178         %D%/rlink_ep1_cmd.h \
179         %D%/rlink_st7.h \
180         %D%/usb_common.h \
181         %D%/versaloon/usbtoxxx/usbtoxxx.h \
182         %D%/versaloon/usbtoxxx/usbtoxxx_internal.h \
183         %D%/versaloon/versaloon.h \
184         %D%/versaloon/versaloon_include.h \
185         %D%/versaloon/versaloon_internal.h
186