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