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