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