a50c92746c0513065ee0e8d08156adfa3f3c2f4c
[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 FTDI
64 DRIVERFILES += ftdi.c mpsse.c
65 endif
66 if JTAG_VPI
67 DRIVERFILES += jtag_vpi.c
68 endif
69 if USB_BLASTER_DRIVER
70 SUBDIRS += usb_blaster
71 libocdjtagdrivers_la_LIBADD += $(top_builddir)/src/jtag/drivers/usb_blaster/libocdusbblaster.la
72 endif
73 if AMTJTAGACCEL
74 DRIVERFILES += amt_jtagaccel.c
75 endif
76 if EP93XX
77 DRIVERFILES += ep93xx.c
78 endif
79 if AT91RM9200
80 DRIVERFILES += at91rm9200.c
81 endif
82 if GW16012
83 DRIVERFILES += gw16012.c
84 endif
85 if BITQ
86 DRIVERFILES += bitq.c
87 endif
88 if PRESTO
89 DRIVERFILES += presto.c
90 endif
91 if USBPROG
92 DRIVERFILES += usbprog.c
93 endif
94 if RLINK
95 DRIVERFILES += rlink.c rlink_speed_table.c
96 endif
97 if ULINK
98 DRIVERFILES += ulink.c
99 ulinkdir = $(pkgdatadir)/OpenULINK
100 dist_ulink_DATA = $(ULINK_FIRMWARE)/ulink_firmware.hex
101 endif
102 if VSLLINK
103 DRIVERFILES += versaloon/usbtoxxx/usbtogpio.c
104 DRIVERFILES += versaloon/usbtoxxx/usbtojtagraw.c
105 DRIVERFILES += versaloon/usbtoxxx/usbtoswd.c
106 DRIVERFILES += versaloon/usbtoxxx/usbtopwr.c
107 DRIVERFILES += versaloon/usbtoxxx/usbtoxxx.c
108 DRIVERFILES += versaloon/versaloon.c
109 DRIVERFILES += vsllink.c
110 endif
111 if ARMJTAGEW
112 DRIVERFILES += arm-jtag-ew.c
113 endif
114 if BUSPIRATE
115 DRIVERFILES += buspirate.c
116 endif
117 if REMOTE_BITBANG
118 DRIVERFILES += remote_bitbang.c
119 endif
120 if HLADAPTER
121 DRIVERFILES += stlink_usb.c
122 DRIVERFILES += ti_icdi_usb.c
123 endif
124 if OSBDM
125 DRIVERFILES += osbdm.c
126 endif
127 if OPENDOUS
128 DRIVERFILES += opendous.c
129 endif
130 if SYSFSGPIO
131 DRIVERFILES += sysfsgpio.c
132 endif
133 if BCM2835GPIO
134 DRIVERFILES += bcm2835gpio.c
135 endif
136
137 if OPENJTAG
138 DRIVERFILES += openjtag.c
139 endif
140
141 if CMSIS_DAP
142 DRIVERFILES += cmsis_dap_usb.c
143 endif
144
145 noinst_HEADERS = \
146         bitbang.h \
147         bitq.h \
148         libusb0_common.h \
149         libusb1_common.h \
150         libusb_common.h \
151         minidriver_imp.h \
152         mpsse.h \
153         rlink.h \
154         rlink_dtc_cmd.h \
155         rlink_ep1_cmd.h \
156         rlink_st7.h \
157         usb_common.h \
158         versaloon/usbtoxxx/usbtoxxx.h \
159         versaloon/usbtoxxx/usbtoxxx_internal.h \
160         versaloon/versaloon.h \
161         versaloon/versaloon_include.h \
162         versaloon/versaloon_internal.h
163
164 DIST_SUBDIRS = usb_blaster
165
166 if JLINK
167 if INTERNAL_LIBJAYLINK
168 DIST_SUBDIRS += libjaylink
169 endif
170 endif
171
172 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in