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