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