]> sigrok.org Git - libsigrok.git/blame_incremental - Makefile.am
Add SR_T_MQLIST.
[libsigrok.git] / Makefile.am
... / ...
CommitLineData
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
21ACLOCAL_AMFLAGS = -I m4
22AM_LIBTOOLFLAGS = --silent
23MAKEFLAGS = --no-print-directory
24
25FIRMWARE_DIR = $(datadir)/sigrok-firmware
26
27local_includes = -Iinclude -I$(srcdir)/include -I$(srcdir)/src -I.
28if BINDINGS_CXX
29local_includes += -Ibindings/cxx/include -I$(srcdir)/bindings/cxx/include -Ibindings/cxx
30endif
31# Ensure that local include directories are always searched first.
32AM_CPPFLAGS = $(local_includes) -D_POSIX_C_SOURCE=200112L -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
33
34# The check CFLAGS are a superset of the libsigrok CFLAGS, and the
35# python bindings CFLAGS are a superset of the C++ bindings CFLAGS.
36AM_CFLAGS = $(SR_EXTRA_CFLAGS) $(SR_WFLAGS) $(CHECK_CFLAGS)
37AM_CXXFLAGS = $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS)
38
39lib_LTLIBRARIES = libsigrok.la
40
41# Backend files
42libsigrok_la_SOURCES = \
43 src/backend.c \
44 src/device.c \
45 src/session.c \
46 src/session_file.c \
47 src/session_driver.c \
48 src/drivers.c \
49 src/hwdriver.c \
50 src/trigger.c \
51 src/soft-trigger.c \
52 src/analog.c \
53 src/fallback.c \
54 src/strutil.c \
55 src/log.c \
56 src/version.c \
57 src/error.c \
58 src/std.c
59
60# Input modules
61libsigrok_la_SOURCES += \
62 src/input/input.c \
63 src/input/binary.c \
64 src/input/chronovu_la8.c \
65 src/input/csv.c \
66 src/input/vcd.c \
67 src/input/wav.c
68
69# Output modules
70libsigrok_la_SOURCES += \
71 src/output/output.c \
72 src/output/analog.c \
73 src/output/ascii.c \
74 src/output/bits.c \
75 src/output/binary.c \
76 src/output/csv.c \
77 src/output/chronovu_la8.c \
78 src/output/wav.c \
79 src/output/gnuplot.c \
80 src/output/hex.c \
81 src/output/ols.c \
82 src/output/srzip.c \
83 src/output/vcd.c
84
85# Transform modules
86libsigrok_la_SOURCES += \
87 src/transform/transform.c \
88 src/transform/nop.c \
89 src/transform/scale.c \
90 src/transform/invert.c
91
92# SCPI support
93libsigrok_la_SOURCES += \
94 src/scpi/scpi.c \
95 src/scpi/helpers.c \
96 src/scpi/scpi_tcp.c
97if NEED_RPC
98libsigrok_la_SOURCES += \
99 src/scpi/scpi_vxi.c \
100 src/scpi/vxi_clnt.c \
101 src/scpi/vxi_xdr.c \
102 src/scpi/vxi.h
103endif
104if NEED_SERIAL
105libsigrok_la_SOURCES += \
106 src/serial.c \
107 src/scpi/scpi_serial.c
108endif
109if NEED_USB
110libsigrok_la_SOURCES += \
111 src/ezusb.c \
112 src/usb.c \
113 src/scpi/scpi_usbtmc_libusb.c
114endif
115if NEED_VISA
116libsigrok_la_SOURCES += \
117 src/scpi/scpi_visa.c
118endif
119if NEED_GPIB
120libsigrok_la_SOURCES += \
121 src/scpi/scpi_libgpib.c
122endif
123
124# Modbus support
125libsigrok_la_SOURCES += \
126 src/modbus/modbus.c
127if NEED_SERIAL
128libsigrok_la_SOURCES += \
129 src/modbus/modbus_serial_rtu.c
130endif
131
132# Hardware (DMM chip parsers)
133libsigrok_la_SOURCES += \
134 src/dmm/es519xx.c \
135 src/dmm/fs9721.c \
136 src/dmm/fs9922.c \
137 src/dmm/m2110.c \
138 src/dmm/metex14.c \
139 src/dmm/rs9lcd.c \
140 src/dmm/bm25x.c \
141 src/dmm/ut71x.c \
142 src/dmm/ut372.c \
143 src/dmm/vc870.c
144
145# Hardware (LCR chip parsers)
146if NEED_SERIAL
147libsigrok_la_SOURCES += \
148 src/lcr/es51919.c
149endif
150
151# Hardware drivers
152if HW_AGILENT_DMM
153libsigrok_la_SOURCES += \
154 src/hardware/agilent-dmm/api.c \
155 src/hardware/agilent-dmm/agilent-dmm.h \
156 src/hardware/agilent-dmm/sched.c
157endif
158if HW_APPA_55II
159libsigrok_la_SOURCES += \
160 src/hardware/appa-55ii/protocol.h \
161 src/hardware/appa-55ii/protocol.c \
162 src/hardware/appa-55ii/api.c
163endif
164if HW_ASIX_SIGMA
165libsigrok_la_SOURCES += \
166 src/hardware/asix-sigma/asix-sigma.h \
167 src/hardware/asix-sigma/asix-sigma.c
168endif
169if HW_ATTEN_PPS3XXX
170libsigrok_la_SOURCES += \
171 src/hardware/atten-pps3xxx/protocol.h \
172 src/hardware/atten-pps3xxx/protocol.c \
173 src/hardware/atten-pps3xxx/api.c
174endif
175if HW_BAYLIBRE_ACME
176libsigrok_la_SOURCES += \
177 src/hardware/baylibre-acme/protocol.h \
178 src/hardware/baylibre-acme/protocol.c \
179 src/hardware/baylibre-acme/api.c \
180 src/hardware/baylibre-acme/gpio.h \
181 src/hardware/baylibre-acme/gpio.c
182endif
183if HW_BEAGLELOGIC
184libsigrok_la_SOURCES += \
185 src/hardware/beaglelogic/beaglelogic.h \
186 src/hardware/beaglelogic/protocol.h \
187 src/hardware/beaglelogic/protocol.c \
188 src/hardware/beaglelogic/api.c
189endif
190if HW_BRYMEN_BM86X
191libsigrok_la_SOURCES += \
192 src/hardware/brymen-bm86x/protocol.h \
193 src/hardware/brymen-bm86x/protocol.c \
194 src/hardware/brymen-bm86x/api.c
195endif
196if HW_BRYMEN_DMM
197libsigrok_la_SOURCES += \
198 src/hardware/brymen-dmm/parser.c \
199 src/hardware/brymen-dmm/protocol.h \
200 src/hardware/brymen-dmm/protocol.c \
201 src/hardware/brymen-dmm/api.c
202endif
203if HW_CEM_DT_885X
204libsigrok_la_SOURCES += \
205 src/hardware/cem-dt-885x/protocol.h \
206 src/hardware/cem-dt-885x/protocol.c \
207 src/hardware/cem-dt-885x/api.c
208endif
209if HW_CENTER_3XX
210libsigrok_la_SOURCES += \
211 src/hardware/center-3xx/protocol.h \
212 src/hardware/center-3xx/protocol.c \
213 src/hardware/center-3xx/api.c
214endif
215if HW_CHRONOVU_LA
216libsigrok_la_SOURCES += \
217 src/hardware/chronovu-la/protocol.h \
218 src/hardware/chronovu-la/protocol.c \
219 src/hardware/chronovu-la/api.c
220endif
221if HW_COLEAD_SLM
222libsigrok_la_SOURCES += \
223 src/hardware/colead-slm/protocol.h \
224 src/hardware/colead-slm/protocol.c \
225 src/hardware/colead-slm/api.c
226endif
227if HW_CONRAD_DIGI_35_CPU
228libsigrok_la_SOURCES += \
229 src/hardware/conrad-digi-35-cpu/protocol.h \
230 src/hardware/conrad-digi-35-cpu/protocol.c \
231 src/hardware/conrad-digi-35-cpu/api.c
232endif
233if HW_DEMO
234libsigrok_la_SOURCES += \
235 src/hardware/demo/demo.c
236endif
237if HW_DEREE_DE5000
238libsigrok_la_SOURCES += \
239 src/hardware/deree-de5000/api.c
240endif
241if HW_FLUKE_DMM
242libsigrok_la_SOURCES += \
243 src/hardware/fluke-dmm/fluke-dmm.h \
244 src/hardware/fluke-dmm/fluke.c \
245 src/hardware/fluke-dmm/api.c
246endif
247if HW_FX2LAFW
248libsigrok_la_SOURCES += \
249 src/hardware/fx2lafw/protocol.h \
250 src/hardware/fx2lafw/protocol.c \
251 src/hardware/fx2lafw/api.c \
252 src/hardware/fx2lafw/dslogic.c \
253 src/hardware/fx2lafw/dslogic.h
254endif
255if HW_GMC_MH_1X_2X
256libsigrok_la_SOURCES += \
257 src/hardware/gmc-mh-1x-2x/protocol.h \
258 src/hardware/gmc-mh-1x-2x/protocol.c \
259 src/hardware/gmc-mh-1x-2x/api.c
260endif
261if HW_HAMEG_HMO
262libsigrok_la_SOURCES += \
263 src/hardware/hameg-hmo/protocol.h \
264 src/hardware/hameg-hmo/protocol.c \
265 src/hardware/hameg-hmo/api.c
266endif
267if HW_HANTEK_DSO
268libsigrok_la_SOURCES += \
269 src/hardware/hantek-dso/dso.h \
270 src/hardware/hantek-dso/dso.c \
271 src/hardware/hantek-dso/api.c
272endif
273if HW_IKALOGIC_SCANALOGIC2
274libsigrok_la_SOURCES += \
275 src/hardware/ikalogic-scanalogic2/protocol.h \
276 src/hardware/ikalogic-scanalogic2/protocol.c \
277 src/hardware/ikalogic-scanalogic2/api.c
278endif
279if HW_IKALOGIC_SCANAPLUS
280libsigrok_la_SOURCES += \
281 src/hardware/ikalogic-scanaplus/protocol.h \
282 src/hardware/ikalogic-scanaplus/protocol.c \
283 src/hardware/ikalogic-scanaplus/api.c
284endif
285if HW_KECHENG_KC_330B
286libsigrok_la_SOURCES += \
287 src/hardware/kecheng-kc-330b/protocol.h \
288 src/hardware/kecheng-kc-330b/protocol.c \
289 src/hardware/kecheng-kc-330b/api.c
290endif
291if HW_LASCAR_EL_USB
292libsigrok_la_SOURCES += \
293 src/hardware/lascar-el-usb/protocol.h \
294 src/hardware/lascar-el-usb/protocol.c \
295 src/hardware/lascar-el-usb/api.c
296endif
297if HW_MANSON_HCS_3XXX
298libsigrok_la_SOURCES += \
299 src/hardware/manson-hcs-3xxx/protocol.h \
300 src/hardware/manson-hcs-3xxx/protocol.c \
301 src/hardware/manson-hcs-3xxx/api.c
302endif
303if HW_MAYNUO_M97
304libsigrok_la_SOURCES += \
305 src/hardware/maynuo-m97/protocol.h \
306 src/hardware/maynuo-m97/protocol.c \
307 src/hardware/maynuo-m97/api.c
308endif
309if HW_MIC_985XX
310libsigrok_la_SOURCES += \
311 src/hardware/mic-985xx/protocol.h \
312 src/hardware/mic-985xx/protocol.c \
313 src/hardware/mic-985xx/api.c
314endif
315if HW_MOTECH_LPS_30X
316libsigrok_la_SOURCES += \
317 src/hardware/motech-lps-30x/protocol.h \
318 src/hardware/motech-lps-30x/protocol.c \
319 src/hardware/motech-lps-30x/api.c
320endif
321if HW_NORMA_DMM
322libsigrok_la_SOURCES += \
323 src/hardware/norma-dmm/protocol.h \
324 src/hardware/norma-dmm/protocol.c \
325 src/hardware/norma-dmm/api.c
326endif
327if HW_OPENBENCH_LOGIC_SNIFFER
328libsigrok_la_SOURCES += \
329 src/hardware/openbench-logic-sniffer/protocol.h \
330 src/hardware/openbench-logic-sniffer/protocol.c \
331 src/hardware/openbench-logic-sniffer/api.c
332endif
333if HW_PIPISTRELLO_OLS
334libsigrok_la_SOURCES += \
335 src/hardware/pipistrello-ols/protocol.h \
336 src/hardware/pipistrello-ols/protocol.c \
337 src/hardware/pipistrello-ols/api.c
338endif
339if HW_RIGOL_DS
340libsigrok_la_SOURCES += \
341 src/hardware/rigol-ds/protocol.h \
342 src/hardware/rigol-ds/protocol.c \
343 src/hardware/rigol-ds/api.c
344endif
345if HW_SALEAE_LOGIC16
346libsigrok_la_SOURCES += \
347 src/hardware/saleae-logic16/protocol.h \
348 src/hardware/saleae-logic16/protocol.c \
349 src/hardware/saleae-logic16/api.c
350endif
351if HW_SCPI_PPS
352libsigrok_la_SOURCES += \
353 src/hardware/scpi-pps/protocol.h \
354 src/hardware/scpi-pps/protocol.c \
355 src/hardware/scpi-pps/profiles.c \
356 src/hardware/scpi-pps/api.c
357endif
358if HW_SERIAL_DMM
359libsigrok_la_SOURCES += \
360 src/hardware/serial-dmm/protocol.h \
361 src/hardware/serial-dmm/protocol.c \
362 src/hardware/serial-dmm/api.c
363endif
364if HW_SYSCLK_LWLA
365libsigrok_la_SOURCES += \
366 src/hardware/sysclk-lwla/lwla.h \
367 src/hardware/sysclk-lwla/lwla.c \
368 src/hardware/sysclk-lwla/protocol.h \
369 src/hardware/sysclk-lwla/protocol.c \
370 src/hardware/sysclk-lwla/api.c
371endif
372if HW_TELEINFO
373libsigrok_la_SOURCES += \
374 src/hardware/teleinfo/protocol.h \
375 src/hardware/teleinfo/protocol.c \
376 src/hardware/teleinfo/api.c
377endif
378if HW_TESTO
379libsigrok_la_SOURCES += \
380 src/hardware/testo/protocol.h \
381 src/hardware/testo/protocol.c \
382 src/hardware/testo/api.c
383endif
384if HW_TONDAJ_SL_814
385libsigrok_la_SOURCES += \
386 src/hardware/tondaj-sl-814/protocol.h \
387 src/hardware/tondaj-sl-814/protocol.c \
388 src/hardware/tondaj-sl-814/api.c
389endif
390if HW_UNI_T_DMM
391libsigrok_la_SOURCES += \
392 src/hardware/uni-t-dmm/protocol.h \
393 src/hardware/uni-t-dmm/protocol.c \
394 src/hardware/uni-t-dmm/api.c
395endif
396if HW_UNI_T_UT32X
397libsigrok_la_SOURCES += \
398 src/hardware/uni-t-ut32x/protocol.h \
399 src/hardware/uni-t-ut32x/protocol.c \
400 src/hardware/uni-t-ut32x/api.c
401endif
402if HW_VICTOR_DMM
403libsigrok_la_SOURCES += \
404 src/hardware/victor-dmm/protocol.h \
405 src/hardware/victor-dmm/protocol.c \
406 src/hardware/victor-dmm/api.c
407endif
408if HW_YOKOGAWA_DLM
409libsigrok_la_SOURCES += \
410 src/hardware/yokogawa-dlm/protocol.h \
411 src/hardware/yokogawa-dlm/protocol.c \
412 src/hardware/yokogawa-dlm/protocol_wrappers.h \
413 src/hardware/yokogawa-dlm/protocol_wrappers.c \
414 src/hardware/yokogawa-dlm/api.c
415endif
416if HW_ZEROPLUS_LOGIC_CUBE
417libsigrok_la_SOURCES += \
418 src/hardware/zeroplus-logic-cube/analyzer.c \
419 src/hardware/zeroplus-logic-cube/analyzer.h \
420 src/hardware/zeroplus-logic-cube/gl_usb.h \
421 src/hardware/zeroplus-logic-cube/gl_usb.c \
422 src/hardware/zeroplus-logic-cube/protocol.h \
423 src/hardware/zeroplus-logic-cube/protocol.c \
424 src/hardware/zeroplus-logic-cube/api.c
425endif
426
427libsigrok_la_LIBADD = $(SR_EXTRA_LIBS) $(LIBSIGROK_LIBS)
428libsigrok_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined
429
430library_includedir = $(includedir)/libsigrok
431library_include_HEADERS = \
432 include/libsigrok/libsigrok.h \
433 include/libsigrok/proto.h
434nodist_library_include_HEADERS = \
435 include/libsigrok/version.h
436noinst_HEADERS = src/libsigrok-internal.h
437
438pkgconfigdir = $(libdir)/pkgconfig
439pkgconfig_DATA = libsigrok.pc
440
441EXTRA_DIST = \
442 Doxyfile \
443 HACKING \
444 README.devices \
445 bindings/cxx/ConfigKey_methods.cpp \
446 bindings/cxx/ConfigKey_methods.hpp \
447 bindings/cxx/ConfigKey_methods.i \
448 bindings/cxx/Doxyfile \
449 bindings/cxx/QuantityFlag_methods.cpp \
450 bindings/cxx/QuantityFlag_methods.hpp \
451 bindings/cxx/enums.py \
452 bindings/python/Doxyfile \
453 bindings/python/setup.py \
454 bindings/python/sigrok/__init__.py \
455 bindings/python/sigrok/core/__init__.py \
456 bindings/python/sigrok/core/classes.i \
457 bindings/java/Doxyfile \
458 bindings/java/org/sigrok/core/classes/classes.i \
459 bindings/java/org/sigrok/core/interfaces/DatafeedCallback.java \
460 bindings/java/org/sigrok/core/interfaces/LogCallback.java \
461 bindings/java/org/sigrok/core/interfaces/SourceCallback.java \
462 bindings/swig/classes.i \
463 bindings/swig/doc.py \
464 contrib/gnuplot_chronovu_la8.gpi \
465 contrib/gnuplot_rigol_ds1xx2.gpi \
466 contrib/gnuplot_usbeesx.gpi \
467 contrib/gnuplot_usbeedx8.gpi \
468 contrib/gnuplot_usbeedx16.gpi \
469 contrib/sigrok-logo-notext.png \
470 contrib/z60_libsigrok.rules
471
472if HAVE_CHECK
473
474TESTS = tests/main
475
476check_PROGRAMS = ${TESTS}
477
478tests_main_SOURCES = \
479 include/libsigrok/libsigrok.h \
480 tests/lib.c \
481 tests/lib.h \
482 tests/main.c \
483 tests/core.c \
484 tests/input_all.c \
485 tests/input_binary.c \
486 tests/output_all.c \
487 tests/transform_all.c \
488 tests/session.c \
489 tests/strutil.c \
490 tests/version.c \
491 tests/driver_all.c \
492 tests/device.c \
493 tests/trigger.c
494
495tests_main_LDADD = libsigrok.la $(SR_EXTRA_LIBS) $(CHECK_LIBS)
496
497endif
498
499BUILD_EXTRA =
500INSTALL_EXTRA =
501CLEAN_EXTRA =
502
503if BINDINGS_CXX
504
505lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la
506
507bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp
508
509bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(SR_EXTRA_LIBS) $(LIBSIGROKCXX_LIBS)
510bindings_cxx_libsigrokcxx_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined
511
512bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx
513bindings_cxx_libsigrokcxx_la_include_HEADERS = \
514 bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp
515nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS = \
516 bindings/cxx/include/libsigrokcxx/enums.hpp
517
518pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc
519
520doxy/xml/index.xml: include/libsigrok/libsigrok.h
521 $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null
522
523bindings/swig/enums.i: bindings/cxx/enums.timestamp
524bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp
525bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp
526
527bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \
528 bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp
529 $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml
530 $(AM_V_at)touch $@
531
532bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \
533 $(library_include_HEADERS) $(nodist_library_include_HEADERS)
534
535cxx-clean:
536 rm -rf doxy/
537 rm -rf bindings/cxx/doxy/
538 rm -f bindings/cxx/enums.cpp
539 rm -f bindings/cxx/include/libsigrokcxx/enums.hpp
540 rm -f bindings/cxx/enums.timestamp
541
542CLEAN_EXTRA += cxx-clean
543
544endif
545
546CPPXMLDOC = bindings/cxx/doxy/xml/index.xml
547
548$(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \
549 bindings/cxx/enums.timestamp
550 $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null
551
552if BINDINGS_PYTHON
553
554PDIR = bindings/python
555PDOC = bindings/python/sigrok/core/doc.i
556
557setup_py = cd $(PDIR) && $(PYTHON) "$(abs_srcdir)/$(PDIR)/setup.py" --quiet
558
559$(PDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
560 $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core
561 $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) > $@
562
563python-build: $(PDIR)/timestamp
564
565$(PDIR)/timestamp: bindings/cxx/libsigrokcxx.la $(PDIR)/sigrok/core/classes.i \
566 bindings/swig/classes.i bindings/swig/enums.i $(PDOC) \
567 $(library_include_HEADERS) $(nodist_library_include_HEADERS)
568 $(AM_V_at)$(setup_py) clean --all 2>/dev/null
569 $(AM_V_GEN)$(setup_py) build_ext --swig "$(SWIG)" build_py
570 $(AM_V_at): >$@
571
572python-install:
573 $(AM_V_at)$(MKDIR_P) "$(DESTDIR)$(prefix)" "$(DESTDIR)$(exec_prefix)"
574 $(setup_py) install --root "$(DESTDIR)/" --prefix "$(prefix)" --exec-prefix "$(exec_prefix)"
575
576python-clean:
577 -$(AM_V_at)$(setup_py) clean --all 2>/dev/null
578 -$(AM_V_at)rm -f $(PDIR)/timestamp
579 -$(AM_V_at)rm -fr $(PDIR)/doxy
580
581python-doc:
582 $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR="$(abs_builddir)/$(PDIR)/" doxygen Doxyfile 2>/dev/null
583
584BUILD_EXTRA += python-build
585INSTALL_EXTRA += python-install
586CLEAN_EXTRA += python-clean
587
588endif
589
590if BINDINGS_JAVA
591
592JDIR = bindings/java
593JPKG = org/sigrok/core
594JCLS = $(JDIR)/$(JPKG)/classes
595JINT = $(JDIR)/$(JPKG)/interfaces
596JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java
597JSWG = $(JCLS)/classes.i
598JDOC = $(JCLS)/doc.i
599JCXX = $(JCLS)/classes_wrap.cxx
600JLIB = $(JDIR)/libsigrok_java_core_classes.so
601JJAR = $(JDIR)/sigrok-core.jar
602
603java_cleanfiles = $(JCXX) $(JCLS)/*.java $(JCLS)/*.class $(JINT)/*.class $(JJAR) $(JLIB)
604
605java-build: $(JJAR) $(JLIB)
606
607$(JDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
608 $(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS)
609 $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py java $(CPPXMLDOC) > $@
610
611$(JCXX): $(srcdir)/$(JSWG) $(JDOC) bindings/swig/classes.i bindings/swig/enums.i \
612 $(library_include_HEADERS) $(nodist_library_include_HEADERS)
613 -$(AM_V_at)rm -f $(java_cleanfiles)
614 $(AM_V_GEN)$(SWIG) -c++ -java -package org.sigrok.core.classes \
615 -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) $(JNI_CPPFLAGS) \
616 -outdir $(JCLS) -o $@ $(srcdir)/$(JSWG)
617
618$(JJAR): $(JCXX)
619 $(AM_V_GEN)$(JAVAC) -d $(JDIR) $(JSRC)
620 $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG)
621
622$(JLIB): $(JCXX) bindings/cxx/libsigrokcxx.la $(library_include_HEADERS) $(nodist_library_include_HEADERS)
623 $(AM_V_GEN)$(CXXCOMPILE) $(JNI_CPPFLAGS) -L.libs -Lbindings/cxx/.libs \
624 -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \
625 -lsigrokcxx $(LIBSIGROKCXX_LIBS) -o $(JLIB)
626
627java-install:
628 $(INSTALL) -d $(DESTDIR)$(libdir)/jni
629 $(INSTALL) $(JLIB) -t $(DESTDIR)$(libdir)/jni
630 $(INSTALL) -d $(DESTDIR)$(datadir)/java
631 $(INSTALL) $(JJAR) -t $(DESTDIR)$(datadir)/java
632
633java-clean:
634 -$(AM_V_at)rm -f $(java_cleanfiles)
635 -$(AM_V_at)rm -fr $(JDIR)/doxy
636
637java-doc:
638 $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR="$(abs_builddir)/$(JDIR)/" doxygen Doxyfile
639
640BUILD_EXTRA += java-build
641INSTALL_EXTRA += java-install
642CLEAN_EXTRA += java-clean
643
644endif
645
646all-local: $(BUILD_EXTRA)
647install-exec-local: $(INSTALL_EXTRA)
648clean-local: $(CLEAN_EXTRA)
649
650MAINTAINERCLEANFILES = ChangeLog
651
652.PHONY: ChangeLog
653ChangeLog:
654 git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog
655
656dist-hook: ChangeLog
657