]>
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 autostuff | |
22 | ||
23 | AM_CPPFLAGS = -I$(srcdir)/src -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"' | |
24 | ||
25 | lib_LTLIBRARIES = libsigrok.la | |
26 | ||
27 | # Backend files | |
28 | libsigrok_la_SOURCES = \ | |
29 | src/backend.c \ | |
30 | src/device.c \ | |
31 | src/session.c \ | |
32 | src/session_file.c \ | |
33 | src/session_driver.c \ | |
34 | src/drivers.c \ | |
35 | src/hwdriver.c \ | |
36 | src/trigger.c \ | |
37 | src/soft-trigger.c \ | |
38 | src/analog.c \ | |
39 | src/fallback.c \ | |
40 | src/strutil.c \ | |
41 | src/log.c \ | |
42 | src/version.c \ | |
43 | src/error.c \ | |
44 | src/std.c | |
45 | ||
46 | # Input modules | |
47 | libsigrok_la_SOURCES += \ | |
48 | src/input/input.c \ | |
49 | src/input/binary.c \ | |
50 | src/input/chronovu_la8.c \ | |
51 | src/input/csv.c \ | |
52 | src/input/vcd.c \ | |
53 | src/input/wav.c | |
54 | ||
55 | # Output modules | |
56 | libsigrok_la_SOURCES += \ | |
57 | src/output/output.c \ | |
58 | src/output/analog.c \ | |
59 | src/output/ascii.c \ | |
60 | src/output/bits.c \ | |
61 | src/output/binary.c \ | |
62 | src/output/csv.c \ | |
63 | src/output/chronovu_la8.c \ | |
64 | src/output/wav.c \ | |
65 | src/output/gnuplot.c \ | |
66 | src/output/hex.c \ | |
67 | src/output/ols.c \ | |
68 | src/output/srzip.c \ | |
69 | src/output/vcd.c | |
70 | ||
71 | # Transform modules | |
72 | libsigrok_la_SOURCES += \ | |
73 | src/transform/transform.c \ | |
74 | src/transform/nop.c \ | |
75 | src/transform/scale.c \ | |
76 | src/transform/invert.c | |
77 | ||
78 | # SCPI support | |
79 | libsigrok_la_SOURCES += \ | |
80 | src/scpi/scpi.c \ | |
81 | src/scpi/scpi_tcp.c | |
82 | if NEED_RPC | |
83 | libsigrok_la_SOURCES += \ | |
84 | src/scpi/scpi_vxi.c \ | |
85 | src/scpi/vxi_clnt.c \ | |
86 | src/scpi/vxi_xdr.c \ | |
87 | src/scpi/vxi.h | |
88 | endif | |
89 | if NEED_SERIAL | |
90 | libsigrok_la_SOURCES += \ | |
91 | src/serial.c \ | |
92 | src/scpi/scpi_serial.c | |
93 | endif | |
94 | if NEED_USB | |
95 | libsigrok_la_SOURCES += \ | |
96 | src/ezusb.c \ | |
97 | src/usb.c \ | |
98 | src/scpi/scpi_usbtmc_libusb.c | |
99 | endif | |
100 | if NEED_VISA | |
101 | libsigrok_la_SOURCES += \ | |
102 | src/scpi/scpi_visa.c | |
103 | endif | |
104 | if NEED_GPIB | |
105 | libsigrok_la_SOURCES += \ | |
106 | src/scpi/scpi_libgpib.c | |
107 | endif | |
108 | ||
109 | # Modbus support | |
110 | libsigrok_la_SOURCES += \ | |
111 | src/modbus/modbus.c | |
112 | if NEED_SERIAL | |
113 | libsigrok_la_SOURCES += \ | |
114 | src/modbus/modbus_serial_rtu.c | |
115 | endif | |
116 | ||
117 | # Hardware (DMM chip parsers) | |
118 | libsigrok_la_SOURCES += \ | |
119 | src/dmm/es519xx.c \ | |
120 | src/dmm/fs9721.c \ | |
121 | src/dmm/fs9922.c \ | |
122 | src/dmm/m2110.c \ | |
123 | src/dmm/metex14.c \ | |
124 | src/dmm/rs9lcd.c \ | |
125 | src/dmm/bm25x.c \ | |
126 | src/dmm/ut71x.c \ | |
127 | src/dmm/ut372.c \ | |
128 | src/dmm/vc870.c | |
129 | ||
130 | # Hardware (LCR chip parsers) | |
131 | if NEED_SERIAL | |
132 | libsigrok_la_SOURCES += \ | |
133 | src/lcr/es51919.c | |
134 | endif | |
135 | ||
136 | # Hardware drivers | |
137 | if HW_AGILENT_DMM | |
138 | libsigrok_la_SOURCES += \ | |
139 | src/hardware/agilent-dmm/api.c \ | |
140 | src/hardware/agilent-dmm/agilent-dmm.h \ | |
141 | src/hardware/agilent-dmm/sched.c | |
142 | endif | |
143 | if HW_APPA_55II | |
144 | libsigrok_la_SOURCES += \ | |
145 | src/hardware/appa-55ii/protocol.h \ | |
146 | src/hardware/appa-55ii/protocol.c \ | |
147 | src/hardware/appa-55ii/api.c | |
148 | endif | |
149 | if HW_ASIX_SIGMA | |
150 | libsigrok_la_SOURCES += \ | |
151 | src/hardware/asix-sigma/asix-sigma.h \ | |
152 | src/hardware/asix-sigma/asix-sigma.c | |
153 | endif | |
154 | if HW_ATTEN_PPS3XXX | |
155 | libsigrok_la_SOURCES += \ | |
156 | src/hardware/atten-pps3xxx/protocol.h \ | |
157 | src/hardware/atten-pps3xxx/protocol.c \ | |
158 | src/hardware/atten-pps3xxx/api.c | |
159 | endif | |
160 | if HW_BAYLIBRE_ACME | |
161 | libsigrok_la_SOURCES += \ | |
162 | src/hardware/baylibre-acme/protocol.h \ | |
163 | src/hardware/baylibre-acme/protocol.c \ | |
164 | src/hardware/baylibre-acme/api.c \ | |
165 | src/hardware/baylibre-acme/gpio.h \ | |
166 | src/hardware/baylibre-acme/gpio.c | |
167 | endif | |
168 | if HW_BEAGLELOGIC | |
169 | libsigrok_la_SOURCES += \ | |
170 | src/hardware/beaglelogic/beaglelogic.h \ | |
171 | src/hardware/beaglelogic/protocol.h \ | |
172 | src/hardware/beaglelogic/protocol.c \ | |
173 | src/hardware/beaglelogic/api.c | |
174 | endif | |
175 | if HW_BRYMEN_BM86X | |
176 | libsigrok_la_SOURCES += \ | |
177 | src/hardware/brymen-bm86x/protocol.h \ | |
178 | src/hardware/brymen-bm86x/protocol.c \ | |
179 | src/hardware/brymen-bm86x/api.c | |
180 | endif | |
181 | if HW_BRYMEN_DMM | |
182 | libsigrok_la_SOURCES += \ | |
183 | src/hardware/brymen-dmm/parser.c \ | |
184 | src/hardware/brymen-dmm/protocol.h \ | |
185 | src/hardware/brymen-dmm/protocol.c \ | |
186 | src/hardware/brymen-dmm/api.c | |
187 | endif | |
188 | if HW_CEM_DT_885X | |
189 | libsigrok_la_SOURCES += \ | |
190 | src/hardware/cem-dt-885x/protocol.h \ | |
191 | src/hardware/cem-dt-885x/protocol.c \ | |
192 | src/hardware/cem-dt-885x/api.c | |
193 | endif | |
194 | if HW_CENTER_3XX | |
195 | libsigrok_la_SOURCES += \ | |
196 | src/hardware/center-3xx/protocol.h \ | |
197 | src/hardware/center-3xx/protocol.c \ | |
198 | src/hardware/center-3xx/api.c | |
199 | endif | |
200 | if HW_CHRONOVU_LA | |
201 | libsigrok_la_SOURCES += \ | |
202 | src/hardware/chronovu-la/protocol.h \ | |
203 | src/hardware/chronovu-la/protocol.c \ | |
204 | src/hardware/chronovu-la/api.c | |
205 | endif | |
206 | if HW_COLEAD_SLM | |
207 | libsigrok_la_SOURCES += \ | |
208 | src/hardware/colead-slm/protocol.h \ | |
209 | src/hardware/colead-slm/protocol.c \ | |
210 | src/hardware/colead-slm/api.c | |
211 | endif | |
212 | if HW_CONRAD_DIGI_35_CPU | |
213 | libsigrok_la_SOURCES += \ | |
214 | src/hardware/conrad-digi-35-cpu/protocol.h \ | |
215 | src/hardware/conrad-digi-35-cpu/protocol.c \ | |
216 | src/hardware/conrad-digi-35-cpu/api.c | |
217 | endif | |
218 | if HW_DEMO | |
219 | libsigrok_la_SOURCES += \ | |
220 | src/hardware/demo/demo.c | |
221 | endif | |
222 | if HW_DEREE_DE5000 | |
223 | libsigrok_la_SOURCES += \ | |
224 | src/hardware/deree-de5000/api.c | |
225 | endif | |
226 | if HW_FLUKE_DMM | |
227 | libsigrok_la_SOURCES += \ | |
228 | src/hardware/fluke-dmm/fluke-dmm.h \ | |
229 | src/hardware/fluke-dmm/fluke.c \ | |
230 | src/hardware/fluke-dmm/api.c | |
231 | endif | |
232 | if HW_FX2LAFW | |
233 | libsigrok_la_SOURCES += \ | |
234 | src/hardware/fx2lafw/protocol.h \ | |
235 | src/hardware/fx2lafw/protocol.c \ | |
236 | src/hardware/fx2lafw/api.c \ | |
237 | src/hardware/fx2lafw/dslogic.c \ | |
238 | src/hardware/fx2lafw/dslogic.h | |
239 | endif | |
240 | if HW_GMC_MH_1X_2X | |
241 | libsigrok_la_SOURCES += \ | |
242 | src/hardware/gmc-mh-1x-2x/protocol.h \ | |
243 | src/hardware/gmc-mh-1x-2x/protocol.c \ | |
244 | src/hardware/gmc-mh-1x-2x/api.c | |
245 | endif | |
246 | if HW_HAMEG_HMO | |
247 | libsigrok_la_SOURCES += \ | |
248 | src/hardware/hameg-hmo/protocol.h \ | |
249 | src/hardware/hameg-hmo/protocol.c \ | |
250 | src/hardware/hameg-hmo/api.c | |
251 | endif | |
252 | if HW_HANTEK_DSO | |
253 | libsigrok_la_SOURCES += \ | |
254 | src/hardware/hantek-dso/dso.h \ | |
255 | src/hardware/hantek-dso/dso.c \ | |
256 | src/hardware/hantek-dso/api.c | |
257 | endif | |
258 | if HW_IKALOGIC_SCANALOGIC2 | |
259 | libsigrok_la_SOURCES += \ | |
260 | src/hardware/ikalogic-scanalogic2/protocol.h \ | |
261 | src/hardware/ikalogic-scanalogic2/protocol.c \ | |
262 | src/hardware/ikalogic-scanalogic2/api.c | |
263 | endif | |
264 | if HW_IKALOGIC_SCANAPLUS | |
265 | libsigrok_la_SOURCES += \ | |
266 | src/hardware/ikalogic-scanaplus/protocol.h \ | |
267 | src/hardware/ikalogic-scanaplus/protocol.c \ | |
268 | src/hardware/ikalogic-scanaplus/api.c | |
269 | endif | |
270 | if HW_KECHENG_KC_330B | |
271 | libsigrok_la_SOURCES += \ | |
272 | src/hardware/kecheng-kc-330b/protocol.h \ | |
273 | src/hardware/kecheng-kc-330b/protocol.c \ | |
274 | src/hardware/kecheng-kc-330b/api.c | |
275 | endif | |
276 | if HW_LASCAR_EL_USB | |
277 | libsigrok_la_SOURCES += \ | |
278 | src/hardware/lascar-el-usb/protocol.h \ | |
279 | src/hardware/lascar-el-usb/protocol.c \ | |
280 | src/hardware/lascar-el-usb/api.c | |
281 | endif | |
282 | if HW_MANSON_HCS_3XXX | |
283 | libsigrok_la_SOURCES += \ | |
284 | src/hardware/manson-hcs-3xxx/protocol.h \ | |
285 | src/hardware/manson-hcs-3xxx/protocol.c \ | |
286 | src/hardware/manson-hcs-3xxx/api.c | |
287 | endif | |
288 | if HW_MAYNUO_M97 | |
289 | libsigrok_la_SOURCES += \ | |
290 | src/hardware/maynuo-m97/protocol.h \ | |
291 | src/hardware/maynuo-m97/protocol.c \ | |
292 | src/hardware/maynuo-m97/api.c | |
293 | endif | |
294 | if HW_MIC_985XX | |
295 | libsigrok_la_SOURCES += \ | |
296 | src/hardware/mic-985xx/protocol.h \ | |
297 | src/hardware/mic-985xx/protocol.c \ | |
298 | src/hardware/mic-985xx/api.c | |
299 | endif | |
300 | if HW_MOTECH_LPS_30X | |
301 | libsigrok_la_SOURCES += \ | |
302 | src/hardware/motech-lps-30x/protocol.h \ | |
303 | src/hardware/motech-lps-30x/protocol.c \ | |
304 | src/hardware/motech-lps-30x/api.c | |
305 | endif | |
306 | if HW_NORMA_DMM | |
307 | libsigrok_la_SOURCES += \ | |
308 | src/hardware/norma-dmm/protocol.h \ | |
309 | src/hardware/norma-dmm/protocol.c \ | |
310 | src/hardware/norma-dmm/api.c | |
311 | endif | |
312 | if HW_OPENBENCH_LOGIC_SNIFFER | |
313 | libsigrok_la_SOURCES += \ | |
314 | src/hardware/openbench-logic-sniffer/protocol.h \ | |
315 | src/hardware/openbench-logic-sniffer/protocol.c \ | |
316 | src/hardware/openbench-logic-sniffer/api.c | |
317 | endif | |
318 | if HW_PIPISTRELLO_OLS | |
319 | libsigrok_la_SOURCES += \ | |
320 | src/hardware/pipistrello-ols/protocol.h \ | |
321 | src/hardware/pipistrello-ols/protocol.c \ | |
322 | src/hardware/pipistrello-ols/api.c | |
323 | endif | |
324 | if HW_RIGOL_DS | |
325 | libsigrok_la_SOURCES += \ | |
326 | src/hardware/rigol-ds/protocol.h \ | |
327 | src/hardware/rigol-ds/protocol.c \ | |
328 | src/hardware/rigol-ds/api.c | |
329 | endif | |
330 | if HW_SALEAE_LOGIC16 | |
331 | libsigrok_la_SOURCES += \ | |
332 | src/hardware/saleae-logic16/protocol.h \ | |
333 | src/hardware/saleae-logic16/protocol.c \ | |
334 | src/hardware/saleae-logic16/api.c | |
335 | endif | |
336 | if HW_SCPI_PPS | |
337 | libsigrok_la_SOURCES += \ | |
338 | src/hardware/scpi-pps/protocol.h \ | |
339 | src/hardware/scpi-pps/protocol.c \ | |
340 | src/hardware/scpi-pps/profiles.c \ | |
341 | src/hardware/scpi-pps/api.c | |
342 | endif | |
343 | if HW_SERIAL_DMM | |
344 | libsigrok_la_SOURCES += \ | |
345 | src/hardware/serial-dmm/protocol.h \ | |
346 | src/hardware/serial-dmm/protocol.c \ | |
347 | src/hardware/serial-dmm/api.c | |
348 | endif | |
349 | if HW_SYSCLK_LWLA | |
350 | libsigrok_la_SOURCES += \ | |
351 | src/hardware/sysclk-lwla/lwla.h \ | |
352 | src/hardware/sysclk-lwla/lwla.c \ | |
353 | src/hardware/sysclk-lwla/protocol.h \ | |
354 | src/hardware/sysclk-lwla/protocol.c \ | |
355 | src/hardware/sysclk-lwla/api.c | |
356 | endif | |
357 | if HW_TELEINFO | |
358 | libsigrok_la_SOURCES += \ | |
359 | src/hardware/teleinfo/protocol.h \ | |
360 | src/hardware/teleinfo/protocol.c \ | |
361 | src/hardware/teleinfo/api.c | |
362 | endif | |
363 | if HW_TESTO | |
364 | libsigrok_la_SOURCES += \ | |
365 | src/hardware/testo/protocol.h \ | |
366 | src/hardware/testo/protocol.c \ | |
367 | src/hardware/testo/api.c | |
368 | endif | |
369 | if HW_TONDAJ_SL_814 | |
370 | libsigrok_la_SOURCES += \ | |
371 | src/hardware/tondaj-sl-814/protocol.h \ | |
372 | src/hardware/tondaj-sl-814/protocol.c \ | |
373 | src/hardware/tondaj-sl-814/api.c | |
374 | endif | |
375 | if HW_UNI_T_DMM | |
376 | libsigrok_la_SOURCES += \ | |
377 | src/hardware/uni-t-dmm/protocol.h \ | |
378 | src/hardware/uni-t-dmm/protocol.c \ | |
379 | src/hardware/uni-t-dmm/api.c | |
380 | endif | |
381 | if HW_UNI_T_UT32X | |
382 | libsigrok_la_SOURCES += \ | |
383 | src/hardware/uni-t-ut32x/protocol.h \ | |
384 | src/hardware/uni-t-ut32x/protocol.c \ | |
385 | src/hardware/uni-t-ut32x/api.c | |
386 | endif | |
387 | if HW_VICTOR_DMM | |
388 | libsigrok_la_SOURCES += \ | |
389 | src/hardware/victor-dmm/protocol.h \ | |
390 | src/hardware/victor-dmm/protocol.c \ | |
391 | src/hardware/victor-dmm/api.c | |
392 | endif | |
393 | if HW_YOKOGAWA_DLM | |
394 | libsigrok_la_SOURCES += \ | |
395 | src/hardware/yokogawa-dlm/protocol.h \ | |
396 | src/hardware/yokogawa-dlm/protocol.c \ | |
397 | src/hardware/yokogawa-dlm/protocol_wrappers.h \ | |
398 | src/hardware/yokogawa-dlm/protocol_wrappers.c \ | |
399 | src/hardware/yokogawa-dlm/api.c | |
400 | endif | |
401 | if HW_ZEROPLUS_LOGIC_CUBE | |
402 | libsigrok_la_SOURCES += \ | |
403 | src/hardware/zeroplus-logic-cube/analyzer.c \ | |
404 | src/hardware/zeroplus-logic-cube/analyzer.h \ | |
405 | src/hardware/zeroplus-logic-cube/gl_usb.h \ | |
406 | src/hardware/zeroplus-logic-cube/gl_usb.c \ | |
407 | src/hardware/zeroplus-logic-cube/protocol.h \ | |
408 | src/hardware/zeroplus-logic-cube/protocol.c \ | |
409 | src/hardware/zeroplus-logic-cube/api.c | |
410 | endif | |
411 | ||
412 | libsigrok_la_LIBADD = $(LIBOBJS) | |
413 | ||
414 | libsigrok_la_LDFLAGS = $(SR_LIB_LDFLAGS) | |
415 | ||
416 | libsigrok_la_LDFLAGS += -no-undefined | |
417 | ||
418 | library_includedir = $(includedir)/libsigrok | |
419 | library_include_HEADERS = \ | |
420 | include/libsigrok/libsigrok.h \ | |
421 | include/libsigrok/proto.h \ | |
422 | include/libsigrok/version.h | |
423 | noinst_HEADERS = src/libsigrok-internal.h | |
424 | ||
425 | pkgconfigdir = $(libdir)/pkgconfig | |
426 | pkgconfig_DATA = libsigrok.pc | |
427 | ||
428 | EXTRA_DIST = \ | |
429 | Doxyfile \ | |
430 | HACKING \ | |
431 | README.devices \ | |
432 | contrib/gnuplot_chronovu_la8.gpi \ | |
433 | contrib/gnuplot_rigol_ds1xx2.gpi \ | |
434 | contrib/gnuplot_usbeesx.gpi \ | |
435 | contrib/gnuplot_usbeedx8.gpi \ | |
436 | contrib/gnuplot_usbeedx16.gpi \ | |
437 | contrib/sigrok-logo-notext.png \ | |
438 | contrib/z60_libsigrok.rules | |
439 | ||
440 | if HAVE_CHECK | |
441 | ||
442 | TESTS = tests/main | |
443 | ||
444 | check_PROGRAMS = ${TESTS} | |
445 | ||
446 | tests_main_SOURCES = \ | |
447 | include/libsigrok/libsigrok.h \ | |
448 | tests/lib.c \ | |
449 | tests/lib.h \ | |
450 | tests/main.c \ | |
451 | tests/core.c \ | |
452 | tests/input_all.c \ | |
453 | tests/input_binary.c \ | |
454 | tests/output_all.c \ | |
455 | tests/transform_all.c \ | |
456 | tests/session.c \ | |
457 | tests/strutil.c \ | |
458 | tests/version.c \ | |
459 | tests/driver_all.c \ | |
460 | tests/device.c \ | |
461 | tests/trigger.c | |
462 | ||
463 | tests_main_CFLAGS = @check_CFLAGS@ | |
464 | ||
465 | tests_main_LDADD = $(top_builddir)/libsigrok.la @check_LIBS@ | |
466 | ||
467 | endif | |
468 | ||
469 | BUILD_EXTRA = | |
470 | INSTALL_EXTRA = | |
471 | CLEAN_EXTRA = | |
472 | ||
473 | if BINDINGS_CXX | |
474 | ||
475 | lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la | |
476 | ||
477 | bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp | |
478 | ||
479 | bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(glibmm_LIBS) | |
480 | ||
481 | bindings_cxx_libsigrokcxx_la_LDFLAGS = $(SR_LIB_LDFLAGS) | |
482 | ||
483 | bindings_cxx_libsigrokcxx_la_LDFLAGS += -no-undefined | |
484 | ||
485 | bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx | |
486 | bindings_cxx_libsigrokcxx_la_include_HEADERS = \ | |
487 | bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \ | |
488 | bindings/cxx/include/libsigrokcxx/enums.hpp | |
489 | ||
490 | pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc | |
491 | ||
492 | doxy/xml/index.xml: include/libsigrok/libsigrok.h | |
493 | $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null | |
494 | ||
495 | bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp | |
496 | ||
497 | bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp | |
498 | ||
499 | bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \ | |
500 | bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp | |
501 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml | |
502 | $(AM_V_at)touch $@ | |
503 | ||
504 | bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \ | |
505 | $(library_include_HEADERS) | |
506 | ||
507 | cxx-clean: | |
508 | rm -rf doxy/ | |
509 | rm -rf bindings/cxx/doxy/ | |
510 | rm -f bindings/cxx/enums.cpp | |
511 | rm -f bindings/cxx/include/libsigrokcxx/enums.hpp | |
512 | rm -f bindings/cxx/enums.timestamp | |
513 | ||
514 | CLEAN_EXTRA += cxx-clean | |
515 | ||
516 | endif | |
517 | ||
518 | CPPXMLDOC = bindings/cxx/doxy/xml/index.xml | |
519 | ||
520 | $(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \ | |
521 | bindings/cxx/enums.timestamp | |
522 | $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null | |
523 | ||
524 | if BINDINGS_PYTHON | |
525 | ||
526 | PDIR = bindings/python | |
527 | PDOC = bindings/python/sigrok/core/doc.i | |
528 | ||
529 | $(PDOC): bindings/swig/doc.py $(CPPXMLDOC) | |
530 | $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core | |
531 | $(AM_V_GEN)$(PYTHON) $< python $(CPPXMLDOC) > $@ | |
532 | ||
533 | python-build: $(PDIR)/timestamp | |
534 | ||
535 | python-quietclean: | |
536 | $(AM_V_at)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet clean --all 3>&1 1>&2 2>&3 \ | |
537 | | grep -v "can.t clean it"; true | |
538 | ||
539 | $(PDIR)/timestamp: bindings/cxx/libsigrokcxx.la $(PDIR)/sigrok/core/classes.i \ | |
540 | bindings/swig/classes.i $(PDOC) $(library_include_HEADERS) | |
541 | $(AM_V_at)$(MAKE) python-quietclean | |
542 | $(AM_V_GEN)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet build 3>&1 1>&2 2>&3 \ | |
543 | | grep -v "command line option.*Wstrict-prototypes"; true | |
544 | $(AM_V_at)touch $(PDIR)/timestamp | |
545 | ||
546 | $(DESTDIR)$(prefix): | |
547 | $(MKDIR_P) $@ | |
548 | ||
549 | python-install: $(DESTDIR)$(prefix) | |
550 | cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet install --prefix $(prefix) `test "$(DESTDIR)" && echo --root=$(DESTDIR)` | |
551 | ||
552 | python-clean: | |
553 | $(AM_V_at)$(MAKE) python-quietclean | |
554 | $(AM_V_at)rm -f $(PDIR)/timestamp | |
555 | $(AM_V_at)rm -rf $(PDIR)/doxy/ | |
556 | ||
557 | python-doc: | |
558 | $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR=$(abs_builddir)/$(PDIR)/ doxygen Doxyfile 2>/dev/null | |
559 | ||
560 | BUILD_EXTRA += python-build | |
561 | INSTALL_EXTRA += python-install | |
562 | CLEAN_EXTRA += python-clean | |
563 | ||
564 | endif | |
565 | ||
566 | if BINDINGS_JAVA | |
567 | ||
568 | JDIR = bindings/java | |
569 | JPKG = org/sigrok/core | |
570 | JCLS = $(JDIR)/$(JPKG)/classes | |
571 | JINT = $(JDIR)/$(JPKG)/interfaces | |
572 | JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java | |
573 | JSWG = $(JCLS)/classes.i | |
574 | JDOC = $(JCLS)/doc.i | |
575 | JCXX = $(JCLS)/classes_wrap.cxx | |
576 | JLIB = $(JDIR)/libsigrok_java_core_classes.so | |
577 | JJAR = $(JDIR)/sigrok-core.jar | |
578 | ||
579 | java-build: $(JJAR) $(JLIB) | |
580 | ||
581 | $(JDOC): bindings/swig/doc.py $(CPPXMLDOC) | |
582 | $(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS) | |
583 | $(AM_V_GEN)python $< java $(CPPXMLDOC) > $@ | |
584 | ||
585 | $(JCXX): $(JSWG) $(JDOC) bindings/swig/classes.i $(library_include_HEADERS) | |
586 | $(AM_V_at)make java-clean | |
587 | $(AM_V_GEN)swig -c++ -java -package org.sigrok.core.classes \ | |
588 | -I$(srcdir)/include -I$(srcdir)/bindings/cxx/include -I$(srcdir) -I$(JCLS) -Ibindings/cxx/include -outdir $(JCLS) -o $@ $< | |
589 | ||
590 | $(JJAR): $(JCXX) | |
591 | $(AM_V_GEN)$(JAVAC) -sourcepath $(JDIR) -d $(JDIR) $(JSRC) | |
592 | $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG) | |
593 | ||
594 | $(JLIB): $(JCXX) bindings/cxx/libsigrokcxx.la $(library_include_HEADERS) | |
595 | $(AM_V_GEN)$(CXXCOMPILE) -L.libs -Lbindings/cxx/.libs \ | |
596 | -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \ | |
597 | -lsigrokcxx -o $(JLIB) | |
598 | ||
599 | java-install: | |
600 | $(INSTALL) -d $(DESTDIR)$(libdir)/jni | |
601 | $(INSTALL) $(JLIB) -t $(DESTDIR)$(libdir)/jni | |
602 | $(INSTALL) -d $(DESTDIR)$(datadir)/java | |
603 | $(INSTALL) $(JJAR) -t $(DESTDIR)$(datadir)/java | |
604 | ||
605 | java-clean: | |
606 | $(AM_V_at)rm -f $(JCXX) | |
607 | $(AM_V_at)rm -f $(JCLS)/*.java | |
608 | $(AM_V_at)rm -f $(JCLS)/*.class | |
609 | $(AM_V_at)rm -f $(JINT)/*.class | |
610 | $(AM_V_at)rm -f $(JJAR) | |
611 | $(AM_V_at)rm -f $(JLIB) | |
612 | $(AM_V_at)rm -rf $(JDIR)/doxy/ | |
613 | ||
614 | java-doc: | |
615 | $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR=$(abs_builddir)/$(JDIR)/ doxygen Doxyfile 2>/dev/null | |
616 | ||
617 | BUILD_EXTRA += java-build | |
618 | INSTALL_EXTRA += java-install | |
619 | CLEAN_EXTRA += java-clean | |
620 | ||
621 | endif | |
622 | ||
623 | all-local: $(BUILD_EXTRA) | |
624 | install-exec-local: $(INSTALL_EXTRA) | |
625 | clean-local: $(CLEAN_EXTRA) | |
626 | ||
627 | MAINTAINERCLEANFILES = ChangeLog | |
628 | ||
629 | .PHONY: ChangeLog | |
630 | ChangeLog: | |
631 | git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog | |
632 | ||
633 | dist-hook: ChangeLog | |
634 |