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