session.c \
session_file.c \
session_driver.c \
+ drivers.c \
hwdriver.c \
+ trigger.c \
+ soft-trigger.c \
strutil.c \
log.c \
version.c \
# Output formats
libsigrok_la_SOURCES += \
- output/binary.c \
+ output/output.c \
+ output/analog.c \
+ output/ascii.c \
output/bits.c \
- output/vcd.c \
- output/ols.c \
- output/gnuplot.c \
- output/chronovu_la8.c \
+ output/binary.c \
output/csv.c \
- output/analog.c \
- output/output.c \
+ output/chronovu_la8.c \
+ output/gnuplot.c \
output/hex.c \
- output/ascii.c
+ output/ols.c \
+ output/vcd.c
# Hardware (common files)
libsigrok_la_SOURCES += \
hardware/common/scpi.c \
- hardware/common/scpi_tcp.c \
- hardware/common/scpi_usbtmc.c
+ hardware/common/scpi_tcp.c
if NEED_RPC
libsigrok_la_SOURCES += \
hardware/common/scpi_vxi.c \
hardware/lascar-el-usb/protocol.c \
hardware/lascar-el-usb/api.c
endif
-if HW_LINK_MSO19
+if HW_MANSON_HCS_3XXX
libsigrok_la_SOURCES += \
- hardware/link-mso19/protocol.h \
- hardware/link-mso19/protocol.c \
- hardware/link-mso19/api.c
+ hardware/manson-hcs-3xxx/protocol.h \
+ hardware/manson-hcs-3xxx/protocol.c \
+ hardware/manson-hcs-3xxx/api.c
endif
if HW_MIC_985XX
libsigrok_la_SOURCES += \
hardware/mic-985xx/protocol.c \
hardware/mic-985xx/api.c
endif
+if HW_MOTECH_LPS_30X
+libsigrok_la_SOURCES += \
+ hardware/motech-lps-30x/protocol.h \
+ hardware/motech-lps-30x/protocol.c \
+ hardware/motech-lps-30x/api.c
+endif
if HW_NORMA_DMM
libsigrok_la_SOURCES += \
hardware/norma-dmm/protocol.h \
hardware/norma-dmm/protocol.c \
hardware/norma-dmm/api.c
endif
-if HW_OLS
+if HW_OPENBENCH_LOGIC_SNIFFER
libsigrok_la_SOURCES += \
hardware/openbench-logic-sniffer/protocol.h \
hardware/openbench-logic-sniffer/protocol.c \
hardware/teleinfo/protocol.c \
hardware/teleinfo/api.c
endif
+if HW_TESTO
+libsigrok_la_SOURCES += \
+ hardware/testo/protocol.h \
+ hardware/testo/protocol.c \
+ hardware/testo/api.c
+endif
if HW_TONDAJ_SL_814
libsigrok_la_SOURCES += \
hardware/tondaj-sl-814/protocol.h \
libsigrok_la_LDFLAGS = $(SR_LIB_LDFLAGS)
library_includedir = $(includedir)/libsigrok
-library_include_HEADERS = libsigrok.h proto.h version.h
+library_include_HEADERS = \
+ include/libsigrok/libsigrok.h \
+ include/libsigrok/proto.h \
+ include/libsigrok/version.h
noinst_HEADERS = libsigrok-internal.h
pkgconfigdir = $(libdir)/pkgconfig
endif
+if BINDINGS_CXX
+
+lib_LTLIBRARIES += bindings/cxx/libsigrokxx.la
+
+bindings_cxx_libsigrokxx_la_SOURCES = bindings/cxx/classes.cpp
+
+bindings_cxx_libsigrokxx_la_LIBADD = -lsigrok $(glibmm_LIBS)
+
+bindings_cxx_libsigrokxx_la_LDFLAGS = $(SR_LIB_LDFLAGS)
+
+library_include_HEADERS += \
+ bindings/cxx/include/libsigrok/libsigrok.hpp \
+ bindings/cxx/include/libsigrok/enums.hpp
+
+pkgconfig_DATA += bindings/cxx/libsigrokxx.pc
+
+bindings/cxx/classes.lo: bindings/cxx/enums.cpp
+
+bindings/cxx/enums.cpp: bindings/cxx/enums.py bindings/cxx/libsigrok.xml \
+ bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp
+ python $<
+
+bindings/cxx/libsigrok.xml: include/libsigrok/libsigrok.h
+ gccxml $(CFLAGS) -DGLIB_DISABLE_DEPRECATION_WARNINGS $< -fxml=$@
+
+endif
+
+BUILD_EXTRA =
+INSTALL_EXTRA =
+CLEAN_EXTRA =
+
+if BINDINGS_PYTHON
+
+python-build: bindings/cxx/libsigrokxx.la
+ cd bindings/python && python setup.py build
+
+python-install:
+ cd bindings/python && python setup.py install
+
+python-clean:
+ cd bindings/python && python setup.py clean --all
+
+BUILD_EXTRA += python-build
+INSTALL_EXTRA += python-install
+CLEAN_EXTRA += python-clean
+
+endif
+
+if BINDINGS_JAVA
+
+JDIR = bindings/java
+JPKG = org/sigrok/core/classes
+JINT = $(JDIR)/$(JPKG)/classes.i
+JSRC = $(JDIR)/$(JPKG)/classes_wrap.cxx
+JLIB = $(JDIR)/libsigrok_java_core_classes.so
+JJAR = $(JDIR)/sigrok-core.jar
+
+java-build: $(JJAR) $(JLIB)
+
+$(JSRC): $(JINT) bindings/swig/classes.i
+ swig -c++ -java -package org.sigrok.core.classes \
+ -Iinclude -Ibindings/cxx/include \
+ -outdir $(JDIR)/$(JPKG) $(JINT)
+
+$(JJAR): $(JSRC) $(JDIR)/$(JPKG)/*.java
+ $(JAVAC) -sourcepath $(JDIR) $(JDIR)/$(JPKG)/*.java
+ jar cf $(JJAR) -C $(JDIR) $(JPKG)
+
+$(JLIB): $(JSRC) bindings/cxx/libsigrokxx.la
+ $(CXX) $(CXXFLAGS) -L.libs -Lbindings/cxx/.libs \
+ -fno-strict-aliasing -fPIC -shared \
+ $(JDIR)/$(JPKG)/classes_wrap.cxx -lsigrokxx \
+ -o $(JLIB)
+
+java-install:
+ $(INSTALL) -d $(libdir)/jni
+ $(INSTALL) $(JLIB) -t $(libdir)/jni
+ $(INSTALL) -d $(datadir)/java
+ $(INSTALL) $(JJAR) -t $(datadir)/java
+
+java-clean:
+ rm $(JSRC)
+ rm $(JDIR)/$(JPKG)/*.class
+ rm $(JJAR)
+ rm $(JLIB)
+
+BUILD_EXTRA += java-build
+INSTALL_EXTRA += java-install
+CLEAN_EXTRA += java-clean
+
+endif
+
+all-local: $(BUILD_EXTRA)
+install-exec-local: $(INSTALL_EXTRA)
+clean-extra: $(CLEAN_EXTRA)
+
MAINTAINERCLEANFILES = ChangeLog
.PHONY: ChangeLog