c26d99784e2e0033c79cd0af1a4f41cb244cf12c
[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 endif
82 if AMTJTAGACCEL
83 DRIVERFILES += %D%/amt_jtagaccel.c
84 endif
85 if EP93XX
86 DRIVERFILES += %D%/ep93xx.c
87 endif
88 if AT91RM9200
89 DRIVERFILES += %D%/at91rm9200.c
90 endif
91 if GW16012
92 DRIVERFILES += %D%/gw16012.c
93 endif
94 if BITQ
95 DRIVERFILES += %D%/bitq.c
96 endif
97 if PRESTO
98 DRIVERFILES += %D%/presto.c
99 endif
100 if USBPROG
101 DRIVERFILES += %D%/usbprog.c
102 endif
103 if RLINK
104 DRIVERFILES += %D%/rlink.c %D%/rlink_speed_table.c
105 endif
106 if ULINK
107 DRIVERFILES += %D%/ulink.c
108 ulinkdir = $(pkgdatadir)/OpenULINK
109 dist_ulink_DATA = $(ULINK_FIRMWARE)/ulink_firmware.hex
110 %C%_libocdjtagdrivers_la_LIBADD += -lm
111 endif
112 if VSLLINK
113 DRIVERFILES += %D%/versaloon/usbtoxxx/usbtogpio.c
114 DRIVERFILES += %D%/versaloon/usbtoxxx/usbtojtagraw.c
115 DRIVERFILES += %D%/versaloon/usbtoxxx/usbtoswd.c
116 DRIVERFILES += %D%/versaloon/usbtoxxx/usbtopwr.c
117 DRIVERFILES += %D%/versaloon/usbtoxxx/usbtoxxx.c
118 DRIVERFILES += %D%/versaloon/versaloon.c
119 DRIVERFILES += %D%/vsllink.c
120 endif
121 if ARMJTAGEW
122 DRIVERFILES += %D%/arm-jtag-ew.c
123 endif
124 if BUSPIRATE
125 DRIVERFILES += %D%/buspirate.c
126 endif
127 if REMOTE_BITBANG
128 DRIVERFILES += %D%/remote_bitbang.c
129 endif
130 if HLADAPTER
131 DRIVERFILES += %D%/stlink_usb.c
132 DRIVERFILES += %D%/ti_icdi_usb.c
133 endif
134 if OSBDM
135 DRIVERFILES += %D%/osbdm.c
136 endif
137 if OPENDOUS
138 DRIVERFILES += %D%/opendous.c
139 endif
140 if SYSFSGPIO
141 DRIVERFILES += %D%/sysfsgpio.c
142 endif
143 if BCM2835GPIO
144 DRIVERFILES += %D%/bcm2835gpio.c
145 endif
146
147 if OPENJTAG
148 DRIVERFILES += %D%/openjtag.c
149 endif
150
151 if CMSIS_DAP
152 DRIVERFILES += %D%/cmsis_dap_usb.c
153 endif
154
155 DRIVERHEADERS = \
156         %D%/bitbang.h \
157         %D%/bitq.h \
158         %D%/libusb0_common.h \
159         %D%/libusb1_common.h \
160         %D%/libusb_common.h \
161         %D%/minidriver_imp.h \
162         %D%/mpsse.h \
163         %D%/rlink.h \
164         %D%/rlink_dtc_cmd.h \
165         %D%/rlink_ep1_cmd.h \
166         %D%/rlink_st7.h \
167         %D%/usb_common.h \
168         %D%/versaloon/usbtoxxx/usbtoxxx.h \
169         %D%/versaloon/usbtoxxx/usbtoxxx_internal.h \
170         %D%/versaloon/versaloon.h \
171         %D%/versaloon/versaloon_include.h \
172         %D%/versaloon/versaloon_internal.h
173
174 include %D%/usb_blaster/Makefile.am