]> sigrok.org Git - libsigrok.git/blame - Makefile.am
output: Add srzip, the session file format.
[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 \
38 src/strutil.c \
39 src/log.c \
40 src/version.c \
41 src/error.c \
42 src/std.c
960a75e4 43
155b680d
BV
44# Input modules
45libsigrok_la_SOURCES += \
155b680d 46 src/input/input.c \
b84cba4d 47 src/input/binary.c \
02e24c0c 48 src/input/chronovu_la8.c \
41d214f6 49 src/input/csv.c \
7db06394 50 src/input/vcd.c \
155b680d 51 src/input/wav.c
67bd8055 52
155b680d
BV
53# Output modules
54libsigrok_la_SOURCES += \
55 src/output/output.c \
56 src/output/analog.c \
57 src/output/ascii.c \
58 src/output/bits.c \
59 src/output/binary.c \
60 src/output/csv.c \
61 src/output/chronovu_la8.c \
afaa75b9 62 src/output/wav.c \
155b680d
BV
63 src/output/gnuplot.c \
64 src/output/hex.c \
65 src/output/ols.c \
3250d8c7 66 src/output/srzip.c \
155b680d 67 src/output/vcd.c
67bd8055 68
155b680d 69# SCPI support
67bd8055 70libsigrok_la_SOURCES += \
155b680d
BV
71 src/scpi/scpi.c \
72 src/scpi/scpi_tcp.c
67bd8055
UH
73if NEED_RPC
74libsigrok_la_SOURCES += \
155b680d
BV
75 src/scpi/scpi_vxi.c \
76 src/scpi/vxi_clnt.c \
77 src/scpi/vxi_xdr.c \
78 src/scpi/vxi.h
67bd8055
UH
79endif
80if NEED_SERIAL
81libsigrok_la_SOURCES += \
155b680d
BV
82 src/serial.c \
83 src/scpi/scpi_serial.c
67bd8055
UH
84endif
85if NEED_USB
86libsigrok_la_SOURCES += \
155b680d
BV
87 src/ezusb.c \
88 src/usb.c \
89 src/scpi/scpi_usbtmc_libusb.c
67bd8055
UH
90endif
91if NEED_VISA
92libsigrok_la_SOURCES += \
155b680d 93 src/scpi/scpi_visa.c
67bd8055 94endif
bb2a4ed4
ML
95if NEED_GPIB
96libsigrok_la_SOURCES += \
7343ad1e 97 src/scpi/scpi_libgpib.c
bb2a4ed4 98endif
67bd8055 99
155b680d
BV
100# Hardware (DMM chip parsers)
101libsigrok_la_SOURCES += \
102 src/dmm/es519xx.c \
103 src/dmm/fs9721.c \
104 src/dmm/fs9922.c \
105 src/dmm/m2110.c \
106 src/dmm/metex14.c \
a24c3f4a 107 src/dmm/rs9lcd.c \
626027df
UH
108 src/dmm/bm25x.c \
109 src/dmm/ut71x.c
67bd8055 110
6bcb3ee8 111# Hardware (LCR chip parsers)
34d117af 112if HW_DEREE_DE5000
6bcb3ee8
JH
113libsigrok_la_SOURCES += \
114 src/lcr/es51919.c
34d117af 115endif
6bcb3ee8 116
67bd8055
UH
117# Hardware drivers
118if HW_AGILENT_DMM
119libsigrok_la_SOURCES += \
155b680d
BV
120 src/hardware/agilent-dmm/api.c \
121 src/hardware/agilent-dmm/agilent-dmm.h \
122 src/hardware/agilent-dmm/sched.c
67bd8055 123endif
67bd8055
UH
124if HW_APPA_55II
125libsigrok_la_SOURCES += \
155b680d
BV
126 src/hardware/appa-55ii/protocol.h \
127 src/hardware/appa-55ii/protocol.c \
128 src/hardware/appa-55ii/api.c
67bd8055
UH
129endif
130if HW_ASIX_SIGMA
131libsigrok_la_SOURCES += \
155b680d
BV
132 src/hardware/asix-sigma/asix-sigma.h \
133 src/hardware/asix-sigma/asix-sigma.c
67bd8055
UH
134endif
135if HW_ATTEN_PPS3XXX
136libsigrok_la_SOURCES += \
155b680d
BV
137 src/hardware/atten-pps3xxx/protocol.h \
138 src/hardware/atten-pps3xxx/protocol.c \
139 src/hardware/atten-pps3xxx/api.c
67bd8055 140endif
bb993797
KA
141if HW_BEAGLELOGIC
142libsigrok_la_SOURCES += \
3db4b08b 143 src/hardware/beaglelogic/beaglelogic.h \
155b680d
BV
144 src/hardware/beaglelogic/protocol.h \
145 src/hardware/beaglelogic/protocol.c \
146 src/hardware/beaglelogic/api.c
bb993797 147endif
67bd8055
UH
148if HW_BRYMEN_BM86X
149libsigrok_la_SOURCES += \
155b680d
BV
150 src/hardware/brymen-bm86x/protocol.h \
151 src/hardware/brymen-bm86x/protocol.c \
152 src/hardware/brymen-bm86x/api.c
67bd8055
UH
153endif
154if HW_BRYMEN_DMM
155libsigrok_la_SOURCES += \
155b680d
BV
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
67bd8055
UH
160endif
161if HW_CEM_DT_885X
162libsigrok_la_SOURCES += \
155b680d
BV
163 src/hardware/cem-dt-885x/protocol.h \
164 src/hardware/cem-dt-885x/protocol.c \
165 src/hardware/cem-dt-885x/api.c
67bd8055
UH
166endif
167if HW_CENTER_3XX
168libsigrok_la_SOURCES += \
155b680d
BV
169 src/hardware/center-3xx/protocol.h \
170 src/hardware/center-3xx/protocol.c \
171 src/hardware/center-3xx/api.c
67bd8055 172endif
7b356712 173if HW_CHRONOVU_LA
67bd8055 174libsigrok_la_SOURCES += \
155b680d
BV
175 src/hardware/chronovu-la/protocol.h \
176 src/hardware/chronovu-la/protocol.c \
177 src/hardware/chronovu-la/api.c
67bd8055
UH
178endif
179if HW_COLEAD_SLM
180libsigrok_la_SOURCES += \
155b680d
BV
181 src/hardware/colead-slm/protocol.h \
182 src/hardware/colead-slm/protocol.c \
183 src/hardware/colead-slm/api.c
67bd8055
UH
184endif
185if HW_CONRAD_DIGI_35_CPU
186libsigrok_la_SOURCES += \
155b680d
BV
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
67bd8055
UH
190endif
191if HW_DEMO
192libsigrok_la_SOURCES += \
155b680d 193 src/hardware/demo/demo.c
67bd8055 194endif
b5089195
JH
195if HW_DEREE_DE5000
196libsigrok_la_SOURCES += \
197 src/hardware/deree-de5000/api.c
198endif
67bd8055
UH
199if HW_FLUKE_DMM
200libsigrok_la_SOURCES += \
155b680d
BV
201 src/hardware/fluke-dmm/fluke-dmm.h \
202 src/hardware/fluke-dmm/fluke.c \
203 src/hardware/fluke-dmm/api.c
67bd8055
UH
204endif
205if HW_FX2LAFW
206libsigrok_la_SOURCES += \
155b680d
BV
207 src/hardware/fx2lafw/protocol.h \
208 src/hardware/fx2lafw/protocol.c \
209 src/hardware/fx2lafw/api.c
67bd8055
UH
210endif
211if HW_GMC_MH_1X_2X
212libsigrok_la_SOURCES += \
155b680d
BV
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
67bd8055
UH
216endif
217if HW_HAMEG_HMO
218libsigrok_la_SOURCES += \
155b680d
BV
219 src/hardware/hameg-hmo/protocol.h \
220 src/hardware/hameg-hmo/protocol.c \
221 src/hardware/hameg-hmo/api.c
67bd8055
UH
222endif
223if HW_HANTEK_DSO
224libsigrok_la_SOURCES += \
155b680d
BV
225 src/hardware/hantek-dso/dso.h \
226 src/hardware/hantek-dso/dso.c \
227 src/hardware/hantek-dso/api.c
67bd8055
UH
228endif
229if HW_IKALOGIC_SCANALOGIC2
230libsigrok_la_SOURCES += \
155b680d
BV
231 src/hardware/ikalogic-scanalogic2/protocol.h \
232 src/hardware/ikalogic-scanalogic2/protocol.c \
233 src/hardware/ikalogic-scanalogic2/api.c
67bd8055
UH
234endif
235if HW_IKALOGIC_SCANAPLUS
236libsigrok_la_SOURCES += \
155b680d
BV
237 src/hardware/ikalogic-scanaplus/protocol.h \
238 src/hardware/ikalogic-scanaplus/protocol.c \
239 src/hardware/ikalogic-scanaplus/api.c
67bd8055
UH
240endif
241if HW_KECHENG_KC_330B
242libsigrok_la_SOURCES += \
155b680d
BV
243 src/hardware/kecheng-kc-330b/protocol.h \
244 src/hardware/kecheng-kc-330b/protocol.c \
245 src/hardware/kecheng-kc-330b/api.c
67bd8055
UH
246endif
247if HW_LASCAR_EL_USB
248libsigrok_la_SOURCES += \
155b680d
BV
249 src/hardware/lascar-el-usb/protocol.h \
250 src/hardware/lascar-el-usb/protocol.c \
251 src/hardware/lascar-el-usb/api.c
67bd8055 252endif
8f4e922f
UH
253if HW_MANSON_HCS_3XXX
254libsigrok_la_SOURCES += \
155b680d
BV
255 src/hardware/manson-hcs-3xxx/protocol.h \
256 src/hardware/manson-hcs-3xxx/protocol.c \
257 src/hardware/manson-hcs-3xxx/api.c
8f4e922f 258endif
67bd8055
UH
259if HW_MIC_985XX
260libsigrok_la_SOURCES += \
155b680d
BV
261 src/hardware/mic-985xx/protocol.h \
262 src/hardware/mic-985xx/protocol.c \
263 src/hardware/mic-985xx/api.c
67bd8055 264endif
41b7bd01
MH
265if HW_MOTECH_LPS_30X
266libsigrok_la_SOURCES += \
155b680d
BV
267 src/hardware/motech-lps-30x/protocol.h \
268 src/hardware/motech-lps-30x/protocol.c \
269 src/hardware/motech-lps-30x/api.c
41b7bd01 270endif
67bd8055
UH
271if HW_NORMA_DMM
272libsigrok_la_SOURCES += \
155b680d
BV
273 src/hardware/norma-dmm/protocol.h \
274 src/hardware/norma-dmm/protocol.c \
275 src/hardware/norma-dmm/api.c
67bd8055 276endif
d4b38748 277if HW_OPENBENCH_LOGIC_SNIFFER
67bd8055 278libsigrok_la_SOURCES += \
155b680d
BV
279 src/hardware/openbench-logic-sniffer/protocol.h \
280 src/hardware/openbench-logic-sniffer/protocol.c \
281 src/hardware/openbench-logic-sniffer/api.c
67bd8055 282endif
4bd80e12 283if HW_PIPISTRELLO_OLS
284libsigrok_la_SOURCES += \
285 src/hardware/pipistrello-ols/protocol.h \
286 src/hardware/pipistrello-ols/protocol.c \
287 src/hardware/pipistrello-ols/api.c
288endif
67bd8055
UH
289if HW_RIGOL_DS
290libsigrok_la_SOURCES += \
155b680d
BV
291 src/hardware/rigol-ds/protocol.h \
292 src/hardware/rigol-ds/protocol.c \
293 src/hardware/rigol-ds/api.c
67bd8055
UH
294endif
295if HW_SALEAE_LOGIC16
296libsigrok_la_SOURCES += \
155b680d
BV
297 src/hardware/saleae-logic16/protocol.h \
298 src/hardware/saleae-logic16/protocol.c \
299 src/hardware/saleae-logic16/api.c
67bd8055 300endif
ca1a7cb5
BV
301if HW_SCPI_PPS
302libsigrok_la_SOURCES += \
303 src/hardware/scpi-pps/protocol.h \
304 src/hardware/scpi-pps/protocol.c \
d4eabea8 305 src/hardware/scpi-pps/profiles.c \
ca1a7cb5
BV
306 src/hardware/scpi-pps/api.c
307endif
67bd8055
UH
308if HW_SERIAL_DMM
309libsigrok_la_SOURCES += \
155b680d
BV
310 src/hardware/serial-dmm/protocol.h \
311 src/hardware/serial-dmm/protocol.c \
312 src/hardware/serial-dmm/api.c
67bd8055
UH
313endif
314if HW_SYSCLK_LWLA
315libsigrok_la_SOURCES += \
155b680d
BV
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
67bd8055
UH
321endif
322if HW_TELEINFO
323libsigrok_la_SOURCES += \
155b680d
BV
324 src/hardware/teleinfo/protocol.h \
325 src/hardware/teleinfo/protocol.c \
326 src/hardware/teleinfo/api.c
67bd8055 327endif
0acdd793
BV
328if HW_TESTO
329libsigrok_la_SOURCES += \
155b680d
BV
330 src/hardware/testo/protocol.h \
331 src/hardware/testo/protocol.c \
332 src/hardware/testo/api.c
0acdd793 333endif
67bd8055
UH
334if HW_TONDAJ_SL_814
335libsigrok_la_SOURCES += \
155b680d
BV
336 src/hardware/tondaj-sl-814/protocol.h \
337 src/hardware/tondaj-sl-814/protocol.c \
338 src/hardware/tondaj-sl-814/api.c
67bd8055
UH
339endif
340if HW_UNI_T_DMM
341libsigrok_la_SOURCES += \
155b680d
BV
342 src/hardware/uni-t-dmm/protocol.h \
343 src/hardware/uni-t-dmm/protocol.c \
344 src/hardware/uni-t-dmm/api.c
67bd8055
UH
345endif
346if HW_UNI_T_UT32X
347libsigrok_la_SOURCES += \
155b680d
BV
348 src/hardware/uni-t-ut32x/protocol.h \
349 src/hardware/uni-t-ut32x/protocol.c \
350 src/hardware/uni-t-ut32x/api.c
67bd8055
UH
351endif
352if HW_VICTOR_DMM
353libsigrok_la_SOURCES += \
155b680d
BV
354 src/hardware/victor-dmm/protocol.h \
355 src/hardware/victor-dmm/protocol.c \
356 src/hardware/victor-dmm/api.c
67bd8055 357endif
10763937
SA
358if HW_YOKOGAWA_DLM
359libsigrok_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
365endif
67bd8055
UH
366if HW_ZEROPLUS_LOGIC_CUBE
367libsigrok_la_SOURCES += \
155b680d
BV
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
67bd8055
UH
375endif
376
377libsigrok_la_LIBADD = $(LIBOBJS)
a1bb33af 378
6dddd902 379libsigrok_la_LDFLAGS = $(SR_LIB_LDFLAGS)
eeebceea 380
45c59c8b 381library_includedir = $(includedir)/libsigrok
63d0fb75
ML
382library_include_HEADERS = \
383 include/libsigrok/libsigrok.h \
384 include/libsigrok/proto.h \
385 include/libsigrok/version.h
155b680d 386noinst_HEADERS = src/libsigrok-internal.h
a1bb33af 387
8a7b47cd
UH
388pkgconfigdir = $(libdir)/pkgconfig
389pkgconfig_DATA = libsigrok.pc
d658e348 390
67bd8055
UH
391EXTRA_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
403if HAVE_CHECK
404
405TESTS = tests/check_main
406
407check_PROGRAMS = ${TESTS}
408
409tests_check_main_SOURCES = \
6592c369 410 include/libsigrok/libsigrok.h \
67bd8055
UH
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 \
41723529 418 tests/check_session.c \
67bd8055
UH
419 tests/check_strutil.c \
420 tests/check_version.c \
6b1adfaa
UH
421 tests/check_driver_all.c \
422 tests/check_device.c
67bd8055
UH
423
424tests_check_main_CFLAGS = @check_CFLAGS@
425
426tests_check_main_LDADD = $(top_builddir)/libsigrok.la @check_LIBS@
427
428endif
dd8b5f56 429
580ed400
ML
430BUILD_EXTRA =
431INSTALL_EXTRA =
432CLEAN_EXTRA =
433
c23c8659
ML
434if BINDINGS_CXX
435
436lib_LTLIBRARIES += bindings/cxx/libsigrokxx.la
437
438bindings_cxx_libsigrokxx_la_SOURCES = bindings/cxx/classes.cpp
439
d1785122 440bindings_cxx_libsigrokxx_la_LIBADD = libsigrok.la $(glibmm_LIBS)
c23c8659
ML
441
442bindings_cxx_libsigrokxx_la_LDFLAGS = $(SR_LIB_LDFLAGS)
443
444library_include_HEADERS += \
445 bindings/cxx/include/libsigrok/libsigrok.hpp \
446 bindings/cxx/include/libsigrok/enums.hpp
447
448pkgconfig_DATA += bindings/cxx/libsigrokxx.pc
449
3532ed01 450doxy/xml/index.xml: include/libsigrok/libsigrok.h
7f82ec4d 451 $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null
580ed400
ML
452
453bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp
454
455bindings/cxx/include/libsigrok/enums.hpp: bindings/cxx/enums.timestamp
c23c8659 456
3532ed01 457bindings/cxx/enums.timestamp: bindings/cxx/enums.py doxy/xml/index.xml \
c23c8659 458 bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp
da89e23a 459 $(AM_V_GEN)$(PYTHON) $< doxy/xml/index.xml
f2a189f0 460 $(AM_V_at)touch $@
c23c8659 461
580ed400
ML
462bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \
463 $(library_include_HEADERS)
c23c8659 464
580ed400 465cxx-clean:
3532ed01 466 rm -rf doxy/
bd4fda24 467 rm -rf bindings/cxx/doxy/
580ed400
ML
468 rm -f bindings/cxx/enums.cpp
469 rm -f bindings/cxx/include/libsigrok/enums.hpp
470 rm -f bindings/cxx/enums.timestamp
c23c8659 471
580ed400
ML
472CLEAN_EXTRA += cxx-clean
473
474endif
f7740954 475
bd4fda24
ML
476CPPXMLDOC = bindings/cxx/doxy/xml/index.xml
477
478$(CPPXMLDOC): bindings/cxx/include/libsigrok/libsigrok.hpp \
479 bindings/cxx/enums.timestamp
33c84e81 480 $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null
bd4fda24 481
f7740954
ML
482if BINDINGS_PYTHON
483
d1785122 484PDIR = bindings/python
bd4fda24
ML
485PDOC = bindings/python/sigrok/core/doc.i
486
487$(PDOC): bindings/swig/doc.py $(CPPXMLDOC)
0e1a7fe9 488 $(AM_V_at)test -d $(PDIR)/sigrok/core || mkdir -p $(PDIR)/sigrok/core
da89e23a 489 $(AM_V_GEN)$(PYTHON) $< python $(CPPXMLDOC) > $@
d1785122
ML
490
491python-build: $(PDIR)/timestamp
492
c26162ff 493python-quietclean:
da89e23a 494 $(AM_V_at)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet clean --all 3>&1 1>&2 2>&3 \
c26162ff 495 | grep -v "can.t clean it"; true
8eb10b62 496
580ed400 497$(PDIR)/timestamp: bindings/cxx/libsigrokxx.la $(PDIR)/sigrok/core/classes.i \
bd4fda24 498 bindings/swig/classes.i $(PDOC) $(library_include_HEADERS)
c26162ff 499 $(AM_V_at)$(MAKE) python-quietclean
da89e23a 500 $(AM_V_GEN)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet build 3>&1 1>&2 2>&3 \
c26162ff 501 | grep -v "command line option.*Wstrict-prototypes"; true
f2a189f0 502 $(AM_V_at)touch $(PDIR)/timestamp
f7740954
ML
503
504python-install:
da89e23a 505 cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet install --prefix $(prefix)
f7740954 506
c26162ff
BV
507python-clean:
508 $(AM_V_at)$(MAKE) python-quietclean
f2a189f0 509 $(AM_V_at)rm -f $(PDIR)/timestamp
6a8c1d68
ML
510 $(AM_V_at)rm -rf $(PDIR)/doxy/
511
512python-doc:
0e1a7fe9 513 $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR=$(abs_builddir)/$(PDIR)/ doxygen Doxyfile 2>/dev/null
f7740954
ML
514
515BUILD_EXTRA += python-build
516INSTALL_EXTRA += python-install
517CLEAN_EXTRA += python-clean
518
519endif
520
9fcf4d0b
ML
521if BINDINGS_JAVA
522
523JDIR = bindings/java
90bd7656
ML
524JPKG = org/sigrok/core
525JCLS = $(JDIR)/$(JPKG)/classes
526JINT = $(JDIR)/$(JPKG)/interfaces
33c84e81 527JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java
90bd7656 528JSWG = $(JCLS)/classes.i
bd4fda24 529JDOC = $(JCLS)/doc.i
90bd7656 530JCXX = $(JCLS)/classes_wrap.cxx
9fcf4d0b
ML
531JLIB = $(JDIR)/libsigrok_java_core_classes.so
532JJAR = $(JDIR)/sigrok-core.jar
533
534java-build: $(JJAR) $(JLIB)
535
bd4fda24 536$(JDOC): bindings/swig/doc.py $(CPPXMLDOC)
33c84e81
MC
537 $(AM_V_at)test -d $(JCLS) || mkdir -p $(JCLS)
538 $(AM_V_GEN)python $< java $(CPPXMLDOC) > $@
bd4fda24
ML
539
540$(JCXX): $(JSWG) $(JDOC) bindings/swig/classes.i $(library_include_HEADERS)
f1830b22 541 $(AM_V_at)make java-clean
f2a189f0 542 $(AM_V_GEN)swig -c++ -java -package org.sigrok.core.classes \
33c84e81 543 -I$(srcdir)/include -I$(srcdir)/bindings/cxx/include -I$(srcdir) -I$(JCLS) -Ibindings/cxx/include -outdir $(JCLS) -o $@ $<
9fcf4d0b 544
90bd7656 545$(JJAR): $(JCXX)
33c84e81 546 $(AM_V_GEN)$(JAVAC) -sourcepath $(JDIR) -d $(JDIR) $(JSRC)
f2a189f0 547 $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG)
9fcf4d0b 548
90bd7656 549$(JLIB): $(JCXX) bindings/cxx/libsigrokxx.la $(library_include_HEADERS)
d1a5f737 550 $(AM_V_GEN)$(CXXCOMPILE) -L.libs -Lbindings/cxx/.libs \
90bd7656
ML
551 -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \
552 -lsigrokxx -o $(JLIB)
9fcf4d0b
ML
553
554java-install:
555 $(INSTALL) -d $(libdir)/jni
556 $(INSTALL) $(JLIB) -t $(libdir)/jni
557 $(INSTALL) -d $(datadir)/java
558 $(INSTALL) $(JJAR) -t $(datadir)/java
559
560java-clean:
2fe07d3f
BV
561 $(AM_V_at)rm -f $(JCXX)
562 $(AM_V_at)rm -f $(JCLS)/*.java
563 $(AM_V_at)rm -f $(JCLS)/*.class
564 $(AM_V_at)rm -f $(JINT)/*.class
565 $(AM_V_at)rm -f $(JJAR)
566 $(AM_V_at)rm -f $(JLIB)
567 $(AM_V_at)rm -rf $(JDIR)/doxy/
8a314e90
ML
568
569java-doc:
33c84e81 570 $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR=$(abs_builddir)/$(JDIR)/ doxygen Doxyfile 2>/dev/null
9fcf4d0b
ML
571
572BUILD_EXTRA += java-build
573INSTALL_EXTRA += java-install
574CLEAN_EXTRA += java-clean
575
576endif
577
f7740954
ML
578all-local: $(BUILD_EXTRA)
579install-exec-local: $(INSTALL_EXTRA)
d1785122 580clean-local: $(CLEAN_EXTRA)
f7740954 581
c0958408 582MAINTAINERCLEANFILES = ChangeLog
0fc12d66
UH
583
584.PHONY: ChangeLog
585ChangeLog:
bd58d8f3 586 git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog
0fc12d66
UH
587
588dist-hook: ChangeLog
589