]> sigrok.org Git - libsigrok.git/blame - Makefile.am
unit tests: Drop unneeded check_ filename prefix.
[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 \
289eebd7
BG
154 src/hardware/baylibre-acme/api.c \
155 src/hardware/baylibre-acme/gpio.h \
156 src/hardware/baylibre-acme/gpio.c
dfaee1de 157endif
bb993797
KA
158if HW_BEAGLELOGIC
159libsigrok_la_SOURCES += \
3db4b08b 160 src/hardware/beaglelogic/beaglelogic.h \
155b680d
BV
161 src/hardware/beaglelogic/protocol.h \
162 src/hardware/beaglelogic/protocol.c \
163 src/hardware/beaglelogic/api.c
bb993797 164endif
67bd8055
UH
165if HW_BRYMEN_BM86X
166libsigrok_la_SOURCES += \
155b680d
BV
167 src/hardware/brymen-bm86x/protocol.h \
168 src/hardware/brymen-bm86x/protocol.c \
169 src/hardware/brymen-bm86x/api.c
67bd8055
UH
170endif
171if HW_BRYMEN_DMM
172libsigrok_la_SOURCES += \
155b680d
BV
173 src/hardware/brymen-dmm/parser.c \
174 src/hardware/brymen-dmm/protocol.h \
175 src/hardware/brymen-dmm/protocol.c \
176 src/hardware/brymen-dmm/api.c
67bd8055
UH
177endif
178if HW_CEM_DT_885X
179libsigrok_la_SOURCES += \
155b680d
BV
180 src/hardware/cem-dt-885x/protocol.h \
181 src/hardware/cem-dt-885x/protocol.c \
182 src/hardware/cem-dt-885x/api.c
67bd8055
UH
183endif
184if HW_CENTER_3XX
185libsigrok_la_SOURCES += \
155b680d
BV
186 src/hardware/center-3xx/protocol.h \
187 src/hardware/center-3xx/protocol.c \
188 src/hardware/center-3xx/api.c
67bd8055 189endif
7b356712 190if HW_CHRONOVU_LA
67bd8055 191libsigrok_la_SOURCES += \
155b680d
BV
192 src/hardware/chronovu-la/protocol.h \
193 src/hardware/chronovu-la/protocol.c \
194 src/hardware/chronovu-la/api.c
67bd8055
UH
195endif
196if HW_COLEAD_SLM
197libsigrok_la_SOURCES += \
155b680d
BV
198 src/hardware/colead-slm/protocol.h \
199 src/hardware/colead-slm/protocol.c \
200 src/hardware/colead-slm/api.c
67bd8055
UH
201endif
202if HW_CONRAD_DIGI_35_CPU
203libsigrok_la_SOURCES += \
155b680d
BV
204 src/hardware/conrad-digi-35-cpu/protocol.h \
205 src/hardware/conrad-digi-35-cpu/protocol.c \
206 src/hardware/conrad-digi-35-cpu/api.c
67bd8055
UH
207endif
208if HW_DEMO
209libsigrok_la_SOURCES += \
155b680d 210 src/hardware/demo/demo.c
67bd8055 211endif
b5089195
JH
212if HW_DEREE_DE5000
213libsigrok_la_SOURCES += \
214 src/hardware/deree-de5000/api.c
215endif
67bd8055
UH
216if HW_FLUKE_DMM
217libsigrok_la_SOURCES += \
155b680d
BV
218 src/hardware/fluke-dmm/fluke-dmm.h \
219 src/hardware/fluke-dmm/fluke.c \
220 src/hardware/fluke-dmm/api.c
67bd8055
UH
221endif
222if HW_FX2LAFW
223libsigrok_la_SOURCES += \
155b680d
BV
224 src/hardware/fx2lafw/protocol.h \
225 src/hardware/fx2lafw/protocol.c \
226 src/hardware/fx2lafw/api.c
67bd8055
UH
227endif
228if HW_GMC_MH_1X_2X
229libsigrok_la_SOURCES += \
155b680d
BV
230 src/hardware/gmc-mh-1x-2x/protocol.h \
231 src/hardware/gmc-mh-1x-2x/protocol.c \
232 src/hardware/gmc-mh-1x-2x/api.c
67bd8055
UH
233endif
234if HW_HAMEG_HMO
235libsigrok_la_SOURCES += \
155b680d
BV
236 src/hardware/hameg-hmo/protocol.h \
237 src/hardware/hameg-hmo/protocol.c \
238 src/hardware/hameg-hmo/api.c
67bd8055
UH
239endif
240if HW_HANTEK_DSO
241libsigrok_la_SOURCES += \
155b680d
BV
242 src/hardware/hantek-dso/dso.h \
243 src/hardware/hantek-dso/dso.c \
244 src/hardware/hantek-dso/api.c
67bd8055
UH
245endif
246if HW_IKALOGIC_SCANALOGIC2
247libsigrok_la_SOURCES += \
155b680d
BV
248 src/hardware/ikalogic-scanalogic2/protocol.h \
249 src/hardware/ikalogic-scanalogic2/protocol.c \
250 src/hardware/ikalogic-scanalogic2/api.c
67bd8055
UH
251endif
252if HW_IKALOGIC_SCANAPLUS
253libsigrok_la_SOURCES += \
155b680d
BV
254 src/hardware/ikalogic-scanaplus/protocol.h \
255 src/hardware/ikalogic-scanaplus/protocol.c \
256 src/hardware/ikalogic-scanaplus/api.c
67bd8055
UH
257endif
258if HW_KECHENG_KC_330B
259libsigrok_la_SOURCES += \
155b680d
BV
260 src/hardware/kecheng-kc-330b/protocol.h \
261 src/hardware/kecheng-kc-330b/protocol.c \
262 src/hardware/kecheng-kc-330b/api.c
67bd8055
UH
263endif
264if HW_LASCAR_EL_USB
265libsigrok_la_SOURCES += \
155b680d
BV
266 src/hardware/lascar-el-usb/protocol.h \
267 src/hardware/lascar-el-usb/protocol.c \
268 src/hardware/lascar-el-usb/api.c
67bd8055 269endif
8f4e922f
UH
270if HW_MANSON_HCS_3XXX
271libsigrok_la_SOURCES += \
155b680d
BV
272 src/hardware/manson-hcs-3xxx/protocol.h \
273 src/hardware/manson-hcs-3xxx/protocol.c \
274 src/hardware/manson-hcs-3xxx/api.c
8f4e922f 275endif
67bd8055
UH
276if HW_MIC_985XX
277libsigrok_la_SOURCES += \
155b680d
BV
278 src/hardware/mic-985xx/protocol.h \
279 src/hardware/mic-985xx/protocol.c \
280 src/hardware/mic-985xx/api.c
67bd8055 281endif
41b7bd01
MH
282if HW_MOTECH_LPS_30X
283libsigrok_la_SOURCES += \
155b680d
BV
284 src/hardware/motech-lps-30x/protocol.h \
285 src/hardware/motech-lps-30x/protocol.c \
286 src/hardware/motech-lps-30x/api.c
41b7bd01 287endif
67bd8055
UH
288if HW_NORMA_DMM
289libsigrok_la_SOURCES += \
155b680d
BV
290 src/hardware/norma-dmm/protocol.h \
291 src/hardware/norma-dmm/protocol.c \
292 src/hardware/norma-dmm/api.c
67bd8055 293endif
d4b38748 294if HW_OPENBENCH_LOGIC_SNIFFER
67bd8055 295libsigrok_la_SOURCES += \
155b680d
BV
296 src/hardware/openbench-logic-sniffer/protocol.h \
297 src/hardware/openbench-logic-sniffer/protocol.c \
298 src/hardware/openbench-logic-sniffer/api.c
67bd8055 299endif
4bd80e12 300if HW_PIPISTRELLO_OLS
301libsigrok_la_SOURCES += \
302 src/hardware/pipistrello-ols/protocol.h \
303 src/hardware/pipistrello-ols/protocol.c \
304 src/hardware/pipistrello-ols/api.c
305endif
67bd8055
UH
306if HW_RIGOL_DS
307libsigrok_la_SOURCES += \
155b680d
BV
308 src/hardware/rigol-ds/protocol.h \
309 src/hardware/rigol-ds/protocol.c \
310 src/hardware/rigol-ds/api.c
67bd8055
UH
311endif
312if HW_SALEAE_LOGIC16
313libsigrok_la_SOURCES += \
155b680d
BV
314 src/hardware/saleae-logic16/protocol.h \
315 src/hardware/saleae-logic16/protocol.c \
316 src/hardware/saleae-logic16/api.c
67bd8055 317endif
ca1a7cb5
BV
318if HW_SCPI_PPS
319libsigrok_la_SOURCES += \
320 src/hardware/scpi-pps/protocol.h \
321 src/hardware/scpi-pps/protocol.c \
d4eabea8 322 src/hardware/scpi-pps/profiles.c \
ca1a7cb5
BV
323 src/hardware/scpi-pps/api.c
324endif
67bd8055
UH
325if HW_SERIAL_DMM
326libsigrok_la_SOURCES += \
155b680d
BV
327 src/hardware/serial-dmm/protocol.h \
328 src/hardware/serial-dmm/protocol.c \
329 src/hardware/serial-dmm/api.c
67bd8055
UH
330endif
331if HW_SYSCLK_LWLA
332libsigrok_la_SOURCES += \
155b680d
BV
333 src/hardware/sysclk-lwla/lwla.h \
334 src/hardware/sysclk-lwla/lwla.c \
335 src/hardware/sysclk-lwla/protocol.h \
336 src/hardware/sysclk-lwla/protocol.c \
337 src/hardware/sysclk-lwla/api.c
67bd8055
UH
338endif
339if HW_TELEINFO
340libsigrok_la_SOURCES += \
155b680d
BV
341 src/hardware/teleinfo/protocol.h \
342 src/hardware/teleinfo/protocol.c \
343 src/hardware/teleinfo/api.c
67bd8055 344endif
0acdd793
BV
345if HW_TESTO
346libsigrok_la_SOURCES += \
155b680d
BV
347 src/hardware/testo/protocol.h \
348 src/hardware/testo/protocol.c \
349 src/hardware/testo/api.c
0acdd793 350endif
67bd8055
UH
351if HW_TONDAJ_SL_814
352libsigrok_la_SOURCES += \
155b680d
BV
353 src/hardware/tondaj-sl-814/protocol.h \
354 src/hardware/tondaj-sl-814/protocol.c \
355 src/hardware/tondaj-sl-814/api.c
67bd8055
UH
356endif
357if HW_UNI_T_DMM
358libsigrok_la_SOURCES += \
155b680d
BV
359 src/hardware/uni-t-dmm/protocol.h \
360 src/hardware/uni-t-dmm/protocol.c \
361 src/hardware/uni-t-dmm/api.c
67bd8055
UH
362endif
363if HW_UNI_T_UT32X
364libsigrok_la_SOURCES += \
155b680d
BV
365 src/hardware/uni-t-ut32x/protocol.h \
366 src/hardware/uni-t-ut32x/protocol.c \
367 src/hardware/uni-t-ut32x/api.c
67bd8055
UH
368endif
369if HW_VICTOR_DMM
370libsigrok_la_SOURCES += \
155b680d
BV
371 src/hardware/victor-dmm/protocol.h \
372 src/hardware/victor-dmm/protocol.c \
373 src/hardware/victor-dmm/api.c
67bd8055 374endif
10763937
SA
375if HW_YOKOGAWA_DLM
376libsigrok_la_SOURCES += \
377 src/hardware/yokogawa-dlm/protocol.h \
378 src/hardware/yokogawa-dlm/protocol.c \
379 src/hardware/yokogawa-dlm/protocol_wrappers.h \
380 src/hardware/yokogawa-dlm/protocol_wrappers.c \
381 src/hardware/yokogawa-dlm/api.c
382endif
67bd8055
UH
383if HW_ZEROPLUS_LOGIC_CUBE
384libsigrok_la_SOURCES += \
155b680d
BV
385 src/hardware/zeroplus-logic-cube/analyzer.c \
386 src/hardware/zeroplus-logic-cube/analyzer.h \
387 src/hardware/zeroplus-logic-cube/gl_usb.h \
388 src/hardware/zeroplus-logic-cube/gl_usb.c \
389 src/hardware/zeroplus-logic-cube/protocol.h \
390 src/hardware/zeroplus-logic-cube/protocol.c \
391 src/hardware/zeroplus-logic-cube/api.c
67bd8055
UH
392endif
393
394libsigrok_la_LIBADD = $(LIBOBJS)
a1bb33af 395
6dddd902 396libsigrok_la_LDFLAGS = $(SR_LIB_LDFLAGS)
eeebceea 397
45c59c8b 398library_includedir = $(includedir)/libsigrok
63d0fb75
ML
399library_include_HEADERS = \
400 include/libsigrok/libsigrok.h \
401 include/libsigrok/proto.h \
402 include/libsigrok/version.h
155b680d 403noinst_HEADERS = src/libsigrok-internal.h
a1bb33af 404
8a7b47cd
UH
405pkgconfigdir = $(libdir)/pkgconfig
406pkgconfig_DATA = libsigrok.pc
d658e348 407
67bd8055
UH
408EXTRA_DIST = \
409 Doxyfile \
410 HACKING \
411 README.devices \
412 contrib/gnuplot_chronovu_la8.gpi \
413 contrib/gnuplot_rigol_ds1xx2.gpi \
414 contrib/gnuplot_usbeesx.gpi \
415 contrib/gnuplot_usbeedx8.gpi \
416 contrib/gnuplot_usbeedx16.gpi \
417 contrib/sigrok-logo-notext.png \
418 contrib/z60_libsigrok.rules
419
420if HAVE_CHECK
421
02a2bf68 422TESTS = tests/main
67bd8055
UH
423
424check_PROGRAMS = ${TESTS}
425
02a2bf68 426tests_main_SOURCES = \
6592c369 427 include/libsigrok/libsigrok.h \
67bd8055
UH
428 tests/lib.c \
429 tests/lib.h \
02a2bf68
UH
430 tests/main.c \
431 tests/core.c \
432 tests/input_all.c \
433 tests/input_binary.c \
434 tests/output_all.c \
435 tests/transform_all.c \
436 tests/session.c \
437 tests/strutil.c \
438 tests/version.c \
439 tests/driver_all.c \
440 tests/device.c \
441 tests/trigger.c
442
443tests_main_CFLAGS = @check_CFLAGS@
444
445tests_main_LDADD = $(top_builddir)/libsigrok.la @check_LIBS@
67bd8055
UH
446
447endif
dd8b5f56 448
580ed400
ML
449BUILD_EXTRA =
450INSTALL_EXTRA =
451CLEAN_EXTRA =
452
c23c8659
ML
453if BINDINGS_CXX
454
52ff4f6a 455lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la
c23c8659 456
52ff4f6a 457bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp
c23c8659 458
52ff4f6a 459bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(glibmm_LIBS)
c23c8659 460
52ff4f6a 461bindings_cxx_libsigrokcxx_la_LDFLAGS = $(SR_LIB_LDFLAGS)
c23c8659 462
0959ed3d
UH
463bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx
464bindings_cxx_libsigrokcxx_la_include_HEADERS = \
161dc24d
UH
465 bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \
466 bindings/cxx/include/libsigrokcxx/enums.hpp
c23c8659 467
52ff4f6a 468pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc
c23c8659 469
3532ed01 470doxy/xml/index.xml: include/libsigrok/libsigrok.h
7f82ec4d 471 $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null
580ed400
ML
472
473bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp
474
161dc24d 475bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp
c23c8659 476
b595a458 477bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \
c23c8659 478 bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp
b595a458 479 $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml
f2a189f0 480 $(AM_V_at)touch $@
c23c8659 481
580ed400
ML
482bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \
483 $(library_include_HEADERS)
c23c8659 484
580ed400 485cxx-clean:
3532ed01 486 rm -rf doxy/
bd4fda24 487 rm -rf bindings/cxx/doxy/
580ed400 488 rm -f bindings/cxx/enums.cpp
161dc24d 489 rm -f bindings/cxx/include/libsigrokcxx/enums.hpp
580ed400 490 rm -f bindings/cxx/enums.timestamp
c23c8659 491
580ed400
ML
492CLEAN_EXTRA += cxx-clean
493
494endif
f7740954 495
bd4fda24
ML
496CPPXMLDOC = bindings/cxx/doxy/xml/index.xml
497
161dc24d 498$(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \
bd4fda24 499 bindings/cxx/enums.timestamp
33c84e81 500 $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null
bd4fda24 501
f7740954
ML
502if BINDINGS_PYTHON
503
d1785122 504PDIR = bindings/python
bd4fda24
ML
505PDOC = bindings/python/sigrok/core/doc.i
506
507$(PDOC): bindings/swig/doc.py $(CPPXMLDOC)
f3256bb7 508 $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core
da89e23a 509 $(AM_V_GEN)$(PYTHON) $< python $(CPPXMLDOC) > $@
d1785122
ML
510
511python-build: $(PDIR)/timestamp
512
c26162ff 513python-quietclean:
da89e23a 514 $(AM_V_at)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet clean --all 3>&1 1>&2 2>&3 \
c26162ff 515 | grep -v "can.t clean it"; true
8eb10b62 516
52ff4f6a 517$(PDIR)/timestamp: bindings/cxx/libsigrokcxx.la $(PDIR)/sigrok/core/classes.i \
bd4fda24 518 bindings/swig/classes.i $(PDOC) $(library_include_HEADERS)
c26162ff 519 $(AM_V_at)$(MAKE) python-quietclean
da89e23a 520 $(AM_V_GEN)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet build 3>&1 1>&2 2>&3 \
c26162ff 521 | grep -v "command line option.*Wstrict-prototypes"; true
f2a189f0 522 $(AM_V_at)touch $(PDIR)/timestamp
f7740954 523
6ae53625
JP
524$(DESTDIR)$(prefix):
525 $(MKDIR_P) $@
526
527python-install: $(DESTDIR)$(prefix)
528 cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet install --prefix $(prefix) `test "$(DESTDIR)" && echo --root=$(DESTDIR)`
f7740954 529
c26162ff
BV
530python-clean:
531 $(AM_V_at)$(MAKE) python-quietclean
f2a189f0 532 $(AM_V_at)rm -f $(PDIR)/timestamp
6a8c1d68
ML
533 $(AM_V_at)rm -rf $(PDIR)/doxy/
534
535python-doc:
0e1a7fe9 536 $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR=$(abs_builddir)/$(PDIR)/ doxygen Doxyfile 2>/dev/null
f7740954
ML
537
538BUILD_EXTRA += python-build
539INSTALL_EXTRA += python-install
540CLEAN_EXTRA += python-clean
541
542endif
543
9fcf4d0b
ML
544if BINDINGS_JAVA
545
546JDIR = bindings/java
90bd7656
ML
547JPKG = org/sigrok/core
548JCLS = $(JDIR)/$(JPKG)/classes
549JINT = $(JDIR)/$(JPKG)/interfaces
33c84e81 550JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java
90bd7656 551JSWG = $(JCLS)/classes.i
bd4fda24 552JDOC = $(JCLS)/doc.i
90bd7656 553JCXX = $(JCLS)/classes_wrap.cxx
9fcf4d0b
ML
554JLIB = $(JDIR)/libsigrok_java_core_classes.so
555JJAR = $(JDIR)/sigrok-core.jar
556
557java-build: $(JJAR) $(JLIB)
558
bd4fda24 559$(JDOC): bindings/swig/doc.py $(CPPXMLDOC)
f3256bb7 560 $(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS)
33c84e81 561 $(AM_V_GEN)python $< java $(CPPXMLDOC) > $@
bd4fda24
ML
562
563$(JCXX): $(JSWG) $(JDOC) bindings/swig/classes.i $(library_include_HEADERS)
f1830b22 564 $(AM_V_at)make java-clean
f2a189f0 565 $(AM_V_GEN)swig -c++ -java -package org.sigrok.core.classes \
33c84e81 566 -I$(srcdir)/include -I$(srcdir)/bindings/cxx/include -I$(srcdir) -I$(JCLS) -Ibindings/cxx/include -outdir $(JCLS) -o $@ $<
9fcf4d0b 567
90bd7656 568$(JJAR): $(JCXX)
33c84e81 569 $(AM_V_GEN)$(JAVAC) -sourcepath $(JDIR) -d $(JDIR) $(JSRC)
f2a189f0 570 $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG)
9fcf4d0b 571
52ff4f6a 572$(JLIB): $(JCXX) bindings/cxx/libsigrokcxx.la $(library_include_HEADERS)
d1a5f737 573 $(AM_V_GEN)$(CXXCOMPILE) -L.libs -Lbindings/cxx/.libs \
90bd7656 574 -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \
52ff4f6a 575 -lsigrokcxx -o $(JLIB)
9fcf4d0b
ML
576
577java-install:
578 $(INSTALL) -d $(libdir)/jni
579 $(INSTALL) $(JLIB) -t $(libdir)/jni
580 $(INSTALL) -d $(datadir)/java
581 $(INSTALL) $(JJAR) -t $(datadir)/java
582
583java-clean:
2fe07d3f
BV
584 $(AM_V_at)rm -f $(JCXX)
585 $(AM_V_at)rm -f $(JCLS)/*.java
586 $(AM_V_at)rm -f $(JCLS)/*.class
587 $(AM_V_at)rm -f $(JINT)/*.class
588 $(AM_V_at)rm -f $(JJAR)
589 $(AM_V_at)rm -f $(JLIB)
590 $(AM_V_at)rm -rf $(JDIR)/doxy/
8a314e90
ML
591
592java-doc:
33c84e81 593 $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR=$(abs_builddir)/$(JDIR)/ doxygen Doxyfile 2>/dev/null
9fcf4d0b
ML
594
595BUILD_EXTRA += java-build
596INSTALL_EXTRA += java-install
597CLEAN_EXTRA += java-clean
598
599endif
600
f7740954
ML
601all-local: $(BUILD_EXTRA)
602install-exec-local: $(INSTALL_EXTRA)
d1785122 603clean-local: $(CLEAN_EXTRA)
f7740954 604
c0958408 605MAINTAINERCLEANFILES = ChangeLog
0fc12d66
UH
606
607.PHONY: ChangeLog
608ChangeLog:
bd58d8f3 609 git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog
0fc12d66
UH
610
611dist-hook: ChangeLog
612