]> sigrok.org Git - libsigrok.git/blame - Makefile.am
Switch to a non-recursive automake setup.
[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 \
40f5ddac 35 filter.c \
b08024a8 36 strutil.c \
787c4390 37 log.c \
29682168 38 version.c \
063e7aef
UH
39 error.c \
40 std.c
960a75e4 41
67bd8055
UH
42# Input formats
43libsigrok_la_SOURCES += \
44 input/binary.c \
45 input/chronovu_la8.c \
46 input/csv.c \
47 input/input.c \
48 input/vcd.c \
49 input/wav.c
50
51# Output formats
52libsigrok_la_SOURCES += \
53 output/binary.c \
54 output/vcd.c \
55 output/ols.c \
56 output/gnuplot.c \
57 output/chronovu_la8.c \
58 output/csv.c \
59 output/analog.c \
60 output/output.c \
61 output/text/text.c \
62 output/text/text.h \
63 output/text/bits.c \
64 output/text/hex.c \
65 output/text/ascii.c
66
67# Hardware (common files)
68libsigrok_la_SOURCES += \
69 hardware/common/scpi.c \
70 hardware/common/scpi_tcp.c \
71 hardware/common/scpi_usbtmc.c
72if NEED_RPC
73libsigrok_la_SOURCES += \
74 hardware/common/scpi_vxi.c \
75 hardware/common/vxi_clnt.c \
76 hardware/common/vxi_xdr.c
77endif
78if NEED_SERIAL
79libsigrok_la_SOURCES += \
80 hardware/common/serial.c \
81 hardware/common/scpi_serial.c
82endif
83if NEED_USB
84libsigrok_la_SOURCES += \
85 hardware/common/ezusb.c \
86 hardware/common/usb.c \
87 hardware/common/scpi_usbtmc_libusb.c
88endif
89if NEED_VISA
90libsigrok_la_SOURCES += \
91 hardware/common/scpi_visa.c
92endif
93
94# Hardware (DMM parsers)
95libsigrok_la_SOURCES += \
96 hardware/common/dmm/es519xx.c \
97 hardware/common/dmm/fs9721.c \
98 hardware/common/dmm/fs9922.c \
99 hardware/common/dmm/m2110.c \
100 hardware/common/dmm/metex14.c \
101 hardware/common/dmm/rs9lcd.c
102
103# Hardware drivers
104if HW_AGILENT_DMM
105libsigrok_la_SOURCES += \
106 hardware/agilent-dmm/api.c \
107 hardware/agilent-dmm/agilent-dmm.h \
108 hardware/agilent-dmm/sched.c
109endif
110if HW_ALSA
111libsigrok_la_SOURCES += \
112 hardware/alsa/protocol.h \
113 hardware/alsa/protocol.c \
114 hardware/alsa/api.c
115endif
116if HW_APPA_55II
117libsigrok_la_SOURCES += \
118 hardware/appa-55ii/protocol.h \
119 hardware/appa-55ii/protocol.c \
120 hardware/appa-55ii/api.c
121endif
122if HW_ASIX_SIGMA
123libsigrok_la_SOURCES += \
124 hardware/asix-sigma/asix-sigma.h \
125 hardware/asix-sigma/asix-sigma.c
126endif
127if HW_ATTEN_PPS3XXX
128libsigrok_la_SOURCES += \
129 hardware/atten-pps3xxx/protocol.h \
130 hardware/atten-pps3xxx/protocol.c \
131 hardware/atten-pps3xxx/api.c
132endif
133if HW_BRYMEN_BM86X
134libsigrok_la_SOURCES += \
135 hardware/brymen-bm86x/protocol.h \
136 hardware/brymen-bm86x/protocol.c \
137 hardware/brymen-bm86x/api.c
138endif
139if HW_BRYMEN_DMM
140libsigrok_la_SOURCES += \
141 hardware/brymen-dmm/parser.c \
142 hardware/brymen-dmm/protocol.h \
143 hardware/brymen-dmm/protocol.c \
144 hardware/brymen-dmm/api.c
145endif
146if HW_CEM_DT_885X
147libsigrok_la_SOURCES += \
148 hardware/cem-dt-885x/protocol.h \
149 hardware/cem-dt-885x/protocol.c \
150 hardware/cem-dt-885x/api.c
151endif
152if HW_CENTER_3XX
153libsigrok_la_SOURCES += \
154 hardware/center-3xx/protocol.h \
155 hardware/center-3xx/protocol.c \
156 hardware/center-3xx/api.c
157endif
158if HW_CHRONOVU_LA8
159libsigrok_la_SOURCES += \
160 hardware/chronovu-la8/protocol.h \
161 hardware/chronovu-la8/protocol.c \
162 hardware/chronovu-la8/api.c
163endif
164if HW_COLEAD_SLM
165libsigrok_la_SOURCES += \
166 hardware/colead-slm/protocol.h \
167 hardware/colead-slm/protocol.c \
168 hardware/colead-slm/api.c
169endif
170if HW_CONRAD_DIGI_35_CPU
171libsigrok_la_SOURCES += \
172 hardware/conrad-digi-35-cpu/protocol.h \
173 hardware/conrad-digi-35-cpu/protocol.c \
174 hardware/conrad-digi-35-cpu/api.c
175endif
176if HW_DEMO
177libsigrok_la_SOURCES += \
178 hardware/demo/demo.c
179endif
180if HW_FLUKE_DMM
181libsigrok_la_SOURCES += \
182 hardware/fluke-dmm/fluke-dmm.h \
183 hardware/fluke-dmm/fluke.c \
184 hardware/fluke-dmm/api.c
185endif
186if HW_FX2LAFW
187libsigrok_la_SOURCES += \
188 hardware/fx2lafw/protocol.h \
189 hardware/fx2lafw/protocol.c \
190 hardware/fx2lafw/api.c
191endif
192if HW_GMC_MH_1X_2X
193libsigrok_la_SOURCES += \
194 hardware/gmc-mh-1x-2x/protocol.h \
195 hardware/gmc-mh-1x-2x/protocol.c \
196 hardware/gmc-mh-1x-2x/api.c
197endif
198if HW_HAMEG_HMO
199libsigrok_la_SOURCES += \
200 hardware/hameg-hmo/protocol.h \
201 hardware/hameg-hmo/protocol.c \
202 hardware/hameg-hmo/api.c
203endif
204if HW_HANTEK_DSO
205libsigrok_la_SOURCES += \
206 hardware/hantek-dso/dso.h \
207 hardware/hantek-dso/dso.c \
208 hardware/hantek-dso/api.c
209endif
210if HW_IKALOGIC_SCANALOGIC2
211libsigrok_la_SOURCES += \
212 hardware/ikalogic-scanalogic2/protocol.h \
213 hardware/ikalogic-scanalogic2/protocol.c \
214 hardware/ikalogic-scanalogic2/api.c
215endif
216if HW_IKALOGIC_SCANAPLUS
217libsigrok_la_SOURCES += \
218 hardware/ikalogic-scanaplus/protocol.h \
219 hardware/ikalogic-scanaplus/protocol.c \
220 hardware/ikalogic-scanaplus/api.c
221endif
222if HW_KECHENG_KC_330B
223libsigrok_la_SOURCES += \
224 hardware/kecheng-kc-330b/protocol.h \
225 hardware/kecheng-kc-330b/protocol.c \
226 hardware/kecheng-kc-330b/api.c
227endif
228if HW_LASCAR_EL_USB
229libsigrok_la_SOURCES += \
230 hardware/lascar-el-usb/protocol.h \
231 hardware/lascar-el-usb/protocol.c \
232 hardware/lascar-el-usb/api.c
233endif
234if HW_LINK_MSO19
235libsigrok_la_SOURCES += \
236 hardware/link-mso19/protocol.h \
237 hardware/link-mso19/protocol.c \
238 hardware/link-mso19/api.c
239endif
240if HW_MIC_985XX
241libsigrok_la_SOURCES += \
242 hardware/mic-985xx/protocol.h \
243 hardware/mic-985xx/protocol.c \
244 hardware/mic-985xx/api.c
245endif
246if HW_NORMA_DMM
247libsigrok_la_SOURCES += \
248 hardware/norma-dmm/protocol.h \
249 hardware/norma-dmm/protocol.c \
250 hardware/norma-dmm/api.c
251endif
252if HW_OLS
253libsigrok_la_SOURCES += \
254 hardware/openbench-logic-sniffer/protocol.h \
255 hardware/openbench-logic-sniffer/protocol.c \
256 hardware/openbench-logic-sniffer/api.c
257endif
258if HW_RIGOL_DS
259libsigrok_la_SOURCES += \
260 hardware/rigol-ds/protocol.h \
261 hardware/rigol-ds/protocol.c \
262 hardware/rigol-ds/api.c
263endif
264if HW_SALEAE_LOGIC16
265libsigrok_la_SOURCES += \
266 hardware/saleae-logic16/protocol.h \
267 hardware/saleae-logic16/protocol.c \
268 hardware/saleae-logic16/api.c
269endif
270if HW_SERIAL_DMM
271libsigrok_la_SOURCES += \
272 hardware/serial-dmm/protocol.h \
273 hardware/serial-dmm/protocol.c \
274 hardware/serial-dmm/api.c
275endif
276if HW_SYSCLK_LWLA
277libsigrok_la_SOURCES += \
278 hardware/sysclk-lwla/lwla.h \
279 hardware/sysclk-lwla/lwla.c \
280 hardware/sysclk-lwla/protocol.h \
281 hardware/sysclk-lwla/protocol.c \
282 hardware/sysclk-lwla/api.c
283endif
284if HW_TELEINFO
285libsigrok_la_SOURCES += \
286 hardware/teleinfo/protocol.h \
287 hardware/teleinfo/protocol.c \
288 hardware/teleinfo/api.c
289endif
290if HW_TONDAJ_SL_814
291libsigrok_la_SOURCES += \
292 hardware/tondaj-sl-814/protocol.h \
293 hardware/tondaj-sl-814/protocol.c \
294 hardware/tondaj-sl-814/api.c
295endif
296if HW_UNI_T_DMM
297libsigrok_la_SOURCES += \
298 hardware/uni-t-dmm/protocol.h \
299 hardware/uni-t-dmm/protocol.c \
300 hardware/uni-t-dmm/api.c
301endif
302if HW_UNI_T_UT32X
303libsigrok_la_SOURCES += \
304 hardware/uni-t-ut32x/protocol.h \
305 hardware/uni-t-ut32x/protocol.c \
306 hardware/uni-t-ut32x/api.c
307endif
308if HW_VICTOR_DMM
309libsigrok_la_SOURCES += \
310 hardware/victor-dmm/protocol.h \
311 hardware/victor-dmm/protocol.c \
312 hardware/victor-dmm/api.c
313endif
314if HW_ZEROPLUS_LOGIC_CUBE
315libsigrok_la_SOURCES += \
316 hardware/zeroplus-logic-cube/analyzer.c \
317 hardware/zeroplus-logic-cube/analyzer.h \
318 hardware/zeroplus-logic-cube/gl_usb.h \
319 hardware/zeroplus-logic-cube/gl_usb.c \
320 hardware/zeroplus-logic-cube/protocol.h \
321 hardware/zeroplus-logic-cube/protocol.c \
322 hardware/zeroplus-logic-cube/api.c
323endif
324
325libsigrok_la_LIBADD = $(LIBOBJS)
a1bb33af 326
6dddd902 327libsigrok_la_LDFLAGS = $(SR_LIB_LDFLAGS)
eeebceea 328
45c59c8b
BV
329library_includedir = $(includedir)/libsigrok
330library_include_HEADERS = libsigrok.h proto.h version.h
331noinst_HEADERS = libsigrok-internal.h
a1bb33af 332
8a7b47cd
UH
333pkgconfigdir = $(libdir)/pkgconfig
334pkgconfig_DATA = libsigrok.pc
d658e348 335
67bd8055
UH
336EXTRA_DIST = \
337 Doxyfile \
338 HACKING \
339 README.devices \
340 contrib/gnuplot_chronovu_la8.gpi \
341 contrib/gnuplot_rigol_ds1xx2.gpi \
342 contrib/gnuplot_usbeesx.gpi \
343 contrib/gnuplot_usbeedx8.gpi \
344 contrib/gnuplot_usbeedx16.gpi \
345 contrib/sigrok-logo-notext.png \
346 contrib/z60_libsigrok.rules
347
348if HAVE_CHECK
349
350TESTS = tests/check_main
351
352check_PROGRAMS = ${TESTS}
353
354tests_check_main_SOURCES = \
355 libsigrok.h \
356 tests/lib.c \
357 tests/lib.h \
358 tests/check_main.c \
359 tests/check_core.c \
360 tests/check_input_all.c \
361 tests/check_input_binary.c \
362 tests/check_output_all.c \
363 tests/check_strutil.c \
364 tests/check_version.c \
365 tests/check_driver_all.c
366
367tests_check_main_CFLAGS = @check_CFLAGS@
368
369tests_check_main_LDADD = $(top_builddir)/libsigrok.la @check_LIBS@
370
371endif
dd8b5f56 372
c0958408 373MAINTAINERCLEANFILES = ChangeLog
0fc12d66
UH
374
375.PHONY: ChangeLog
376ChangeLog:
bd58d8f3 377 git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog
0fc12d66
UH
378
379dist-hook: ChangeLog
380