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