]>
Commit | Line | Data |
---|---|---|
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 | |
ea1d5351 | 21 | ACLOCAL_AMFLAGS = -I m4 |
ba1c29dc | 22 | AM_LIBTOOLFLAGS = --silent |
bcc3694f | 23 | GNUMAKEFLAGS = --no-print-directory |
ba1c29dc | 24 | |
9448951d DE |
25 | # distutils/setuptools cause trouble on distcheck. Disable for now. |
26 | DISTCHECK_CONFIGURE_FLAGS = --disable-python | |
27 | ||
ba1c29dc | 28 | FIRMWARE_DIR = $(datadir)/sigrok-firmware |
826938d8 | 29 | |
9ac018d0 | 30 | local_includes = -Iinclude -I$(srcdir)/include -I$(srcdir)/src -I. |
1f61c22f | 31 | if BINDINGS_CXX |
4cf2f34f | 32 | local_includes += -Ibindings/cxx/include -I$(srcdir)/bindings/cxx/include -Ibindings/cxx |
1f61c22f | 33 | endif |
655b116c DE |
34 | # Do not hard-code the firmware location on Windows. |
35 | if WIN32 | |
36 | global_defs = | |
37 | else | |
38 | global_defs = -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"' | |
39 | endif | |
1f61c22f | 40 | # Ensure that local include directories are always searched first. |
655b116c | 41 | AM_CPPFLAGS = $(local_includes) $(global_defs) |
340f6e7a | 42 | |
65489c1a | 43 | # The tests CFLAGS are a superset of the libsigrok CFLAGS, and the |
1f61c22f | 44 | # python bindings CFLAGS are a superset of the C++ bindings CFLAGS. |
65489c1a | 45 | AM_CFLAGS = $(SR_EXTRA_CFLAGS) $(SR_WFLAGS) $(TESTS_CFLAGS) |
4cf2f34f | 46 | AM_CXXFLAGS = $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS) |
1f61c22f | 47 | |
8a7b47cd | 48 | lib_LTLIBRARIES = libsigrok.la |
a1bb33af | 49 | |
67bd8055 | 50 | # Backend files |
a695d6c0 | 51 | libsigrok_la_SOURCES = \ |
155b680d BV |
52 | src/backend.c \ |
53 | src/device.c \ | |
54 | src/session.c \ | |
55 | src/session_file.c \ | |
56 | src/session_driver.c \ | |
57 | src/drivers.c \ | |
58 | src/hwdriver.c \ | |
59 | src/trigger.c \ | |
60 | src/soft-trigger.c \ | |
fb019a0e | 61 | src/analog.c \ |
24287ea9 | 62 | src/fallback.c \ |
bee24666 | 63 | src/resource.c \ |
155b680d BV |
64 | src/strutil.c \ |
65 | src/log.c \ | |
66 | src/version.c \ | |
67 | src/error.c \ | |
68 | src/std.c | |
960a75e4 | 69 | |
155b680d BV |
70 | # Input modules |
71 | libsigrok_la_SOURCES += \ | |
155b680d | 72 | src/input/input.c \ |
b84cba4d | 73 | src/input/binary.c \ |
02e24c0c | 74 | src/input/chronovu_la8.c \ |
41d214f6 | 75 | src/input/csv.c \ |
e6b15cb5 | 76 | src/input/raw_analog.c \ |
6d2897e3 | 77 | src/input/trace32_ad.c \ |
7db06394 | 78 | src/input/vcd.c \ |
155b680d | 79 | src/input/wav.c |
67bd8055 | 80 | |
155b680d BV |
81 | # Output modules |
82 | libsigrok_la_SOURCES += \ | |
83 | src/output/output.c \ | |
84 | src/output/analog.c \ | |
85 | src/output/ascii.c \ | |
86 | src/output/bits.c \ | |
87 | src/output/binary.c \ | |
88 | src/output/csv.c \ | |
89 | src/output/chronovu_la8.c \ | |
afaa75b9 | 90 | src/output/wav.c \ |
155b680d BV |
91 | src/output/gnuplot.c \ |
92 | src/output/hex.c \ | |
93 | src/output/ols.c \ | |
3250d8c7 | 94 | src/output/srzip.c \ |
155b680d | 95 | src/output/vcd.c |
67bd8055 | 96 | |
988357ca UH |
97 | # Transform modules |
98 | libsigrok_la_SOURCES += \ | |
39f1752e | 99 | src/transform/transform.c \ |
43caa466 | 100 | src/transform/nop.c \ |
d74d30bb UH |
101 | src/transform/scale.c \ |
102 | src/transform/invert.c | |
988357ca | 103 | |
155b680d | 104 | # SCPI support |
67bd8055 | 105 | libsigrok_la_SOURCES += \ |
0a9d05dc | 106 | src/scpi.h \ |
155b680d | 107 | src/scpi/scpi.c \ |
91ef511d | 108 | src/scpi/helpers.c \ |
155b680d | 109 | src/scpi/scpi_tcp.c |
67bd8055 UH |
110 | if NEED_RPC |
111 | libsigrok_la_SOURCES += \ | |
155b680d BV |
112 | src/scpi/scpi_vxi.c \ |
113 | src/scpi/vxi_clnt.c \ | |
114 | src/scpi/vxi_xdr.c \ | |
115 | src/scpi/vxi.h | |
67bd8055 UH |
116 | endif |
117 | if NEED_SERIAL | |
118 | libsigrok_la_SOURCES += \ | |
155b680d BV |
119 | src/serial.c \ |
120 | src/scpi/scpi_serial.c | |
67bd8055 UH |
121 | endif |
122 | if NEED_USB | |
123 | libsigrok_la_SOURCES += \ | |
155b680d BV |
124 | src/ezusb.c \ |
125 | src/usb.c \ | |
126 | src/scpi/scpi_usbtmc_libusb.c | |
67bd8055 UH |
127 | endif |
128 | if NEED_VISA | |
129 | libsigrok_la_SOURCES += \ | |
155b680d | 130 | src/scpi/scpi_visa.c |
67bd8055 | 131 | endif |
bb2a4ed4 ML |
132 | if NEED_GPIB |
133 | libsigrok_la_SOURCES += \ | |
7343ad1e | 134 | src/scpi/scpi_libgpib.c |
bb2a4ed4 | 135 | endif |
67bd8055 | 136 | |
f54ebe0c | 137 | # Modbus support |
daa39012 AJ |
138 | libsigrok_la_SOURCES += \ |
139 | src/modbus/modbus.c | |
4c938fc2 AJ |
140 | if NEED_SERIAL |
141 | libsigrok_la_SOURCES += \ | |
142 | src/modbus/modbus_serial_rtu.c | |
143 | endif | |
daa39012 | 144 | |
155b680d BV |
145 | # Hardware (DMM chip parsers) |
146 | libsigrok_la_SOURCES += \ | |
147 | src/dmm/es519xx.c \ | |
148 | src/dmm/fs9721.c \ | |
149 | src/dmm/fs9922.c \ | |
150 | src/dmm/m2110.c \ | |
151 | src/dmm/metex14.c \ | |
a24c3f4a | 152 | src/dmm/rs9lcd.c \ |
626027df | 153 | src/dmm/bm25x.c \ |
f3cde309 | 154 | src/dmm/ut71x.c \ |
c36f78f7 | 155 | src/dmm/ut372.c \ |
eed3dec8 MG |
156 | src/dmm/vc870.c \ |
157 | src/dmm/dtm0660.c | |
67bd8055 | 158 | |
6bcb3ee8 | 159 | # Hardware (LCR chip parsers) |
d378f100 | 160 | if NEED_SERIAL |
6bcb3ee8 JH |
161 | libsigrok_la_SOURCES += \ |
162 | src/lcr/es51919.c | |
d378f100 | 163 | endif |
6bcb3ee8 | 164 | |
e5d953b5 UH |
165 | # Hardware (Scale protocol parsers) |
166 | libsigrok_la_SOURCES += \ | |
167 | src/scale/kern.c | |
168 | ||
67bd8055 UH |
169 | # Hardware drivers |
170 | if HW_AGILENT_DMM | |
171 | libsigrok_la_SOURCES += \ | |
155b680d BV |
172 | src/hardware/agilent-dmm/api.c \ |
173 | src/hardware/agilent-dmm/agilent-dmm.h \ | |
174 | src/hardware/agilent-dmm/sched.c | |
67bd8055 | 175 | endif |
67bd8055 UH |
176 | if HW_APPA_55II |
177 | libsigrok_la_SOURCES += \ | |
155b680d BV |
178 | src/hardware/appa-55ii/protocol.h \ |
179 | src/hardware/appa-55ii/protocol.c \ | |
180 | src/hardware/appa-55ii/api.c | |
67bd8055 UH |
181 | endif |
182 | if HW_ASIX_SIGMA | |
183 | libsigrok_la_SOURCES += \ | |
3ba56876 | 184 | src/hardware/asix-sigma/protocol.h \ |
185 | src/hardware/asix-sigma/protocol.c \ | |
186 | src/hardware/asix-sigma/api.c | |
67bd8055 UH |
187 | endif |
188 | if HW_ATTEN_PPS3XXX | |
189 | libsigrok_la_SOURCES += \ | |
155b680d BV |
190 | src/hardware/atten-pps3xxx/protocol.h \ |
191 | src/hardware/atten-pps3xxx/protocol.c \ | |
192 | src/hardware/atten-pps3xxx/api.c | |
67bd8055 | 193 | endif |
dfaee1de BG |
194 | if HW_BAYLIBRE_ACME |
195 | libsigrok_la_SOURCES += \ | |
196 | src/hardware/baylibre-acme/protocol.h \ | |
197 | src/hardware/baylibre-acme/protocol.c \ | |
289eebd7 BG |
198 | src/hardware/baylibre-acme/api.c \ |
199 | src/hardware/baylibre-acme/gpio.h \ | |
200 | src/hardware/baylibre-acme/gpio.c | |
dfaee1de | 201 | endif |
bb993797 KA |
202 | if HW_BEAGLELOGIC |
203 | libsigrok_la_SOURCES += \ | |
3db4b08b | 204 | src/hardware/beaglelogic/beaglelogic.h \ |
155b680d BV |
205 | src/hardware/beaglelogic/protocol.h \ |
206 | src/hardware/beaglelogic/protocol.c \ | |
207 | src/hardware/beaglelogic/api.c | |
bb993797 | 208 | endif |
67bd8055 UH |
209 | if HW_BRYMEN_BM86X |
210 | libsigrok_la_SOURCES += \ | |
155b680d BV |
211 | src/hardware/brymen-bm86x/protocol.h \ |
212 | src/hardware/brymen-bm86x/protocol.c \ | |
213 | src/hardware/brymen-bm86x/api.c | |
67bd8055 UH |
214 | endif |
215 | if HW_BRYMEN_DMM | |
216 | libsigrok_la_SOURCES += \ | |
155b680d BV |
217 | src/hardware/brymen-dmm/parser.c \ |
218 | src/hardware/brymen-dmm/protocol.h \ | |
219 | src/hardware/brymen-dmm/protocol.c \ | |
220 | src/hardware/brymen-dmm/api.c | |
67bd8055 UH |
221 | endif |
222 | if HW_CEM_DT_885X | |
223 | libsigrok_la_SOURCES += \ | |
155b680d BV |
224 | src/hardware/cem-dt-885x/protocol.h \ |
225 | src/hardware/cem-dt-885x/protocol.c \ | |
226 | src/hardware/cem-dt-885x/api.c | |
67bd8055 UH |
227 | endif |
228 | if HW_CENTER_3XX | |
229 | libsigrok_la_SOURCES += \ | |
155b680d BV |
230 | src/hardware/center-3xx/protocol.h \ |
231 | src/hardware/center-3xx/protocol.c \ | |
232 | src/hardware/center-3xx/api.c | |
67bd8055 | 233 | endif |
7b356712 | 234 | if HW_CHRONOVU_LA |
67bd8055 | 235 | libsigrok_la_SOURCES += \ |
155b680d BV |
236 | src/hardware/chronovu-la/protocol.h \ |
237 | src/hardware/chronovu-la/protocol.c \ | |
238 | src/hardware/chronovu-la/api.c | |
67bd8055 UH |
239 | endif |
240 | if HW_COLEAD_SLM | |
241 | libsigrok_la_SOURCES += \ | |
155b680d BV |
242 | src/hardware/colead-slm/protocol.h \ |
243 | src/hardware/colead-slm/protocol.c \ | |
244 | src/hardware/colead-slm/api.c | |
67bd8055 UH |
245 | endif |
246 | if HW_CONRAD_DIGI_35_CPU | |
247 | libsigrok_la_SOURCES += \ | |
155b680d BV |
248 | src/hardware/conrad-digi-35-cpu/protocol.h \ |
249 | src/hardware/conrad-digi-35-cpu/protocol.c \ | |
250 | src/hardware/conrad-digi-35-cpu/api.c | |
67bd8055 UH |
251 | endif |
252 | if HW_DEMO | |
253 | libsigrok_la_SOURCES += \ | |
155b680d | 254 | src/hardware/demo/demo.c |
67bd8055 | 255 | endif |
b5089195 JH |
256 | if HW_DEREE_DE5000 |
257 | libsigrok_la_SOURCES += \ | |
258 | src/hardware/deree-de5000/api.c | |
259 | endif | |
67bd8055 UH |
260 | if HW_FLUKE_DMM |
261 | libsigrok_la_SOURCES += \ | |
155b680d BV |
262 | src/hardware/fluke-dmm/fluke-dmm.h \ |
263 | src/hardware/fluke-dmm/fluke.c \ | |
264 | src/hardware/fluke-dmm/api.c | |
67bd8055 UH |
265 | endif |
266 | if HW_FX2LAFW | |
267 | libsigrok_la_SOURCES += \ | |
155b680d BV |
268 | src/hardware/fx2lafw/protocol.h \ |
269 | src/hardware/fx2lafw/protocol.c \ | |
a7d7f93c | 270 | src/hardware/fx2lafw/api.c \ |
b9d53092 BV |
271 | src/hardware/fx2lafw/dslogic.c \ |
272 | src/hardware/fx2lafw/dslogic.h | |
67bd8055 UH |
273 | endif |
274 | if HW_GMC_MH_1X_2X | |
275 | libsigrok_la_SOURCES += \ | |
155b680d BV |
276 | src/hardware/gmc-mh-1x-2x/protocol.h \ |
277 | src/hardware/gmc-mh-1x-2x/protocol.c \ | |
278 | src/hardware/gmc-mh-1x-2x/api.c | |
67bd8055 | 279 | endif |
7c198f96 ML |
280 | if HW_GWINSTEK_GDS_800 |
281 | libsigrok_la_SOURCES += \ | |
282 | src/hardware/gwinstek-gds-800/protocol.h \ | |
283 | src/hardware/gwinstek-gds-800/protocol.c \ | |
284 | src/hardware/gwinstek-gds-800/api.c | |
285 | endif | |
67bd8055 UH |
286 | if HW_HAMEG_HMO |
287 | libsigrok_la_SOURCES += \ | |
155b680d BV |
288 | src/hardware/hameg-hmo/protocol.h \ |
289 | src/hardware/hameg-hmo/protocol.c \ | |
290 | src/hardware/hameg-hmo/api.c | |
67bd8055 UH |
291 | endif |
292 | if HW_HANTEK_DSO | |
293 | libsigrok_la_SOURCES += \ | |
155b680d BV |
294 | src/hardware/hantek-dso/dso.h \ |
295 | src/hardware/hantek-dso/dso.c \ | |
296 | src/hardware/hantek-dso/api.c | |
67bd8055 | 297 | endif |
05ac4a98 DG |
298 | if HW_HUNG_CHANG_DSO_2100 |
299 | libsigrok_la_SOURCES += \ | |
300 | src/hardware/hung-chang-dso-2100/protocol.h \ | |
301 | src/hardware/hung-chang-dso-2100/protocol.c \ | |
302 | src/hardware/hung-chang-dso-2100/api.c | |
303 | endif | |
67bd8055 UH |
304 | if HW_IKALOGIC_SCANALOGIC2 |
305 | libsigrok_la_SOURCES += \ | |
155b680d BV |
306 | src/hardware/ikalogic-scanalogic2/protocol.h \ |
307 | src/hardware/ikalogic-scanalogic2/protocol.c \ | |
308 | src/hardware/ikalogic-scanalogic2/api.c | |
67bd8055 UH |
309 | endif |
310 | if HW_IKALOGIC_SCANAPLUS | |
311 | libsigrok_la_SOURCES += \ | |
155b680d BV |
312 | src/hardware/ikalogic-scanaplus/protocol.h \ |
313 | src/hardware/ikalogic-scanaplus/protocol.c \ | |
314 | src/hardware/ikalogic-scanaplus/api.c | |
67bd8055 UH |
315 | endif |
316 | if HW_KECHENG_KC_330B | |
317 | libsigrok_la_SOURCES += \ | |
155b680d BV |
318 | src/hardware/kecheng-kc-330b/protocol.h \ |
319 | src/hardware/kecheng-kc-330b/protocol.c \ | |
320 | src/hardware/kecheng-kc-330b/api.c | |
67bd8055 | 321 | endif |
9380ec2f UH |
322 | if HW_KERN_SCALE |
323 | libsigrok_la_SOURCES += \ | |
324 | src/hardware/kern-scale/protocol.h \ | |
325 | src/hardware/kern-scale/protocol.c \ | |
326 | src/hardware/kern-scale/api.c | |
327 | endif | |
16fc7ee2 | 328 | if HW_KORAD_KAXXXXP |
e75ee7de | 329 | libsigrok_la_SOURCES += \ |
16fc7ee2 UH |
330 | src/hardware/korad-kaxxxxp/protocol.h \ |
331 | src/hardware/korad-kaxxxxp/protocol.c \ | |
332 | src/hardware/korad-kaxxxxp/api.c | |
e75ee7de | 333 | endif |
67bd8055 UH |
334 | if HW_LASCAR_EL_USB |
335 | libsigrok_la_SOURCES += \ | |
155b680d BV |
336 | src/hardware/lascar-el-usb/protocol.h \ |
337 | src/hardware/lascar-el-usb/protocol.c \ | |
338 | src/hardware/lascar-el-usb/api.c | |
67bd8055 | 339 | endif |
c7b17bcb TS |
340 | if HW_LECROY_LOGICSTUDIO |
341 | libsigrok_la_SOURCES += \ | |
342 | src/hardware/lecroy-logicstudio/protocol.h \ | |
343 | src/hardware/lecroy-logicstudio/protocol.c \ | |
344 | src/hardware/lecroy-logicstudio/api.c | |
345 | endif | |
8f4e922f UH |
346 | if HW_MANSON_HCS_3XXX |
347 | libsigrok_la_SOURCES += \ | |
155b680d BV |
348 | src/hardware/manson-hcs-3xxx/protocol.h \ |
349 | src/hardware/manson-hcs-3xxx/protocol.c \ | |
350 | src/hardware/manson-hcs-3xxx/api.c | |
8f4e922f | 351 | endif |
e1ccfb19 AJ |
352 | if HW_MAYNUO_M97 |
353 | libsigrok_la_SOURCES += \ | |
354 | src/hardware/maynuo-m97/protocol.h \ | |
355 | src/hardware/maynuo-m97/protocol.c \ | |
356 | src/hardware/maynuo-m97/api.c | |
357 | endif | |
67bd8055 UH |
358 | if HW_MIC_985XX |
359 | libsigrok_la_SOURCES += \ | |
155b680d BV |
360 | src/hardware/mic-985xx/protocol.h \ |
361 | src/hardware/mic-985xx/protocol.c \ | |
362 | src/hardware/mic-985xx/api.c | |
67bd8055 | 363 | endif |
41b7bd01 MH |
364 | if HW_MOTECH_LPS_30X |
365 | libsigrok_la_SOURCES += \ | |
155b680d BV |
366 | src/hardware/motech-lps-30x/protocol.h \ |
367 | src/hardware/motech-lps-30x/protocol.c \ | |
368 | src/hardware/motech-lps-30x/api.c | |
41b7bd01 | 369 | endif |
67bd8055 UH |
370 | if HW_NORMA_DMM |
371 | libsigrok_la_SOURCES += \ | |
155b680d BV |
372 | src/hardware/norma-dmm/protocol.h \ |
373 | src/hardware/norma-dmm/protocol.c \ | |
374 | src/hardware/norma-dmm/api.c | |
67bd8055 | 375 | endif |
d4b38748 | 376 | if HW_OPENBENCH_LOGIC_SNIFFER |
67bd8055 | 377 | libsigrok_la_SOURCES += \ |
155b680d BV |
378 | src/hardware/openbench-logic-sniffer/protocol.h \ |
379 | src/hardware/openbench-logic-sniffer/protocol.c \ | |
380 | src/hardware/openbench-logic-sniffer/api.c | |
67bd8055 | 381 | endif |
4bd80e12 | 382 | if HW_PIPISTRELLO_OLS |
383 | libsigrok_la_SOURCES += \ | |
384 | src/hardware/pipistrello-ols/protocol.h \ | |
385 | src/hardware/pipistrello-ols/protocol.c \ | |
386 | src/hardware/pipistrello-ols/api.c | |
387 | endif | |
67bd8055 UH |
388 | if HW_RIGOL_DS |
389 | libsigrok_la_SOURCES += \ | |
155b680d BV |
390 | src/hardware/rigol-ds/protocol.h \ |
391 | src/hardware/rigol-ds/protocol.c \ | |
392 | src/hardware/rigol-ds/api.c | |
67bd8055 UH |
393 | endif |
394 | if HW_SALEAE_LOGIC16 | |
395 | libsigrok_la_SOURCES += \ | |
155b680d BV |
396 | src/hardware/saleae-logic16/protocol.h \ |
397 | src/hardware/saleae-logic16/protocol.c \ | |
398 | src/hardware/saleae-logic16/api.c | |
67bd8055 | 399 | endif |
ca1a7cb5 BV |
400 | if HW_SCPI_PPS |
401 | libsigrok_la_SOURCES += \ | |
402 | src/hardware/scpi-pps/protocol.h \ | |
403 | src/hardware/scpi-pps/protocol.c \ | |
d4eabea8 | 404 | src/hardware/scpi-pps/profiles.c \ |
ca1a7cb5 BV |
405 | src/hardware/scpi-pps/api.c |
406 | endif | |
67bd8055 UH |
407 | if HW_SERIAL_DMM |
408 | libsigrok_la_SOURCES += \ | |
155b680d BV |
409 | src/hardware/serial-dmm/protocol.h \ |
410 | src/hardware/serial-dmm/protocol.c \ | |
411 | src/hardware/serial-dmm/api.c | |
67bd8055 UH |
412 | endif |
413 | if HW_SYSCLK_LWLA | |
414 | libsigrok_la_SOURCES += \ | |
155b680d BV |
415 | src/hardware/sysclk-lwla/lwla.h \ |
416 | src/hardware/sysclk-lwla/lwla.c \ | |
be64f90b DE |
417 | src/hardware/sysclk-lwla/lwla1016.c \ |
418 | src/hardware/sysclk-lwla/lwla1034.c \ | |
155b680d BV |
419 | src/hardware/sysclk-lwla/protocol.h \ |
420 | src/hardware/sysclk-lwla/protocol.c \ | |
421 | src/hardware/sysclk-lwla/api.c | |
67bd8055 UH |
422 | endif |
423 | if HW_TELEINFO | |
424 | libsigrok_la_SOURCES += \ | |
155b680d BV |
425 | src/hardware/teleinfo/protocol.h \ |
426 | src/hardware/teleinfo/protocol.c \ | |
427 | src/hardware/teleinfo/api.c | |
67bd8055 | 428 | endif |
0acdd793 BV |
429 | if HW_TESTO |
430 | libsigrok_la_SOURCES += \ | |
155b680d BV |
431 | src/hardware/testo/protocol.h \ |
432 | src/hardware/testo/protocol.c \ | |
433 | src/hardware/testo/api.c | |
0acdd793 | 434 | endif |
67bd8055 UH |
435 | if HW_TONDAJ_SL_814 |
436 | libsigrok_la_SOURCES += \ | |
155b680d BV |
437 | src/hardware/tondaj-sl-814/protocol.h \ |
438 | src/hardware/tondaj-sl-814/protocol.c \ | |
439 | src/hardware/tondaj-sl-814/api.c | |
67bd8055 UH |
440 | endif |
441 | if HW_UNI_T_DMM | |
442 | libsigrok_la_SOURCES += \ | |
155b680d BV |
443 | src/hardware/uni-t-dmm/protocol.h \ |
444 | src/hardware/uni-t-dmm/protocol.c \ | |
445 | src/hardware/uni-t-dmm/api.c | |
67bd8055 UH |
446 | endif |
447 | if HW_UNI_T_UT32X | |
448 | libsigrok_la_SOURCES += \ | |
155b680d BV |
449 | src/hardware/uni-t-ut32x/protocol.h \ |
450 | src/hardware/uni-t-ut32x/protocol.c \ | |
451 | src/hardware/uni-t-ut32x/api.c | |
67bd8055 UH |
452 | endif |
453 | if HW_VICTOR_DMM | |
454 | libsigrok_la_SOURCES += \ | |
155b680d BV |
455 | src/hardware/victor-dmm/protocol.h \ |
456 | src/hardware/victor-dmm/protocol.c \ | |
457 | src/hardware/victor-dmm/api.c | |
67bd8055 | 458 | endif |
10763937 SA |
459 | if HW_YOKOGAWA_DLM |
460 | libsigrok_la_SOURCES += \ | |
461 | src/hardware/yokogawa-dlm/protocol.h \ | |
462 | src/hardware/yokogawa-dlm/protocol.c \ | |
463 | src/hardware/yokogawa-dlm/protocol_wrappers.h \ | |
464 | src/hardware/yokogawa-dlm/protocol_wrappers.c \ | |
465 | src/hardware/yokogawa-dlm/api.c | |
466 | endif | |
67bd8055 UH |
467 | if HW_ZEROPLUS_LOGIC_CUBE |
468 | libsigrok_la_SOURCES += \ | |
155b680d BV |
469 | src/hardware/zeroplus-logic-cube/analyzer.c \ |
470 | src/hardware/zeroplus-logic-cube/analyzer.h \ | |
471 | src/hardware/zeroplus-logic-cube/gl_usb.h \ | |
472 | src/hardware/zeroplus-logic-cube/gl_usb.c \ | |
473 | src/hardware/zeroplus-logic-cube/protocol.h \ | |
474 | src/hardware/zeroplus-logic-cube/protocol.c \ | |
475 | src/hardware/zeroplus-logic-cube/api.c | |
67bd8055 UH |
476 | endif |
477 | ||
bc8ff24d | 478 | libsigrok_la_LIBADD = $(SR_EXTRA_LIBS) $(LIBSIGROK_LIBS) |
1f61c22f | 479 | libsigrok_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined |
ff101fca | 480 | |
45c59c8b | 481 | library_includedir = $(includedir)/libsigrok |
63d0fb75 ML |
482 | library_include_HEADERS = \ |
483 | include/libsigrok/libsigrok.h \ | |
122322a9 DE |
484 | include/libsigrok/proto.h |
485 | nodist_library_include_HEADERS = \ | |
63d0fb75 | 486 | include/libsigrok/version.h |
155b680d | 487 | noinst_HEADERS = src/libsigrok-internal.h |
a1bb33af | 488 | |
8a7b47cd UH |
489 | pkgconfigdir = $(libdir)/pkgconfig |
490 | pkgconfig_DATA = libsigrok.pc | |
d658e348 | 491 | |
67bd8055 UH |
492 | EXTRA_DIST = \ |
493 | Doxyfile \ | |
494 | HACKING \ | |
495 | README.devices \ | |
31ac7735 DE |
496 | bindings/cxx/ConfigKey_methods.cpp \ |
497 | bindings/cxx/ConfigKey_methods.hpp \ | |
498 | bindings/cxx/ConfigKey_methods.i \ | |
499 | bindings/cxx/Doxyfile \ | |
500 | bindings/cxx/QuantityFlag_methods.cpp \ | |
501 | bindings/cxx/QuantityFlag_methods.hpp \ | |
502 | bindings/cxx/enums.py \ | |
503 | bindings/python/Doxyfile \ | |
504 | bindings/python/setup.py \ | |
505 | bindings/python/sigrok/__init__.py \ | |
506 | bindings/python/sigrok/core/__init__.py \ | |
507 | bindings/python/sigrok/core/classes.i \ | |
508 | bindings/java/Doxyfile \ | |
509 | bindings/java/org/sigrok/core/classes/classes.i \ | |
510 | bindings/java/org/sigrok/core/interfaces/DatafeedCallback.java \ | |
511 | bindings/java/org/sigrok/core/interfaces/LogCallback.java \ | |
31ac7735 DE |
512 | bindings/swig/classes.i \ |
513 | bindings/swig/doc.py \ | |
0a9d05dc | 514 | bindings/swig/templates.i \ |
67bd8055 UH |
515 | contrib/gnuplot_chronovu_la8.gpi \ |
516 | contrib/gnuplot_rigol_ds1xx2.gpi \ | |
517 | contrib/gnuplot_usbeesx.gpi \ | |
518 | contrib/gnuplot_usbeedx8.gpi \ | |
519 | contrib/gnuplot_usbeedx16.gpi \ | |
520 | contrib/sigrok-logo-notext.png \ | |
521 | contrib/z60_libsigrok.rules | |
522 | ||
523 | if HAVE_CHECK | |
02a2bf68 | 524 | TESTS = tests/main |
67bd8055 | 525 | check_PROGRAMS = ${TESTS} |
65489c1a | 526 | endif |
67bd8055 | 527 | |
02a2bf68 | 528 | tests_main_SOURCES = \ |
6592c369 | 529 | include/libsigrok/libsigrok.h \ |
67bd8055 UH |
530 | tests/lib.c \ |
531 | tests/lib.h \ | |
02a2bf68 UH |
532 | tests/main.c \ |
533 | tests/core.c \ | |
534 | tests/input_all.c \ | |
535 | tests/input_binary.c \ | |
536 | tests/output_all.c \ | |
537 | tests/transform_all.c \ | |
538 | tests/session.c \ | |
539 | tests/strutil.c \ | |
540 | tests/version.c \ | |
541 | tests/driver_all.c \ | |
542 | tests/device.c \ | |
6b71bf1b UH |
543 | tests/trigger.c \ |
544 | tests/analog.c | |
02a2bf68 | 545 | |
65489c1a | 546 | tests_main_LDADD = libsigrok.la $(SR_EXTRA_LIBS) $(TESTS_LIBS) |
dd8b5f56 | 547 | |
580ed400 ML |
548 | BUILD_EXTRA = |
549 | INSTALL_EXTRA = | |
7252a09e | 550 | UNINSTALL_EXTRA = |
580ed400 ML |
551 | CLEAN_EXTRA = |
552 | ||
c23c8659 ML |
553 | if BINDINGS_CXX |
554 | ||
52ff4f6a | 555 | lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la |
c23c8659 | 556 | |
52ff4f6a | 557 | bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp |
c23c8659 | 558 | |
bc8ff24d | 559 | bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(SR_EXTRA_LIBS) $(LIBSIGROKCXX_LIBS) |
1f61c22f | 560 | bindings_cxx_libsigrokcxx_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined |
fc8f82e9 | 561 | |
0959ed3d UH |
562 | bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx |
563 | bindings_cxx_libsigrokcxx_la_include_HEADERS = \ | |
122322a9 DE |
564 | bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp |
565 | nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS = \ | |
161dc24d | 566 | bindings/cxx/include/libsigrokcxx/enums.hpp |
c23c8659 | 567 | |
52ff4f6a | 568 | pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc |
c23c8659 | 569 | |
3532ed01 | 570 | doxy/xml/index.xml: include/libsigrok/libsigrok.h |
7f82ec4d | 571 | $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null |
580ed400 | 572 | |
cf5b338e | 573 | bindings/swig/enums.i: bindings/cxx/enums.timestamp |
580ed400 | 574 | bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp |
161dc24d | 575 | bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp |
c23c8659 | 576 | |
b595a458 | 577 | bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \ |
c23c8659 | 578 | bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp |
b595a458 | 579 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml |
f2a189f0 | 580 | $(AM_V_at)touch $@ |
c23c8659 | 581 | |
580ed400 | 582 | bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \ |
cf5b338e | 583 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) |
c23c8659 | 584 | |
580ed400 | 585 | cxx-clean: |
3532ed01 | 586 | rm -rf doxy/ |
bd4fda24 | 587 | rm -rf bindings/cxx/doxy/ |
45ec8f77 | 588 | rm -f bindings/swig/enums.i |
580ed400 | 589 | rm -f bindings/cxx/enums.cpp |
161dc24d | 590 | rm -f bindings/cxx/include/libsigrokcxx/enums.hpp |
580ed400 | 591 | rm -f bindings/cxx/enums.timestamp |
c23c8659 | 592 | |
580ed400 ML |
593 | CLEAN_EXTRA += cxx-clean |
594 | ||
595 | endif | |
f7740954 | 596 | |
bd4fda24 ML |
597 | CPPXMLDOC = bindings/cxx/doxy/xml/index.xml |
598 | ||
161dc24d | 599 | $(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \ |
bd4fda24 | 600 | bindings/cxx/enums.timestamp |
33c84e81 | 601 | $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null |
bd4fda24 | 602 | |
8ebf1469 DE |
603 | # Macro definitions to be used by the SWIG parser. |
604 | swig_defs = -Dnoexcept= -Dprivate=protected -DG_GNUC_BEGIN_IGNORE_DEPRECATIONS= -DG_GNUC_END_IGNORE_DEPRECATIONS= | |
605 | ||
f7740954 ML |
606 | if BINDINGS_PYTHON |
607 | ||
d1785122 | 608 | PDIR = bindings/python |
df979d6d ML |
609 | PDOC_START = bindings/python/sigrok/core/doc_start.i |
610 | PDOC_END = bindings/python/sigrok/core/doc_end.i | |
bd4fda24 | 611 | |
5dd538de | 612 | setup_vars = VERSION='$(PACKAGE_VERSION)' CC='$(CXX)' CFLAGS='$(AM_CXXFLAGS) $(CXXFLAGS)' CXXFLAGS='$(AM_CXXFLAGS) $(CXXFLAGS)' LDADD='$(PYSIGROK_LIBS)' |
c05a0ba5 DE |
613 | setup_quiet = --quiet |
614 | setup_py = $(PYTHON) $(srcdir)/$(PDIR)/setup.py $(setup_vars) $(setup_quiet) | |
a9cb82ac | 615 | |
df979d6d | 616 | $(PDOC_START): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) |
f3256bb7 | 617 | $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core |
df979d6d ML |
618 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) start > $@ |
619 | ||
620 | $(PDOC_END): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) | |
621 | $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core | |
622 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) end > $@ | |
d1785122 ML |
623 | |
624 | python-build: $(PDIR)/timestamp | |
625 | ||
fd31865e | 626 | $(PDIR)/timestamp: $(PDIR)/sigrok/core/classes.i \ |
36e3f6a9 ML |
627 | bindings/swig/classes.i bindings/swig/templates.i \ |
628 | bindings/swig/enums.i $(PDOC_START) $(PDOC_END) \ | |
629 | $(library_include_HEADERS) \ | |
df979d6d | 630 | $(nodist_library_include_HEADERS) \ |
fd31865e ML |
631 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ |
632 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
ba3070ff | 633 | @ORDER@ bindings/cxx/libsigrokcxx.la |
a9cb82ac | 634 | $(AM_V_at)$(setup_py) clean --all 2>/dev/null |
8ebf1469 | 635 | $(AM_V_GEN)$(setup_py) build_ext --swig "$(SWIG)" --swig-opts '$(swig_defs)' build_py |
a9cb82ac | 636 | $(AM_V_at): >$@ |
f7740954 | 637 | |
a9cb82ac DE |
638 | python-install: |
639 | $(AM_V_at)$(MKDIR_P) "$(DESTDIR)$(prefix)" "$(DESTDIR)$(exec_prefix)" | |
452986be DE |
640 | destdir='$(DESTDIR)'; $(setup_py) install $${destdir:+"--root=$$destdir"} \ |
641 | --prefix "$(prefix)" --exec-prefix "$(exec_prefix)" | |
f7740954 | 642 | |
c26162ff | 643 | python-clean: |
a9cb82ac DE |
644 | -$(AM_V_at)rm -f $(PDIR)/timestamp |
645 | -$(AM_V_at)rm -fr $(PDIR)/doxy | |
c05a0ba5 | 646 | -$(AM_V_at)$(setup_py) clean --all 2>/dev/null |
6a8c1d68 ML |
647 | |
648 | python-doc: | |
a9cb82ac | 649 | $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR="$(abs_builddir)/$(PDIR)/" doxygen Doxyfile 2>/dev/null |
f7740954 ML |
650 | |
651 | BUILD_EXTRA += python-build | |
652 | INSTALL_EXTRA += python-install | |
653 | CLEAN_EXTRA += python-clean | |
654 | ||
655 | endif | |
656 | ||
9fcf4d0b ML |
657 | if BINDINGS_JAVA |
658 | ||
659 | JDIR = bindings/java | |
90bd7656 ML |
660 | JPKG = org/sigrok/core |
661 | JCLS = $(JDIR)/$(JPKG)/classes | |
662 | JINT = $(JDIR)/$(JPKG)/interfaces | |
33c84e81 | 663 | JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java |
90bd7656 | 664 | JSWG = $(JCLS)/classes.i |
bd4fda24 | 665 | JDOC = $(JCLS)/doc.i |
90bd7656 | 666 | JCXX = $(JCLS)/classes_wrap.cxx |
9fcf4d0b ML |
667 | JLIB = $(JDIR)/libsigrok_java_core_classes.so |
668 | JJAR = $(JDIR)/sigrok-core.jar | |
669 | ||
a9cb82ac DE |
670 | java_cleanfiles = $(JCXX) $(JCLS)/*.java $(JCLS)/*.class $(JINT)/*.class $(JJAR) $(JLIB) |
671 | ||
9fcf4d0b ML |
672 | java-build: $(JJAR) $(JLIB) |
673 | ||
dbde3b65 | 674 | $(JDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) |
f3256bb7 | 675 | $(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS) |
dbde3b65 | 676 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py java $(CPPXMLDOC) > $@ |
bd4fda24 | 677 | |
36e3f6a9 ML |
678 | $(JCXX): $(srcdir)/$(JSWG) $(JDOC) bindings/swig/classes.i \ |
679 | bindings/swig/templates.i bindings/swig/enums.i \ | |
fd31865e ML |
680 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ |
681 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) | |
a9cb82ac | 682 | -$(AM_V_at)rm -f $(java_cleanfiles) |
8ebf1469 | 683 | $(AM_V_GEN)$(SWIG) -c++ $(swig_defs) \ |
4c9208a7 | 684 | -java -package org.sigrok.core.classes \ |
dbde3b65 DE |
685 | -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) $(JNI_CPPFLAGS) \ |
686 | -outdir $(JCLS) -o $@ $(srcdir)/$(JSWG) | |
9fcf4d0b | 687 | |
90bd7656 | 688 | $(JJAR): $(JCXX) |
1f61c22f | 689 | $(AM_V_GEN)$(JAVAC) -d $(JDIR) $(JSRC) |
f2a189f0 | 690 | $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG) |
9fcf4d0b | 691 | |
fd31865e ML |
692 | $(JLIB): $(JCXX) \ |
693 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) \ | |
694 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
695 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
ba3070ff | 696 | @ORDER@ bindings/cxx/libsigrokcxx.la |
1f61c22f | 697 | $(AM_V_GEN)$(CXXCOMPILE) $(JNI_CPPFLAGS) -L.libs -Lbindings/cxx/.libs \ |
90bd7656 | 698 | -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \ |
1f61c22f | 699 | -lsigrokcxx $(LIBSIGROKCXX_LIBS) -o $(JLIB) |
9fcf4d0b ML |
700 | |
701 | java-install: | |
df705a7a | 702 | $(INSTALL) -d $(DESTDIR)$(libdir)/jni |
8e0f9bf7 | 703 | $(INSTALL) $(JLIB) $(DESTDIR)$(libdir)/jni |
df705a7a | 704 | $(INSTALL) -d $(DESTDIR)$(datadir)/java |
8e0f9bf7 | 705 | $(INSTALL) $(JJAR) $(DESTDIR)$(datadir)/java |
9fcf4d0b | 706 | |
7252a09e DE |
707 | java-uninstall: |
708 | -rm -f $(DESTDIR)$(datadir)/java/sigrok-core.jar | |
709 | -rm -f $(DESTDIR)$(libdir)/jni/libsigrok_java_core_classes.so | |
710 | ||
9fcf4d0b | 711 | java-clean: |
45ec8f77 | 712 | -$(AM_V_at)rm -f $(java_cleanfiles) $(JDOC) |
a9cb82ac | 713 | -$(AM_V_at)rm -fr $(JDIR)/doxy |
8a314e90 ML |
714 | |
715 | java-doc: | |
a9cb82ac | 716 | $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR="$(abs_builddir)/$(JDIR)/" doxygen Doxyfile |
9fcf4d0b ML |
717 | |
718 | BUILD_EXTRA += java-build | |
719 | INSTALL_EXTRA += java-install | |
7252a09e | 720 | UNINSTALL_EXTRA += java-uninstall |
9fcf4d0b ML |
721 | CLEAN_EXTRA += java-clean |
722 | ||
723 | endif | |
724 | ||
f7740954 ML |
725 | all-local: $(BUILD_EXTRA) |
726 | install-exec-local: $(INSTALL_EXTRA) | |
7252a09e | 727 | uninstall-local: $(UNINSTALL_EXTRA) |
d1785122 | 728 | clean-local: $(CLEAN_EXTRA) |
f7740954 | 729 | |
37829c15 DE |
730 | .PHONY: dist-changelog |
731 | ||
732 | dist-hook: dist-changelog | |
733 | ||
734 | dist-changelog: | |
735 | $(AM_V_at)if test ! -d '$(top_srcdir)/.git'; then \ | |
736 | cp -f '$(top_srcdir)/ChangeLog' "$(top_distdir)/ChangeLog"; \ | |
737 | elif git -C '$(top_srcdir)' log >.ChangeLog.tmp; then \ | |
738 | mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \ | |
739 | else \ | |
740 | rm -f .ChangeLog.tmp; exit 1; \ | |
741 | fi | |
0fc12d66 | 742 |