libsigrok/Makefile.am

605 lines
16 KiB
Makefile
Raw Normal View History

2010-04-15 18:16:53 +00:00
##
2013-04-23 20:24:30 +00:00
## This file is part of the libsigrok project.
2010-04-15 18:16:53 +00:00
##
2012-02-13 13:31:51 +00:00
## Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com>
## Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com>
2010-04-15 18:16:53 +00:00
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
2010-04-15 18:16:53 +00:00
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
2010-04-15 18:16:53 +00:00
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
2010-04-15 18:16:53 +00:00
##
ACLOCAL_AMFLAGS = -I autostuff
AM_CPPFLAGS = -I$(srcdir)/src -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
lib_LTLIBRARIES = libsigrok.la
# Backend files
2010-04-02 18:26:48 +00:00
libsigrok_la_SOURCES = \
2014-07-21 19:27:33 +00:00
src/backend.c \
src/device.c \
src/session.c \
src/session_file.c \
src/session_driver.c \
src/drivers.c \
src/hwdriver.c \
src/trigger.c \
src/soft-trigger.c \
2014-11-12 16:05:13 +00:00
src/analog.c \
src/fallback.c \
2014-07-21 19:27:33 +00:00
src/strutil.c \
src/log.c \
src/version.c \
src/error.c \
src/std.c
2014-07-21 19:27:33 +00:00
# Input modules
libsigrok_la_SOURCES += \
src/input/input.c \
2014-08-19 23:29:37 +00:00
src/input/binary.c \
2014-08-19 22:43:13 +00:00
src/input/chronovu_la8.c \
2014-08-18 22:14:47 +00:00
src/input/csv.c \
2014-08-13 12:18:12 +00:00
src/input/vcd.c \
2014-07-21 19:27:33 +00:00
src/input/wav.c
2014-07-21 19:27:33 +00:00
# Output modules
libsigrok_la_SOURCES += \
src/output/output.c \
src/output/analog.c \
src/output/ascii.c \
src/output/bits.c \
src/output/binary.c \
src/output/csv.c \
src/output/chronovu_la8.c \
2014-07-26 09:00:51 +00:00
src/output/wav.c \
2014-07-21 19:27:33 +00:00
src/output/gnuplot.c \
src/output/hex.c \
src/output/ols.c \
src/output/srzip.c \
2014-07-21 19:27:33 +00:00
src/output/vcd.c
# Transform modules
libsigrok_la_SOURCES += \
src/transform/transform.c \
src/transform/nop.c \
src/transform/scale.c \
src/transform/invert.c
2014-07-21 19:27:33 +00:00
# SCPI support
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/scpi/scpi.c \
src/scpi/scpi_tcp.c
if NEED_RPC
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/scpi/scpi_vxi.c \
src/scpi/vxi_clnt.c \
src/scpi/vxi_xdr.c \
src/scpi/vxi.h
endif
if NEED_SERIAL
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/serial.c \
src/scpi/scpi_serial.c
endif
if NEED_USB
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/ezusb.c \
src/usb.c \
src/scpi/scpi_usbtmc_libusb.c
endif
if NEED_VISA
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/scpi/scpi_visa.c
endif
if NEED_GPIB
libsigrok_la_SOURCES += \
src/scpi/scpi_libgpib.c
endif
2014-07-21 19:27:33 +00:00
# Hardware (DMM chip parsers)
libsigrok_la_SOURCES += \
src/dmm/es519xx.c \
src/dmm/fs9721.c \
src/dmm/fs9922.c \
src/dmm/m2110.c \
src/dmm/metex14.c \
src/dmm/rs9lcd.c \
2014-10-25 09:36:58 +00:00
src/dmm/bm25x.c \
src/dmm/ut71x.c
# Hardware (LCR chip parsers)
if NEED_SERIAL
libsigrok_la_SOURCES += \
src/lcr/es51919.c
endif
# Hardware drivers
if HW_AGILENT_DMM
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/agilent-dmm/api.c \
src/hardware/agilent-dmm/agilent-dmm.h \
src/hardware/agilent-dmm/sched.c
endif
if HW_APPA_55II
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/appa-55ii/protocol.h \
src/hardware/appa-55ii/protocol.c \
src/hardware/appa-55ii/api.c
endif
if HW_ASIX_SIGMA
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/asix-sigma/asix-sigma.h \
src/hardware/asix-sigma/asix-sigma.c
endif
if HW_ATTEN_PPS3XXX
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/atten-pps3xxx/protocol.h \
src/hardware/atten-pps3xxx/protocol.c \
src/hardware/atten-pps3xxx/api.c
endif
2014-07-21 20:11:52 +00:00
if HW_BEAGLELOGIC
libsigrok_la_SOURCES += \
src/hardware/beaglelogic/beaglelogic.h \
2014-07-21 19:27:33 +00:00
src/hardware/beaglelogic/protocol.h \
src/hardware/beaglelogic/protocol.c \
src/hardware/beaglelogic/api.c
2014-07-21 20:11:52 +00:00
endif
if HW_BRYMEN_BM86X
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/brymen-bm86x/protocol.h \
src/hardware/brymen-bm86x/protocol.c \
src/hardware/brymen-bm86x/api.c
endif
if HW_BRYMEN_DMM
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/brymen-dmm/parser.c \
src/hardware/brymen-dmm/protocol.h \
src/hardware/brymen-dmm/protocol.c \
src/hardware/brymen-dmm/api.c
endif
if HW_CEM_DT_885X
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/cem-dt-885x/protocol.h \
src/hardware/cem-dt-885x/protocol.c \
src/hardware/cem-dt-885x/api.c
endif
if HW_CENTER_3XX
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/center-3xx/protocol.h \
src/hardware/center-3xx/protocol.c \
src/hardware/center-3xx/api.c
endif
if HW_CHRONOVU_LA
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/chronovu-la/protocol.h \
src/hardware/chronovu-la/protocol.c \
src/hardware/chronovu-la/api.c
endif
if HW_COLEAD_SLM
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/colead-slm/protocol.h \
src/hardware/colead-slm/protocol.c \
src/hardware/colead-slm/api.c
endif
if HW_CONRAD_DIGI_35_CPU
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/conrad-digi-35-cpu/protocol.h \
src/hardware/conrad-digi-35-cpu/protocol.c \
src/hardware/conrad-digi-35-cpu/api.c
endif
if HW_DEMO
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/demo/demo.c
endif
if HW_DEREE_DE5000
libsigrok_la_SOURCES += \
src/hardware/deree-de5000/api.c
endif
if HW_FLUKE_DMM
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/fluke-dmm/fluke-dmm.h \
src/hardware/fluke-dmm/fluke.c \
src/hardware/fluke-dmm/api.c
endif
if HW_FX2LAFW
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/fx2lafw/protocol.h \
src/hardware/fx2lafw/protocol.c \
src/hardware/fx2lafw/api.c
endif
if HW_GMC_MH_1X_2X
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/gmc-mh-1x-2x/protocol.h \
src/hardware/gmc-mh-1x-2x/protocol.c \
src/hardware/gmc-mh-1x-2x/api.c
endif
if HW_HAMEG_HMO
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/hameg-hmo/protocol.h \
src/hardware/hameg-hmo/protocol.c \
src/hardware/hameg-hmo/api.c
endif
if HW_HANTEK_DSO
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/hantek-dso/dso.h \
src/hardware/hantek-dso/dso.c \
src/hardware/hantek-dso/api.c
endif
if HW_IKALOGIC_SCANALOGIC2
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/ikalogic-scanalogic2/protocol.h \
src/hardware/ikalogic-scanalogic2/protocol.c \
src/hardware/ikalogic-scanalogic2/api.c
endif
if HW_IKALOGIC_SCANAPLUS
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/ikalogic-scanaplus/protocol.h \
src/hardware/ikalogic-scanaplus/protocol.c \
src/hardware/ikalogic-scanaplus/api.c
endif
if HW_KECHENG_KC_330B
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/kecheng-kc-330b/protocol.h \
src/hardware/kecheng-kc-330b/protocol.c \
src/hardware/kecheng-kc-330b/api.c
endif
if HW_LASCAR_EL_USB
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/lascar-el-usb/protocol.h \
src/hardware/lascar-el-usb/protocol.c \
src/hardware/lascar-el-usb/api.c
endif
if HW_MANSON_HCS_3XXX
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/manson-hcs-3xxx/protocol.h \
src/hardware/manson-hcs-3xxx/protocol.c \
src/hardware/manson-hcs-3xxx/api.c
endif
if HW_MIC_985XX
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/mic-985xx/protocol.h \
src/hardware/mic-985xx/protocol.c \
src/hardware/mic-985xx/api.c
endif
if HW_MOTECH_LPS_30X
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/motech-lps-30x/protocol.h \
src/hardware/motech-lps-30x/protocol.c \
src/hardware/motech-lps-30x/api.c
endif
if HW_NORMA_DMM
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/norma-dmm/protocol.h \
src/hardware/norma-dmm/protocol.c \
src/hardware/norma-dmm/api.c
endif
if HW_OPENBENCH_LOGIC_SNIFFER
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/openbench-logic-sniffer/protocol.h \
src/hardware/openbench-logic-sniffer/protocol.c \
src/hardware/openbench-logic-sniffer/api.c
endif
if HW_PIPISTRELLO_OLS
libsigrok_la_SOURCES += \
src/hardware/pipistrello-ols/protocol.h \
src/hardware/pipistrello-ols/protocol.c \
src/hardware/pipistrello-ols/api.c
endif
if HW_RIGOL_DS
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/rigol-ds/protocol.h \
src/hardware/rigol-ds/protocol.c \
src/hardware/rigol-ds/api.c
endif
if HW_SALEAE_LOGIC16
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/saleae-logic16/protocol.h \
src/hardware/saleae-logic16/protocol.c \
src/hardware/saleae-logic16/api.c
endif
2014-08-31 15:20:39 +00:00
if HW_SCPI_PPS
libsigrok_la_SOURCES += \
src/hardware/scpi-pps/protocol.h \
src/hardware/scpi-pps/protocol.c \
2014-09-05 01:23:32 +00:00
src/hardware/scpi-pps/profiles.c \
2014-08-31 15:20:39 +00:00
src/hardware/scpi-pps/api.c
endif
if HW_SERIAL_DMM
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/serial-dmm/protocol.h \
src/hardware/serial-dmm/protocol.c \
src/hardware/serial-dmm/api.c
endif
if HW_SYSCLK_LWLA
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/sysclk-lwla/lwla.h \
src/hardware/sysclk-lwla/lwla.c \
src/hardware/sysclk-lwla/protocol.h \
src/hardware/sysclk-lwla/protocol.c \
src/hardware/sysclk-lwla/api.c
endif
if HW_TELEINFO
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/teleinfo/protocol.h \
src/hardware/teleinfo/protocol.c \
src/hardware/teleinfo/api.c
endif
2014-06-30 23:34:29 +00:00
if HW_TESTO
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/testo/protocol.h \
src/hardware/testo/protocol.c \
src/hardware/testo/api.c
2014-06-30 23:34:29 +00:00
endif
if HW_TONDAJ_SL_814
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/tondaj-sl-814/protocol.h \
src/hardware/tondaj-sl-814/protocol.c \
src/hardware/tondaj-sl-814/api.c
endif
if HW_UNI_T_DMM
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/uni-t-dmm/protocol.h \
src/hardware/uni-t-dmm/protocol.c \
src/hardware/uni-t-dmm/api.c
endif
if HW_UNI_T_UT32X
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/uni-t-ut32x/protocol.h \
src/hardware/uni-t-ut32x/protocol.c \
src/hardware/uni-t-ut32x/api.c
endif
if HW_VICTOR_DMM
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/victor-dmm/protocol.h \
src/hardware/victor-dmm/protocol.c \
src/hardware/victor-dmm/api.c
endif
if HW_YOKOGAWA_DLM
libsigrok_la_SOURCES += \
src/hardware/yokogawa-dlm/protocol.h \
src/hardware/yokogawa-dlm/protocol.c \
src/hardware/yokogawa-dlm/protocol_wrappers.h \
src/hardware/yokogawa-dlm/protocol_wrappers.c \
src/hardware/yokogawa-dlm/api.c
endif
if HW_ZEROPLUS_LOGIC_CUBE
libsigrok_la_SOURCES += \
2014-07-21 19:27:33 +00:00
src/hardware/zeroplus-logic-cube/analyzer.c \
src/hardware/zeroplus-logic-cube/analyzer.h \
src/hardware/zeroplus-logic-cube/gl_usb.h \
src/hardware/zeroplus-logic-cube/gl_usb.c \
src/hardware/zeroplus-logic-cube/protocol.h \
src/hardware/zeroplus-logic-cube/protocol.c \
src/hardware/zeroplus-logic-cube/api.c
endif
libsigrok_la_LIBADD = $(LIBOBJS)
libsigrok_la_LDFLAGS = $(SR_LIB_LDFLAGS)
library_includedir = $(includedir)/libsigrok
library_include_HEADERS = \
include/libsigrok/libsigrok.h \
include/libsigrok/proto.h \
include/libsigrok/version.h
2014-07-21 19:27:33 +00:00
noinst_HEADERS = src/libsigrok-internal.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libsigrok.pc
EXTRA_DIST = \
Doxyfile \
HACKING \
README.devices \
contrib/gnuplot_chronovu_la8.gpi \
contrib/gnuplot_rigol_ds1xx2.gpi \
contrib/gnuplot_usbeesx.gpi \
contrib/gnuplot_usbeedx8.gpi \
contrib/gnuplot_usbeedx16.gpi \
contrib/sigrok-logo-notext.png \
contrib/z60_libsigrok.rules
if HAVE_CHECK
TESTS = tests/check_main
check_PROGRAMS = ${TESTS}
tests_check_main_SOURCES = \
include/libsigrok/libsigrok.h \
tests/lib.c \
tests/lib.h \
tests/check_main.c \
tests/check_core.c \
tests/check_input_all.c \
tests/check_input_binary.c \
tests/check_output_all.c \
2015-02-10 21:47:36 +00:00
tests/check_transform_all.c \
tests/check_session.c \
tests/check_strutil.c \
tests/check_version.c \
tests/check_driver_all.c \
tests/check_device.c \
tests/check_trigger.c
tests_check_main_CFLAGS = @check_CFLAGS@
tests_check_main_LDADD = $(top_builddir)/libsigrok.la @check_LIBS@
endif
2012-01-04 01:50:26 +00:00
BUILD_EXTRA =
INSTALL_EXTRA =
CLEAN_EXTRA =
2014-07-17 17:39:49 +00:00
if BINDINGS_CXX
lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la
2014-07-17 17:39:49 +00:00
bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp
2014-07-17 17:39:49 +00:00
bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(glibmm_LIBS)
2014-07-17 17:39:49 +00:00
bindings_cxx_libsigrokcxx_la_LDFLAGS = $(SR_LIB_LDFLAGS)
2014-07-17 17:39:49 +00:00
bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx
bindings_cxx_libsigrokcxx_la_include_HEADERS = \
bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \
bindings/cxx/include/libsigrokcxx/enums.hpp
2014-07-17 17:39:49 +00:00
pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc
2014-07-17 17:39:49 +00:00
doxy/xml/index.xml: include/libsigrok/libsigrok.h
$(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null
bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp
bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp
2014-07-17 17:39:49 +00:00
bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \
2014-07-17 17:39:49 +00:00
bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp
$(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml
$(AM_V_at)touch $@
2014-07-17 17:39:49 +00:00
bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \
$(library_include_HEADERS)
2014-07-17 17:39:49 +00:00
cxx-clean:
rm -rf doxy/
rm -rf bindings/cxx/doxy/
rm -f bindings/cxx/enums.cpp
rm -f bindings/cxx/include/libsigrokcxx/enums.hpp
rm -f bindings/cxx/enums.timestamp
2014-07-17 17:39:49 +00:00
CLEAN_EXTRA += cxx-clean
endif
CPPXMLDOC = bindings/cxx/doxy/xml/index.xml
$(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \
bindings/cxx/enums.timestamp
$(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null
if BINDINGS_PYTHON
PDIR = bindings/python
PDOC = bindings/python/sigrok/core/doc.i
$(PDOC): bindings/swig/doc.py $(CPPXMLDOC)
$(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core
$(AM_V_GEN)$(PYTHON) $< python $(CPPXMLDOC) > $@
python-build: $(PDIR)/timestamp
python-quietclean:
$(AM_V_at)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet clean --all 3>&1 1>&2 2>&3 \
| grep -v "can.t clean it"; true
$(PDIR)/timestamp: bindings/cxx/libsigrokcxx.la $(PDIR)/sigrok/core/classes.i \
bindings/swig/classes.i $(PDOC) $(library_include_HEADERS)
$(AM_V_at)$(MAKE) python-quietclean
$(AM_V_GEN)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet build 3>&1 1>&2 2>&3 \
| grep -v "command line option.*Wstrict-prototypes"; true
$(AM_V_at)touch $(PDIR)/timestamp
$(DESTDIR)$(prefix):
$(MKDIR_P) $@
python-install: $(DESTDIR)$(prefix)
cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet install --prefix $(prefix) `test "$(DESTDIR)" && echo --root=$(DESTDIR)`
python-clean:
$(AM_V_at)$(MAKE) python-quietclean
$(AM_V_at)rm -f $(PDIR)/timestamp
2014-08-01 18:22:24 +00:00
$(AM_V_at)rm -rf $(PDIR)/doxy/
python-doc:
$(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR=$(abs_builddir)/$(PDIR)/ doxygen Doxyfile 2>/dev/null
BUILD_EXTRA += python-build
INSTALL_EXTRA += python-install
CLEAN_EXTRA += python-clean
endif
2014-04-27 08:48:18 +00:00
if BINDINGS_JAVA
JDIR = bindings/java
JPKG = org/sigrok/core
JCLS = $(JDIR)/$(JPKG)/classes
JINT = $(JDIR)/$(JPKG)/interfaces
JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java
JSWG = $(JCLS)/classes.i
JDOC = $(JCLS)/doc.i
JCXX = $(JCLS)/classes_wrap.cxx
2014-04-27 08:48:18 +00:00
JLIB = $(JDIR)/libsigrok_java_core_classes.so
JJAR = $(JDIR)/sigrok-core.jar
java-build: $(JJAR) $(JLIB)
$(JDOC): bindings/swig/doc.py $(CPPXMLDOC)
$(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS)
$(AM_V_GEN)python $< java $(CPPXMLDOC) > $@
$(JCXX): $(JSWG) $(JDOC) bindings/swig/classes.i $(library_include_HEADERS)
$(AM_V_at)make java-clean
$(AM_V_GEN)swig -c++ -java -package org.sigrok.core.classes \
-I$(srcdir)/include -I$(srcdir)/bindings/cxx/include -I$(srcdir) -I$(JCLS) -Ibindings/cxx/include -outdir $(JCLS) -o $@ $<
2014-04-27 08:48:18 +00:00
$(JJAR): $(JCXX)
$(AM_V_GEN)$(JAVAC) -sourcepath $(JDIR) -d $(JDIR) $(JSRC)
$(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG)
2014-04-27 08:48:18 +00:00
$(JLIB): $(JCXX) bindings/cxx/libsigrokcxx.la $(library_include_HEADERS)
$(AM_V_GEN)$(CXXCOMPILE) -L.libs -Lbindings/cxx/.libs \
-fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \
-lsigrokcxx -o $(JLIB)
2014-04-27 08:48:18 +00:00
java-install:
$(INSTALL) -d $(libdir)/jni
$(INSTALL) $(JLIB) -t $(libdir)/jni
$(INSTALL) -d $(datadir)/java
$(INSTALL) $(JJAR) -t $(datadir)/java
java-clean:
2014-08-31 11:46:45 +00:00
$(AM_V_at)rm -f $(JCXX)
$(AM_V_at)rm -f $(JCLS)/*.java
$(AM_V_at)rm -f $(JCLS)/*.class
$(AM_V_at)rm -f $(JINT)/*.class
$(AM_V_at)rm -f $(JJAR)
$(AM_V_at)rm -f $(JLIB)
$(AM_V_at)rm -rf $(JDIR)/doxy/
2014-08-01 18:29:48 +00:00
java-doc:
$(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR=$(abs_builddir)/$(JDIR)/ doxygen Doxyfile 2>/dev/null
2014-04-27 08:48:18 +00:00
BUILD_EXTRA += java-build
INSTALL_EXTRA += java-install
CLEAN_EXTRA += java-clean
endif
all-local: $(BUILD_EXTRA)
install-exec-local: $(INSTALL_EXTRA)
clean-local: $(CLEAN_EXTRA)
MAINTAINERCLEANFILES = ChangeLog
.PHONY: ChangeLog
ChangeLog:
git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog
dist-hook: ChangeLog