]> sigrok.org Git - libsigrok.git/blame - Makefile.am
detect version 1.x of libftdi library
[libsigrok.git] / Makefile.am
CommitLineData
62c82025 1##
50985c20 2## This file is part of the libsigrok project.
62c82025 3##
c73d2ea4 4## Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com>
d375b3c3 5## Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com>
62c82025 6##
a1bb33af
UH
7## This program is free software: you can redistribute it and/or modify
8## it under the terms of the GNU General Public License as published by
9## the Free Software Foundation, either version 3 of the License, or
10## (at your option) any later version.
62c82025 11##
a1bb33af
UH
12## This program is distributed in the hope that it will be useful,
13## but WITHOUT ANY WARRANTY; without even the implied warranty of
14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15## GNU General Public License for more details.
62c82025 16##
a1bb33af
UH
17## You should have received a copy of the GNU General Public License
18## along with this program. If not, see <http://www.gnu.org/licenses/>.
62c82025 19##
a1bb33af 20
d8521c93 21ACLOCAL_AMFLAGS = -I autostuff
826938d8 22
67bd8055 23AM_CPPFLAGS = -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
340f6e7a 24
8a7b47cd 25lib_LTLIBRARIES = libsigrok.la
a1bb33af 26
67bd8055 27# Backend files
a695d6c0 28libsigrok_la_SOURCES = \
a1bb33af 29 backend.c \
a1bb33af
UH
30 device.c \
31 session.c \
7d658874
BV
32 session_file.c \
33 session_driver.c \
c30b417f 34 hwdriver.c \
7b5e6d29 35 trigger.c \
ac136b57 36 soft-trigger.c \
b08024a8 37 strutil.c \
787c4390 38 log.c \
29682168 39 version.c \
063e7aef
UH
40 error.c \
41 std.c
960a75e4 42
67bd8055
UH
43# Input formats
44libsigrok_la_SOURCES += \
45 input/binary.c \
46 input/chronovu_la8.c \
47 input/csv.c \
48 input/input.c \
49 input/vcd.c \
50 input/wav.c
51
52# Output formats
53libsigrok_la_SOURCES += \
dba3e682
BV
54 output/output.c \
55 output/analog.c \
56 output/ascii.c \
dbd0aeff 57 output/bits.c \
dba3e682 58 output/binary.c \
67bd8055 59 output/csv.c \
dba3e682
BV
60 output/chronovu_la8.c \
61 output/gnuplot.c \
8d3af2e8 62 output/hex.c \
dba3e682
BV
63 output/ols.c \
64 output/vcd.c
67bd8055
UH
65
66# Hardware (common files)
67libsigrok_la_SOURCES += \
68 hardware/common/scpi.c \
2fa222c7 69 hardware/common/scpi_tcp.c
67bd8055
UH
70if NEED_RPC
71libsigrok_la_SOURCES += \
72 hardware/common/scpi_vxi.c \
73 hardware/common/vxi_clnt.c \
36cf5b54
UH
74 hardware/common/vxi_xdr.c \
75 hardware/common/vxi.h
67bd8055
UH
76endif
77if NEED_SERIAL
78libsigrok_la_SOURCES += \
79 hardware/common/serial.c \
80 hardware/common/scpi_serial.c
81endif
82if NEED_USB
83libsigrok_la_SOURCES += \
84 hardware/common/ezusb.c \
85 hardware/common/usb.c \
86 hardware/common/scpi_usbtmc_libusb.c
87endif
88if NEED_VISA
89libsigrok_la_SOURCES += \
90 hardware/common/scpi_visa.c
91endif
92
93# Hardware (DMM parsers)
94libsigrok_la_SOURCES += \
95 hardware/common/dmm/es519xx.c \
96 hardware/common/dmm/fs9721.c \
97 hardware/common/dmm/fs9922.c \
98 hardware/common/dmm/m2110.c \
99 hardware/common/dmm/metex14.c \
100 hardware/common/dmm/rs9lcd.c
101
102# Hardware drivers
103if HW_AGILENT_DMM
104libsigrok_la_SOURCES += \
105 hardware/agilent-dmm/api.c \
106 hardware/agilent-dmm/agilent-dmm.h \
107 hardware/agilent-dmm/sched.c
108endif
67bd8055
UH
109if HW_APPA_55II
110libsigrok_la_SOURCES += \
111 hardware/appa-55ii/protocol.h \
112 hardware/appa-55ii/protocol.c \
113 hardware/appa-55ii/api.c
114endif
115if HW_ASIX_SIGMA
116libsigrok_la_SOURCES += \
117 hardware/asix-sigma/asix-sigma.h \
118 hardware/asix-sigma/asix-sigma.c
119endif
120if HW_ATTEN_PPS3XXX
121libsigrok_la_SOURCES += \
122 hardware/atten-pps3xxx/protocol.h \
123 hardware/atten-pps3xxx/protocol.c \
124 hardware/atten-pps3xxx/api.c
125endif
126if HW_BRYMEN_BM86X
127libsigrok_la_SOURCES += \
128 hardware/brymen-bm86x/protocol.h \
129 hardware/brymen-bm86x/protocol.c \
130 hardware/brymen-bm86x/api.c
131endif
132if HW_BRYMEN_DMM
133libsigrok_la_SOURCES += \
134 hardware/brymen-dmm/parser.c \
135 hardware/brymen-dmm/protocol.h \
136 hardware/brymen-dmm/protocol.c \
137 hardware/brymen-dmm/api.c
138endif
139if HW_CEM_DT_885X
140libsigrok_la_SOURCES += \
141 hardware/cem-dt-885x/protocol.h \
142 hardware/cem-dt-885x/protocol.c \
143 hardware/cem-dt-885x/api.c
144endif
145if HW_CENTER_3XX
146libsigrok_la_SOURCES += \
147 hardware/center-3xx/protocol.h \
148 hardware/center-3xx/protocol.c \
149 hardware/center-3xx/api.c
150endif
7b356712 151if HW_CHRONOVU_LA
67bd8055 152libsigrok_la_SOURCES += \
7b356712
UH
153 hardware/chronovu-la/protocol.h \
154 hardware/chronovu-la/protocol.c \
155 hardware/chronovu-la/api.c
67bd8055
UH
156endif
157if HW_COLEAD_SLM
158libsigrok_la_SOURCES += \
159 hardware/colead-slm/protocol.h \
160 hardware/colead-slm/protocol.c \
161 hardware/colead-slm/api.c
162endif
163if HW_CONRAD_DIGI_35_CPU
164libsigrok_la_SOURCES += \
165 hardware/conrad-digi-35-cpu/protocol.h \
166 hardware/conrad-digi-35-cpu/protocol.c \
167 hardware/conrad-digi-35-cpu/api.c
168endif
169if HW_DEMO
170libsigrok_la_SOURCES += \
171 hardware/demo/demo.c
172endif
173if HW_FLUKE_DMM
174libsigrok_la_SOURCES += \
175 hardware/fluke-dmm/fluke-dmm.h \
176 hardware/fluke-dmm/fluke.c \
177 hardware/fluke-dmm/api.c
178endif
179if HW_FX2LAFW
180libsigrok_la_SOURCES += \
181 hardware/fx2lafw/protocol.h \
182 hardware/fx2lafw/protocol.c \
183 hardware/fx2lafw/api.c
184endif
185if HW_GMC_MH_1X_2X
186libsigrok_la_SOURCES += \
187 hardware/gmc-mh-1x-2x/protocol.h \
188 hardware/gmc-mh-1x-2x/protocol.c \
189 hardware/gmc-mh-1x-2x/api.c
190endif
191if HW_HAMEG_HMO
192libsigrok_la_SOURCES += \
193 hardware/hameg-hmo/protocol.h \
194 hardware/hameg-hmo/protocol.c \
195 hardware/hameg-hmo/api.c
196endif
197if HW_HANTEK_DSO
198libsigrok_la_SOURCES += \
199 hardware/hantek-dso/dso.h \
200 hardware/hantek-dso/dso.c \
201 hardware/hantek-dso/api.c
202endif
203if HW_IKALOGIC_SCANALOGIC2
204libsigrok_la_SOURCES += \
205 hardware/ikalogic-scanalogic2/protocol.h \
206 hardware/ikalogic-scanalogic2/protocol.c \
207 hardware/ikalogic-scanalogic2/api.c
208endif
209if HW_IKALOGIC_SCANAPLUS
210libsigrok_la_SOURCES += \
211 hardware/ikalogic-scanaplus/protocol.h \
212 hardware/ikalogic-scanaplus/protocol.c \
213 hardware/ikalogic-scanaplus/api.c
214endif
215if HW_KECHENG_KC_330B
216libsigrok_la_SOURCES += \
217 hardware/kecheng-kc-330b/protocol.h \
218 hardware/kecheng-kc-330b/protocol.c \
219 hardware/kecheng-kc-330b/api.c
220endif
221if HW_LASCAR_EL_USB
222libsigrok_la_SOURCES += \
223 hardware/lascar-el-usb/protocol.h \
224 hardware/lascar-el-usb/protocol.c \
225 hardware/lascar-el-usb/api.c
226endif
67bd8055
UH
227if HW_MIC_985XX
228libsigrok_la_SOURCES += \
229 hardware/mic-985xx/protocol.h \
230 hardware/mic-985xx/protocol.c \
231 hardware/mic-985xx/api.c
232endif
41b7bd01
MH
233if HW_MOTECH_LPS_30X
234libsigrok_la_SOURCES += \
235 hardware/motech-lps-30x/protocol.h \
236 hardware/motech-lps-30x/protocol.c \
237 hardware/motech-lps-30x/api.c
238endif
67bd8055
UH
239if HW_NORMA_DMM
240libsigrok_la_SOURCES += \
241 hardware/norma-dmm/protocol.h \
242 hardware/norma-dmm/protocol.c \
243 hardware/norma-dmm/api.c
244endif
245if HW_OLS
246libsigrok_la_SOURCES += \
247 hardware/openbench-logic-sniffer/protocol.h \
248 hardware/openbench-logic-sniffer/protocol.c \
249 hardware/openbench-logic-sniffer/api.c
250endif
251if HW_RIGOL_DS
252libsigrok_la_SOURCES += \
253 hardware/rigol-ds/protocol.h \
254 hardware/rigol-ds/protocol.c \
255 hardware/rigol-ds/api.c
256endif
257if HW_SALEAE_LOGIC16
258libsigrok_la_SOURCES += \
259 hardware/saleae-logic16/protocol.h \
260 hardware/saleae-logic16/protocol.c \
261 hardware/saleae-logic16/api.c
262endif
263if HW_SERIAL_DMM
264libsigrok_la_SOURCES += \
265 hardware/serial-dmm/protocol.h \
266 hardware/serial-dmm/protocol.c \
267 hardware/serial-dmm/api.c
268endif
269if HW_SYSCLK_LWLA
270libsigrok_la_SOURCES += \
271 hardware/sysclk-lwla/lwla.h \
272 hardware/sysclk-lwla/lwla.c \
273 hardware/sysclk-lwla/protocol.h \
274 hardware/sysclk-lwla/protocol.c \
275 hardware/sysclk-lwla/api.c
276endif
277if HW_TELEINFO
278libsigrok_la_SOURCES += \
279 hardware/teleinfo/protocol.h \
280 hardware/teleinfo/protocol.c \
281 hardware/teleinfo/api.c
282endif
283if HW_TONDAJ_SL_814
284libsigrok_la_SOURCES += \
285 hardware/tondaj-sl-814/protocol.h \
286 hardware/tondaj-sl-814/protocol.c \
287 hardware/tondaj-sl-814/api.c
288endif
289if HW_UNI_T_DMM
290libsigrok_la_SOURCES += \
291 hardware/uni-t-dmm/protocol.h \
292 hardware/uni-t-dmm/protocol.c \
293 hardware/uni-t-dmm/api.c
294endif
295if HW_UNI_T_UT32X
296libsigrok_la_SOURCES += \
297 hardware/uni-t-ut32x/protocol.h \
298 hardware/uni-t-ut32x/protocol.c \
299 hardware/uni-t-ut32x/api.c
300endif
301if HW_VICTOR_DMM
302libsigrok_la_SOURCES += \
303 hardware/victor-dmm/protocol.h \
304 hardware/victor-dmm/protocol.c \
305 hardware/victor-dmm/api.c
306endif
307if HW_ZEROPLUS_LOGIC_CUBE
308libsigrok_la_SOURCES += \
309 hardware/zeroplus-logic-cube/analyzer.c \
310 hardware/zeroplus-logic-cube/analyzer.h \
311 hardware/zeroplus-logic-cube/gl_usb.h \
312 hardware/zeroplus-logic-cube/gl_usb.c \
313 hardware/zeroplus-logic-cube/protocol.h \
314 hardware/zeroplus-logic-cube/protocol.c \
315 hardware/zeroplus-logic-cube/api.c
316endif
317
318libsigrok_la_LIBADD = $(LIBOBJS)
a1bb33af 319
6dddd902 320libsigrok_la_LDFLAGS = $(SR_LIB_LDFLAGS)
eeebceea 321
45c59c8b
BV
322library_includedir = $(includedir)/libsigrok
323library_include_HEADERS = libsigrok.h proto.h version.h
324noinst_HEADERS = libsigrok-internal.h
a1bb33af 325
8a7b47cd
UH
326pkgconfigdir = $(libdir)/pkgconfig
327pkgconfig_DATA = libsigrok.pc
d658e348 328
67bd8055
UH
329EXTRA_DIST = \
330 Doxyfile \
331 HACKING \
332 README.devices \
333 contrib/gnuplot_chronovu_la8.gpi \
334 contrib/gnuplot_rigol_ds1xx2.gpi \
335 contrib/gnuplot_usbeesx.gpi \
336 contrib/gnuplot_usbeedx8.gpi \
337 contrib/gnuplot_usbeedx16.gpi \
338 contrib/sigrok-logo-notext.png \
339 contrib/z60_libsigrok.rules
340
341if HAVE_CHECK
342
343TESTS = tests/check_main
344
345check_PROGRAMS = ${TESTS}
346
347tests_check_main_SOURCES = \
348 libsigrok.h \
349 tests/lib.c \
350 tests/lib.h \
351 tests/check_main.c \
352 tests/check_core.c \
353 tests/check_input_all.c \
354 tests/check_input_binary.c \
355 tests/check_output_all.c \
356 tests/check_strutil.c \
357 tests/check_version.c \
358 tests/check_driver_all.c
359
360tests_check_main_CFLAGS = @check_CFLAGS@
361
362tests_check_main_LDADD = $(top_builddir)/libsigrok.la @check_LIBS@
363
364endif
dd8b5f56 365
c0958408 366MAINTAINERCLEANFILES = ChangeLog
0fc12d66
UH
367
368.PHONY: ChangeLog
369ChangeLog:
bd58d8f3 370 git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog
0fc12d66
UH
371
372dist-hook: ChangeLog
373