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