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