]> sigrok.org Git - libsigrok.git/blame - Makefile.am
Minor code cleanup.
[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
8f4e922f
UH
227if HW_MANSON_HCS_3XXX
228libsigrok_la_SOURCES += \
229 hardware/manson-hcs-3xxx/protocol.h \
230 hardware/manson-hcs-3xxx/protocol.c \
231 hardware/manson-hcs-3xxx/api.c
232endif
67bd8055
UH
233if HW_MIC_985XX
234libsigrok_la_SOURCES += \
235 hardware/mic-985xx/protocol.h \
236 hardware/mic-985xx/protocol.c \
237 hardware/mic-985xx/api.c
238endif
41b7bd01
MH
239if HW_MOTECH_LPS_30X
240libsigrok_la_SOURCES += \
241 hardware/motech-lps-30x/protocol.h \
242 hardware/motech-lps-30x/protocol.c \
243 hardware/motech-lps-30x/api.c
244endif
67bd8055
UH
245if HW_NORMA_DMM
246libsigrok_la_SOURCES += \
247 hardware/norma-dmm/protocol.h \
248 hardware/norma-dmm/protocol.c \
249 hardware/norma-dmm/api.c
250endif
251if HW_OLS
252libsigrok_la_SOURCES += \
253 hardware/openbench-logic-sniffer/protocol.h \
254 hardware/openbench-logic-sniffer/protocol.c \
255 hardware/openbench-logic-sniffer/api.c
256endif
257if HW_RIGOL_DS
258libsigrok_la_SOURCES += \
259 hardware/rigol-ds/protocol.h \
260 hardware/rigol-ds/protocol.c \
261 hardware/rigol-ds/api.c
262endif
263if HW_SALEAE_LOGIC16
264libsigrok_la_SOURCES += \
265 hardware/saleae-logic16/protocol.h \
266 hardware/saleae-logic16/protocol.c \
267 hardware/saleae-logic16/api.c
268endif
269if HW_SERIAL_DMM
270libsigrok_la_SOURCES += \
271 hardware/serial-dmm/protocol.h \
272 hardware/serial-dmm/protocol.c \
273 hardware/serial-dmm/api.c
274endif
275if HW_SYSCLK_LWLA
276libsigrok_la_SOURCES += \
277 hardware/sysclk-lwla/lwla.h \
278 hardware/sysclk-lwla/lwla.c \
279 hardware/sysclk-lwla/protocol.h \
280 hardware/sysclk-lwla/protocol.c \
281 hardware/sysclk-lwla/api.c
282endif
283if HW_TELEINFO
284libsigrok_la_SOURCES += \
285 hardware/teleinfo/protocol.h \
286 hardware/teleinfo/protocol.c \
287 hardware/teleinfo/api.c
288endif
0acdd793
BV
289if HW_TESTO
290libsigrok_la_SOURCES += \
291 hardware/testo/protocol.h \
292 hardware/testo/protocol.c \
293 hardware/testo/api.c
294endif
67bd8055
UH
295if HW_TONDAJ_SL_814
296libsigrok_la_SOURCES += \
297 hardware/tondaj-sl-814/protocol.h \
298 hardware/tondaj-sl-814/protocol.c \
299 hardware/tondaj-sl-814/api.c
300endif
301if HW_UNI_T_DMM
302libsigrok_la_SOURCES += \
303 hardware/uni-t-dmm/protocol.h \
304 hardware/uni-t-dmm/protocol.c \
305 hardware/uni-t-dmm/api.c
306endif
307if HW_UNI_T_UT32X
308libsigrok_la_SOURCES += \
309 hardware/uni-t-ut32x/protocol.h \
310 hardware/uni-t-ut32x/protocol.c \
311 hardware/uni-t-ut32x/api.c
312endif
313if HW_VICTOR_DMM
314libsigrok_la_SOURCES += \
315 hardware/victor-dmm/protocol.h \
316 hardware/victor-dmm/protocol.c \
317 hardware/victor-dmm/api.c
318endif
319if HW_ZEROPLUS_LOGIC_CUBE
320libsigrok_la_SOURCES += \
321 hardware/zeroplus-logic-cube/analyzer.c \
322 hardware/zeroplus-logic-cube/analyzer.h \
323 hardware/zeroplus-logic-cube/gl_usb.h \
324 hardware/zeroplus-logic-cube/gl_usb.c \
325 hardware/zeroplus-logic-cube/protocol.h \
326 hardware/zeroplus-logic-cube/protocol.c \
327 hardware/zeroplus-logic-cube/api.c
328endif
329
330libsigrok_la_LIBADD = $(LIBOBJS)
a1bb33af 331
6dddd902 332libsigrok_la_LDFLAGS = $(SR_LIB_LDFLAGS)
eeebceea 333
45c59c8b
BV
334library_includedir = $(includedir)/libsigrok
335library_include_HEADERS = libsigrok.h proto.h version.h
336noinst_HEADERS = libsigrok-internal.h
a1bb33af 337
8a7b47cd
UH
338pkgconfigdir = $(libdir)/pkgconfig
339pkgconfig_DATA = libsigrok.pc
d658e348 340
67bd8055
UH
341EXTRA_DIST = \
342 Doxyfile \
343 HACKING \
344 README.devices \
345 contrib/gnuplot_chronovu_la8.gpi \
346 contrib/gnuplot_rigol_ds1xx2.gpi \
347 contrib/gnuplot_usbeesx.gpi \
348 contrib/gnuplot_usbeedx8.gpi \
349 contrib/gnuplot_usbeedx16.gpi \
350 contrib/sigrok-logo-notext.png \
351 contrib/z60_libsigrok.rules
352
353if HAVE_CHECK
354
355TESTS = tests/check_main
356
357check_PROGRAMS = ${TESTS}
358
359tests_check_main_SOURCES = \
360 libsigrok.h \
361 tests/lib.c \
362 tests/lib.h \
363 tests/check_main.c \
364 tests/check_core.c \
365 tests/check_input_all.c \
366 tests/check_input_binary.c \
367 tests/check_output_all.c \
368 tests/check_strutil.c \
369 tests/check_version.c \
370 tests/check_driver_all.c
371
372tests_check_main_CFLAGS = @check_CFLAGS@
373
374tests_check_main_LDADD = $(top_builddir)/libsigrok.la @check_LIBS@
375
376endif
dd8b5f56 377
c0958408 378MAINTAINERCLEANFILES = ChangeLog
0fc12d66
UH
379
380.PHONY: ChangeLog
381ChangeLog:
bd58d8f3 382 git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog
0fc12d66
UH
383
384dist-hook: ChangeLog
385