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