]> sigrok.org Git - libsigrok.git/blame - Makefile.am
baylibre-acme: Add support for probe factor setting.
[libsigrok.git] / Makefile.am
CommitLineData
62c82025 1##
50985c20 2## This file is part of the libsigrok project.
62c82025 3##
c73d2ea4 4## Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com>
d375b3c3 5## Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com>
62c82025 6##
a1bb33af
UH
7## This program is free software: you can redistribute it and/or modify
8## it under the terms of the GNU General Public License as published by
9## the Free Software Foundation, either version 3 of the License, or
10## (at your option) any later version.
62c82025 11##
a1bb33af
UH
12## This program is distributed in the hope that it will be useful,
13## but WITHOUT ANY WARRANTY; without even the implied warranty of
14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15## GNU General Public License for more details.
62c82025 16##
a1bb33af
UH
17## You should have received a copy of the GNU General Public License
18## along with this program. If not, see <http://www.gnu.org/licenses/>.
62c82025 19##
a1bb33af 20
d8521c93 21ACLOCAL_AMFLAGS = -I autostuff
826938d8 22
55e55a3f 23AM_CPPFLAGS = -I$(srcdir)/src -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
340f6e7a 24
8a7b47cd 25lib_LTLIBRARIES = libsigrok.la
a1bb33af 26
67bd8055 27# Backend files
a695d6c0 28libsigrok_la_SOURCES = \
155b680d
BV
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 \
fb019a0e 38 src/analog.c \
24287ea9 39 src/fallback.c \
155b680d
BV
40 src/strutil.c \
41 src/log.c \
42 src/version.c \
43 src/error.c \
44 src/std.c
960a75e4 45
155b680d
BV
46# Input modules
47libsigrok_la_SOURCES += \
155b680d 48 src/input/input.c \
b84cba4d 49 src/input/binary.c \
02e24c0c 50 src/input/chronovu_la8.c \
41d214f6 51 src/input/csv.c \
7db06394 52 src/input/vcd.c \
155b680d 53 src/input/wav.c
67bd8055 54
155b680d
BV
55# Output modules
56libsigrok_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 \
afaa75b9 64 src/output/wav.c \
155b680d
BV
65 src/output/gnuplot.c \
66 src/output/hex.c \
67 src/output/ols.c \
3250d8c7 68 src/output/srzip.c \
155b680d 69 src/output/vcd.c
67bd8055 70
988357ca
UH
71# Transform modules
72libsigrok_la_SOURCES += \
39f1752e 73 src/transform/transform.c \
43caa466 74 src/transform/nop.c \
d74d30bb
UH
75 src/transform/scale.c \
76 src/transform/invert.c
988357ca 77
155b680d 78# SCPI support
67bd8055 79libsigrok_la_SOURCES += \
155b680d
BV
80 src/scpi/scpi.c \
81 src/scpi/scpi_tcp.c
67bd8055
UH
82if NEED_RPC
83libsigrok_la_SOURCES += \
155b680d
BV
84 src/scpi/scpi_vxi.c \
85 src/scpi/vxi_clnt.c \
86 src/scpi/vxi_xdr.c \
87 src/scpi/vxi.h
67bd8055
UH
88endif
89if NEED_SERIAL
90libsigrok_la_SOURCES += \
155b680d
BV
91 src/serial.c \
92 src/scpi/scpi_serial.c
67bd8055
UH
93endif
94if NEED_USB
95libsigrok_la_SOURCES += \
155b680d
BV
96 src/ezusb.c \
97 src/usb.c \
98 src/scpi/scpi_usbtmc_libusb.c
67bd8055
UH
99endif
100if NEED_VISA
101libsigrok_la_SOURCES += \
155b680d 102 src/scpi/scpi_visa.c
67bd8055 103endif
bb2a4ed4
ML
104if NEED_GPIB
105libsigrok_la_SOURCES += \
7343ad1e 106 src/scpi/scpi_libgpib.c
bb2a4ed4 107endif
67bd8055 108
155b680d
BV
109# Hardware (DMM chip parsers)
110libsigrok_la_SOURCES += \
111 src/dmm/es519xx.c \
112 src/dmm/fs9721.c \
113 src/dmm/fs9922.c \
114 src/dmm/m2110.c \
115 src/dmm/metex14.c \
a24c3f4a 116 src/dmm/rs9lcd.c \
626027df
UH
117 src/dmm/bm25x.c \
118 src/dmm/ut71x.c
67bd8055 119
6bcb3ee8 120# Hardware (LCR chip parsers)
d378f100 121if NEED_SERIAL
6bcb3ee8
JH
122libsigrok_la_SOURCES += \
123 src/lcr/es51919.c
d378f100 124endif
6bcb3ee8 125
67bd8055
UH
126# Hardware drivers
127if HW_AGILENT_DMM
128libsigrok_la_SOURCES += \
155b680d
BV
129 src/hardware/agilent-dmm/api.c \
130 src/hardware/agilent-dmm/agilent-dmm.h \
131 src/hardware/agilent-dmm/sched.c
67bd8055 132endif
67bd8055
UH
133if HW_APPA_55II
134libsigrok_la_SOURCES += \
155b680d
BV
135 src/hardware/appa-55ii/protocol.h \
136 src/hardware/appa-55ii/protocol.c \
137 src/hardware/appa-55ii/api.c
67bd8055
UH
138endif
139if HW_ASIX_SIGMA
140libsigrok_la_SOURCES += \
155b680d
BV
141 src/hardware/asix-sigma/asix-sigma.h \
142 src/hardware/asix-sigma/asix-sigma.c
67bd8055
UH
143endif
144if HW_ATTEN_PPS3XXX
145libsigrok_la_SOURCES += \
155b680d
BV
146 src/hardware/atten-pps3xxx/protocol.h \
147 src/hardware/atten-pps3xxx/protocol.c \
148 src/hardware/atten-pps3xxx/api.c
67bd8055 149endif
dfaee1de
BG
150if HW_BAYLIBRE_ACME
151libsigrok_la_SOURCES += \
152 src/hardware/baylibre-acme/protocol.h \
153 src/hardware/baylibre-acme/protocol.c \
154 src/hardware/baylibre-acme/api.c
155endif
bb993797
KA
156if HW_BEAGLELOGIC
157libsigrok_la_SOURCES += \
3db4b08b 158 src/hardware/beaglelogic/beaglelogic.h \
155b680d
BV
159 src/hardware/beaglelogic/protocol.h \
160 src/hardware/beaglelogic/protocol.c \
161 src/hardware/beaglelogic/api.c
bb993797 162endif
67bd8055
UH
163if HW_BRYMEN_BM86X
164libsigrok_la_SOURCES += \
155b680d
BV
165 src/hardware/brymen-bm86x/protocol.h \
166 src/hardware/brymen-bm86x/protocol.c \
167 src/hardware/brymen-bm86x/api.c
67bd8055
UH
168endif
169if HW_BRYMEN_DMM
170libsigrok_la_SOURCES += \
155b680d
BV
171 src/hardware/brymen-dmm/parser.c \
172 src/hardware/brymen-dmm/protocol.h \
173 src/hardware/brymen-dmm/protocol.c \
174 src/hardware/brymen-dmm/api.c
67bd8055
UH
175endif
176if HW_CEM_DT_885X
177libsigrok_la_SOURCES += \
155b680d
BV
178 src/hardware/cem-dt-885x/protocol.h \
179 src/hardware/cem-dt-885x/protocol.c \
180 src/hardware/cem-dt-885x/api.c
67bd8055
UH
181endif
182if HW_CENTER_3XX
183libsigrok_la_SOURCES += \
155b680d
BV
184 src/hardware/center-3xx/protocol.h \
185 src/hardware/center-3xx/protocol.c \
186 src/hardware/center-3xx/api.c
67bd8055 187endif
7b356712 188if HW_CHRONOVU_LA
67bd8055 189libsigrok_la_SOURCES += \
155b680d
BV
190 src/hardware/chronovu-la/protocol.h \
191 src/hardware/chronovu-la/protocol.c \
192 src/hardware/chronovu-la/api.c
67bd8055
UH
193endif
194if HW_COLEAD_SLM
195libsigrok_la_SOURCES += \
155b680d
BV
196 src/hardware/colead-slm/protocol.h \
197 src/hardware/colead-slm/protocol.c \
198 src/hardware/colead-slm/api.c
67bd8055
UH
199endif
200if HW_CONRAD_DIGI_35_CPU
201libsigrok_la_SOURCES += \
155b680d
BV
202 src/hardware/conrad-digi-35-cpu/protocol.h \
203 src/hardware/conrad-digi-35-cpu/protocol.c \
204 src/hardware/conrad-digi-35-cpu/api.c
67bd8055
UH
205endif
206if HW_DEMO
207libsigrok_la_SOURCES += \
155b680d 208 src/hardware/demo/demo.c
67bd8055 209endif
b5089195
JH
210if HW_DEREE_DE5000
211libsigrok_la_SOURCES += \
212 src/hardware/deree-de5000/api.c
213endif
67bd8055
UH
214if HW_FLUKE_DMM
215libsigrok_la_SOURCES += \
155b680d
BV
216 src/hardware/fluke-dmm/fluke-dmm.h \
217 src/hardware/fluke-dmm/fluke.c \
218 src/hardware/fluke-dmm/api.c
67bd8055
UH
219endif
220if HW_FX2LAFW
221libsigrok_la_SOURCES += \
155b680d
BV
222 src/hardware/fx2lafw/protocol.h \
223 src/hardware/fx2lafw/protocol.c \
224 src/hardware/fx2lafw/api.c
67bd8055
UH
225endif
226if HW_GMC_MH_1X_2X
227libsigrok_la_SOURCES += \
155b680d
BV
228 src/hardware/gmc-mh-1x-2x/protocol.h \
229 src/hardware/gmc-mh-1x-2x/protocol.c \
230 src/hardware/gmc-mh-1x-2x/api.c
67bd8055
UH
231endif
232if HW_HAMEG_HMO
233libsigrok_la_SOURCES += \
155b680d
BV
234 src/hardware/hameg-hmo/protocol.h \
235 src/hardware/hameg-hmo/protocol.c \
236 src/hardware/hameg-hmo/api.c
67bd8055
UH
237endif
238if HW_HANTEK_DSO
239libsigrok_la_SOURCES += \
155b680d
BV
240 src/hardware/hantek-dso/dso.h \
241 src/hardware/hantek-dso/dso.c \
242 src/hardware/hantek-dso/api.c
67bd8055
UH
243endif
244if HW_IKALOGIC_SCANALOGIC2
245libsigrok_la_SOURCES += \
155b680d
BV
246 src/hardware/ikalogic-scanalogic2/protocol.h \
247 src/hardware/ikalogic-scanalogic2/protocol.c \
248 src/hardware/ikalogic-scanalogic2/api.c
67bd8055
UH
249endif
250if HW_IKALOGIC_SCANAPLUS
251libsigrok_la_SOURCES += \
155b680d
BV
252 src/hardware/ikalogic-scanaplus/protocol.h \
253 src/hardware/ikalogic-scanaplus/protocol.c \
254 src/hardware/ikalogic-scanaplus/api.c
67bd8055
UH
255endif
256if HW_KECHENG_KC_330B
257libsigrok_la_SOURCES += \
155b680d
BV
258 src/hardware/kecheng-kc-330b/protocol.h \
259 src/hardware/kecheng-kc-330b/protocol.c \
260 src/hardware/kecheng-kc-330b/api.c
67bd8055
UH
261endif
262if HW_LASCAR_EL_USB
263libsigrok_la_SOURCES += \
155b680d
BV
264 src/hardware/lascar-el-usb/protocol.h \
265 src/hardware/lascar-el-usb/protocol.c \
266 src/hardware/lascar-el-usb/api.c
67bd8055 267endif
8f4e922f
UH
268if HW_MANSON_HCS_3XXX
269libsigrok_la_SOURCES += \
155b680d
BV
270 src/hardware/manson-hcs-3xxx/protocol.h \
271 src/hardware/manson-hcs-3xxx/protocol.c \
272 src/hardware/manson-hcs-3xxx/api.c
8f4e922f 273endif
67bd8055
UH
274if HW_MIC_985XX
275libsigrok_la_SOURCES += \
155b680d
BV
276 src/hardware/mic-985xx/protocol.h \
277 src/hardware/mic-985xx/protocol.c \
278 src/hardware/mic-985xx/api.c
67bd8055 279endif
41b7bd01
MH
280if HW_MOTECH_LPS_30X
281libsigrok_la_SOURCES += \
155b680d
BV
282 src/hardware/motech-lps-30x/protocol.h \
283 src/hardware/motech-lps-30x/protocol.c \
284 src/hardware/motech-lps-30x/api.c
41b7bd01 285endif
67bd8055
UH
286if HW_NORMA_DMM
287libsigrok_la_SOURCES += \
155b680d
BV
288 src/hardware/norma-dmm/protocol.h \
289 src/hardware/norma-dmm/protocol.c \
290 src/hardware/norma-dmm/api.c
67bd8055 291endif
d4b38748 292if HW_OPENBENCH_LOGIC_SNIFFER
67bd8055 293libsigrok_la_SOURCES += \
155b680d
BV
294 src/hardware/openbench-logic-sniffer/protocol.h \
295 src/hardware/openbench-logic-sniffer/protocol.c \
296 src/hardware/openbench-logic-sniffer/api.c
67bd8055 297endif
4bd80e12 298if HW_PIPISTRELLO_OLS
299libsigrok_la_SOURCES += \
300 src/hardware/pipistrello-ols/protocol.h \
301 src/hardware/pipistrello-ols/protocol.c \
302 src/hardware/pipistrello-ols/api.c
303endif
67bd8055
UH
304if HW_RIGOL_DS
305libsigrok_la_SOURCES += \
155b680d
BV
306 src/hardware/rigol-ds/protocol.h \
307 src/hardware/rigol-ds/protocol.c \
308 src/hardware/rigol-ds/api.c
67bd8055
UH
309endif
310if HW_SALEAE_LOGIC16
311libsigrok_la_SOURCES += \
155b680d
BV
312 src/hardware/saleae-logic16/protocol.h \
313 src/hardware/saleae-logic16/protocol.c \
314 src/hardware/saleae-logic16/api.c
67bd8055 315endif
ca1a7cb5
BV
316if HW_SCPI_PPS
317libsigrok_la_SOURCES += \
318 src/hardware/scpi-pps/protocol.h \
319 src/hardware/scpi-pps/protocol.c \
d4eabea8 320 src/hardware/scpi-pps/profiles.c \
ca1a7cb5
BV
321 src/hardware/scpi-pps/api.c
322endif
67bd8055
UH
323if HW_SERIAL_DMM
324libsigrok_la_SOURCES += \
155b680d
BV
325 src/hardware/serial-dmm/protocol.h \
326 src/hardware/serial-dmm/protocol.c \
327 src/hardware/serial-dmm/api.c
67bd8055
UH
328endif
329if HW_SYSCLK_LWLA
330libsigrok_la_SOURCES += \
155b680d
BV
331 src/hardware/sysclk-lwla/lwla.h \
332 src/hardware/sysclk-lwla/lwla.c \
333 src/hardware/sysclk-lwla/protocol.h \
334 src/hardware/sysclk-lwla/protocol.c \
335 src/hardware/sysclk-lwla/api.c
67bd8055
UH
336endif
337if HW_TELEINFO
338libsigrok_la_SOURCES += \
155b680d
BV
339 src/hardware/teleinfo/protocol.h \
340 src/hardware/teleinfo/protocol.c \
341 src/hardware/teleinfo/api.c
67bd8055 342endif
0acdd793
BV
343if HW_TESTO
344libsigrok_la_SOURCES += \
155b680d
BV
345 src/hardware/testo/protocol.h \
346 src/hardware/testo/protocol.c \
347 src/hardware/testo/api.c
0acdd793 348endif
67bd8055
UH
349if HW_TONDAJ_SL_814
350libsigrok_la_SOURCES += \
155b680d
BV
351 src/hardware/tondaj-sl-814/protocol.h \
352 src/hardware/tondaj-sl-814/protocol.c \
353 src/hardware/tondaj-sl-814/api.c
67bd8055
UH
354endif
355if HW_UNI_T_DMM
356libsigrok_la_SOURCES += \
155b680d
BV
357 src/hardware/uni-t-dmm/protocol.h \
358 src/hardware/uni-t-dmm/protocol.c \
359 src/hardware/uni-t-dmm/api.c
67bd8055
UH
360endif
361if HW_UNI_T_UT32X
362libsigrok_la_SOURCES += \
155b680d
BV
363 src/hardware/uni-t-ut32x/protocol.h \
364 src/hardware/uni-t-ut32x/protocol.c \
365 src/hardware/uni-t-ut32x/api.c
67bd8055
UH
366endif
367if HW_VICTOR_DMM
368libsigrok_la_SOURCES += \
155b680d
BV
369 src/hardware/victor-dmm/protocol.h \
370 src/hardware/victor-dmm/protocol.c \
371 src/hardware/victor-dmm/api.c
67bd8055 372endif
10763937
SA
373if HW_YOKOGAWA_DLM
374libsigrok_la_SOURCES += \
375 src/hardware/yokogawa-dlm/protocol.h \
376 src/hardware/yokogawa-dlm/protocol.c \
377 src/hardware/yokogawa-dlm/protocol_wrappers.h \
378 src/hardware/yokogawa-dlm/protocol_wrappers.c \
379 src/hardware/yokogawa-dlm/api.c
380endif
67bd8055
UH
381if HW_ZEROPLUS_LOGIC_CUBE
382libsigrok_la_SOURCES += \
155b680d
BV
383 src/hardware/zeroplus-logic-cube/analyzer.c \
384 src/hardware/zeroplus-logic-cube/analyzer.h \
385 src/hardware/zeroplus-logic-cube/gl_usb.h \
386 src/hardware/zeroplus-logic-cube/gl_usb.c \
387 src/hardware/zeroplus-logic-cube/protocol.h \
388 src/hardware/zeroplus-logic-cube/protocol.c \
389 src/hardware/zeroplus-logic-cube/api.c
67bd8055
UH
390endif
391
392libsigrok_la_LIBADD = $(LIBOBJS)
a1bb33af 393
6dddd902 394libsigrok_la_LDFLAGS = $(SR_LIB_LDFLAGS)
eeebceea 395
45c59c8b 396library_includedir = $(includedir)/libsigrok
63d0fb75
ML
397library_include_HEADERS = \
398 include/libsigrok/libsigrok.h \
399 include/libsigrok/proto.h \
400 include/libsigrok/version.h
155b680d 401noinst_HEADERS = src/libsigrok-internal.h
a1bb33af 402
8a7b47cd
UH
403pkgconfigdir = $(libdir)/pkgconfig
404pkgconfig_DATA = libsigrok.pc
d658e348 405
67bd8055
UH
406EXTRA_DIST = \
407 Doxyfile \
408 HACKING \
409 README.devices \
410 contrib/gnuplot_chronovu_la8.gpi \
411 contrib/gnuplot_rigol_ds1xx2.gpi \
412 contrib/gnuplot_usbeesx.gpi \
413 contrib/gnuplot_usbeedx8.gpi \
414 contrib/gnuplot_usbeedx16.gpi \
415 contrib/sigrok-logo-notext.png \
416 contrib/z60_libsigrok.rules
417
418if HAVE_CHECK
419
420TESTS = tests/check_main
421
422check_PROGRAMS = ${TESTS}
423
424tests_check_main_SOURCES = \
6592c369 425 include/libsigrok/libsigrok.h \
67bd8055
UH
426 tests/lib.c \
427 tests/lib.h \
428 tests/check_main.c \
429 tests/check_core.c \
430 tests/check_input_all.c \
431 tests/check_input_binary.c \
432 tests/check_output_all.c \
8677e4e7 433 tests/check_transform_all.c \
41723529 434 tests/check_session.c \
67bd8055
UH
435 tests/check_strutil.c \
436 tests/check_version.c \
6b1adfaa 437 tests/check_driver_all.c \
c8412d6c
UH
438 tests/check_device.c \
439 tests/check_trigger.c
67bd8055
UH
440
441tests_check_main_CFLAGS = @check_CFLAGS@
442
443tests_check_main_LDADD = $(top_builddir)/libsigrok.la @check_LIBS@
444
445endif
dd8b5f56 446
580ed400
ML
447BUILD_EXTRA =
448INSTALL_EXTRA =
449CLEAN_EXTRA =
450
c23c8659
ML
451if BINDINGS_CXX
452
52ff4f6a 453lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la
c23c8659 454
52ff4f6a 455bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp
c23c8659 456
52ff4f6a 457bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(glibmm_LIBS)
c23c8659 458
52ff4f6a 459bindings_cxx_libsigrokcxx_la_LDFLAGS = $(SR_LIB_LDFLAGS)
c23c8659 460
0959ed3d
UH
461bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx
462bindings_cxx_libsigrokcxx_la_include_HEADERS = \
161dc24d
UH
463 bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \
464 bindings/cxx/include/libsigrokcxx/enums.hpp
c23c8659 465
52ff4f6a 466pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc
c23c8659 467
3532ed01 468doxy/xml/index.xml: include/libsigrok/libsigrok.h
7f82ec4d 469 $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null
580ed400
ML
470
471bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp
472
161dc24d 473bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp
c23c8659 474
b595a458 475bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \
c23c8659 476 bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp
b595a458 477 $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml
f2a189f0 478 $(AM_V_at)touch $@
c23c8659 479
580ed400
ML
480bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \
481 $(library_include_HEADERS)
c23c8659 482
580ed400 483cxx-clean:
3532ed01 484 rm -rf doxy/
bd4fda24 485 rm -rf bindings/cxx/doxy/
580ed400 486 rm -f bindings/cxx/enums.cpp
161dc24d 487 rm -f bindings/cxx/include/libsigrokcxx/enums.hpp
580ed400 488 rm -f bindings/cxx/enums.timestamp
c23c8659 489
580ed400
ML
490CLEAN_EXTRA += cxx-clean
491
492endif
f7740954 493
bd4fda24
ML
494CPPXMLDOC = bindings/cxx/doxy/xml/index.xml
495
161dc24d 496$(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \
bd4fda24 497 bindings/cxx/enums.timestamp
33c84e81 498 $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null
bd4fda24 499
f7740954
ML
500if BINDINGS_PYTHON
501
d1785122 502PDIR = bindings/python
bd4fda24
ML
503PDOC = bindings/python/sigrok/core/doc.i
504
505$(PDOC): bindings/swig/doc.py $(CPPXMLDOC)
f3256bb7 506 $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core
da89e23a 507 $(AM_V_GEN)$(PYTHON) $< python $(CPPXMLDOC) > $@
d1785122
ML
508
509python-build: $(PDIR)/timestamp
510
c26162ff 511python-quietclean:
da89e23a 512 $(AM_V_at)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet clean --all 3>&1 1>&2 2>&3 \
c26162ff 513 | grep -v "can.t clean it"; true
8eb10b62 514
52ff4f6a 515$(PDIR)/timestamp: bindings/cxx/libsigrokcxx.la $(PDIR)/sigrok/core/classes.i \
bd4fda24 516 bindings/swig/classes.i $(PDOC) $(library_include_HEADERS)
c26162ff 517 $(AM_V_at)$(MAKE) python-quietclean
da89e23a 518 $(AM_V_GEN)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet build 3>&1 1>&2 2>&3 \
c26162ff 519 | grep -v "command line option.*Wstrict-prototypes"; true
f2a189f0 520 $(AM_V_at)touch $(PDIR)/timestamp
f7740954 521
6ae53625
JP
522$(DESTDIR)$(prefix):
523 $(MKDIR_P) $@
524
525python-install: $(DESTDIR)$(prefix)
526 cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet install --prefix $(prefix) `test "$(DESTDIR)" && echo --root=$(DESTDIR)`
f7740954 527
c26162ff
BV
528python-clean:
529 $(AM_V_at)$(MAKE) python-quietclean
f2a189f0 530 $(AM_V_at)rm -f $(PDIR)/timestamp
6a8c1d68
ML
531 $(AM_V_at)rm -rf $(PDIR)/doxy/
532
533python-doc:
0e1a7fe9 534 $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR=$(abs_builddir)/$(PDIR)/ doxygen Doxyfile 2>/dev/null
f7740954
ML
535
536BUILD_EXTRA += python-build
537INSTALL_EXTRA += python-install
538CLEAN_EXTRA += python-clean
539
540endif
541
9fcf4d0b
ML
542if BINDINGS_JAVA
543
544JDIR = bindings/java
90bd7656
ML
545JPKG = org/sigrok/core
546JCLS = $(JDIR)/$(JPKG)/classes
547JINT = $(JDIR)/$(JPKG)/interfaces
33c84e81 548JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java
90bd7656 549JSWG = $(JCLS)/classes.i
bd4fda24 550JDOC = $(JCLS)/doc.i
90bd7656 551JCXX = $(JCLS)/classes_wrap.cxx
9fcf4d0b
ML
552JLIB = $(JDIR)/libsigrok_java_core_classes.so
553JJAR = $(JDIR)/sigrok-core.jar
554
555java-build: $(JJAR) $(JLIB)
556
bd4fda24 557$(JDOC): bindings/swig/doc.py $(CPPXMLDOC)
f3256bb7 558 $(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS)
33c84e81 559 $(AM_V_GEN)python $< java $(CPPXMLDOC) > $@
bd4fda24
ML
560
561$(JCXX): $(JSWG) $(JDOC) bindings/swig/classes.i $(library_include_HEADERS)
f1830b22 562 $(AM_V_at)make java-clean
f2a189f0 563 $(AM_V_GEN)swig -c++ -java -package org.sigrok.core.classes \
33c84e81 564 -I$(srcdir)/include -I$(srcdir)/bindings/cxx/include -I$(srcdir) -I$(JCLS) -Ibindings/cxx/include -outdir $(JCLS) -o $@ $<
9fcf4d0b 565
90bd7656 566$(JJAR): $(JCXX)
33c84e81 567 $(AM_V_GEN)$(JAVAC) -sourcepath $(JDIR) -d $(JDIR) $(JSRC)
f2a189f0 568 $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG)
9fcf4d0b 569
52ff4f6a 570$(JLIB): $(JCXX) bindings/cxx/libsigrokcxx.la $(library_include_HEADERS)
d1a5f737 571 $(AM_V_GEN)$(CXXCOMPILE) -L.libs -Lbindings/cxx/.libs \
90bd7656 572 -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \
52ff4f6a 573 -lsigrokcxx -o $(JLIB)
9fcf4d0b
ML
574
575java-install:
576 $(INSTALL) -d $(libdir)/jni
577 $(INSTALL) $(JLIB) -t $(libdir)/jni
578 $(INSTALL) -d $(datadir)/java
579 $(INSTALL) $(JJAR) -t $(datadir)/java
580
581java-clean:
2fe07d3f
BV
582 $(AM_V_at)rm -f $(JCXX)
583 $(AM_V_at)rm -f $(JCLS)/*.java
584 $(AM_V_at)rm -f $(JCLS)/*.class
585 $(AM_V_at)rm -f $(JINT)/*.class
586 $(AM_V_at)rm -f $(JJAR)
587 $(AM_V_at)rm -f $(JLIB)
588 $(AM_V_at)rm -rf $(JDIR)/doxy/
8a314e90
ML
589
590java-doc:
33c84e81 591 $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR=$(abs_builddir)/$(JDIR)/ doxygen Doxyfile 2>/dev/null
9fcf4d0b
ML
592
593BUILD_EXTRA += java-build
594INSTALL_EXTRA += java-install
595CLEAN_EXTRA += java-clean
596
597endif
598
f7740954
ML
599all-local: $(BUILD_EXTRA)
600install-exec-local: $(INSTALL_EXTRA)
d1785122 601clean-local: $(CLEAN_EXTRA)
f7740954 602
c0958408 603MAINTAINERCLEANFILES = ChangeLog
0fc12d66
UH
604
605.PHONY: ChangeLog
606ChangeLog:
bd58d8f3 607 git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog
0fc12d66
UH
608
609dist-hook: ChangeLog
610