X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=Makefile.am;h=50cd2491b6a53c2e957757278e8d9ccb1d120f64;hb=cc9653de22d72b5694d56492348895097a5c626b;hp=4b05175b480870bd89e38f7647d4e8a1bf1f40d2;hpb=13f6da6755cc93d779853ac008ed9c4bcd3045fb;p=libsigrok.git diff --git a/Makefile.am b/Makefile.am index 4b05175b..50cd2491 100644 --- a/Makefile.am +++ b/Makefile.am @@ -25,6 +25,8 @@ GNUMAKEFLAGS = --no-print-directory # distutils/setuptools cause trouble on distcheck. Disable for now. DISTCHECK_CONFIGURE_FLAGS = --disable-python +CLEAN_EXTRA = + FIRMWARE_DIR = $(datadir)/sigrok-firmware local_includes = -Iinclude -I$(srcdir)/include -I$(srcdir)/src -I. @RPC_CFLAGS@ @@ -42,7 +44,8 @@ AM_CPPFLAGS = $(local_includes) $(global_defs) # The tests CFLAGS are a superset of the libsigrok CFLAGS, and the # python bindings CFLAGS are a superset of the C++ bindings CFLAGS. -AM_CFLAGS = $(SR_EXTRA_CFLAGS) $(SR_WFLAGS) $(TESTS_CFLAGS) +SR_MINILZO_CFLAGS = -DMINILZO_HAVE_CONFIG_H +AM_CFLAGS = $(SR_EXTRA_CFLAGS) $(SR_WFLAGS) $(SR_MINILZO_CFLAGS) $(TESTS_CFLAGS) AM_CXXFLAGS = $(SR_WXXFLAGS) $(LIBSIGROKCXX_CFLAGS) lib_LTLIBRARIES = libsigrok.la @@ -70,6 +73,13 @@ libsigrok_la_SOURCES = \ src/std.c \ src/sw_limits.c +# Support code, shared among input and driver modules +libsigrok_la_SOURCES += \ + src/minilzo/minilzo.c \ + src/minilzo/minilzo.h \ + src/minilzo/lzoconf.h \ + src/minilzo/lzodefs.h + # Input modules libsigrok_la_SOURCES += \ src/input/input.c \ @@ -84,6 +94,10 @@ libsigrok_la_SOURCES += \ src/input/vcd.c \ src/input/wav.c \ src/input/null.c +if HAVE_INPUT_STF +libsigrok_la_SOURCES += \ + src/input/stf.c +endif # Output modules libsigrok_la_SOURCES += \ @@ -137,6 +151,9 @@ libsigrok_la_SOURCES += \ src/serial_hid_victor.c \ src/serial_libsp.c \ src/scpi/scpi_serial.c +else +libsigrok_la_SOURCES += \ + src/serial.c endif if NEED_USB libsigrok_la_SOURCES += \ @@ -244,6 +261,12 @@ src_libdrivers_la_SOURCES += \ src/hardware/asix-sigma/protocol.c \ src/hardware/asix-sigma/api.c endif +if HW_ATORCH +src_libdrivers_la_SOURCES += \ + src/hardware/atorch/protocol.h \ + src/hardware/atorch/protocol.c \ + src/hardware/atorch/api.c +endif if HW_ATTEN_PPS3XXX src_libdrivers_la_SOURCES += \ src/hardware/atten-pps3xxx/protocol.h \ @@ -405,6 +428,12 @@ src_libdrivers_la_SOURCES += \ src/hardware/hung-chang-dso-2100/protocol.c \ src/hardware/hung-chang-dso-2100/api.c endif +if HW_ICSTATION_USBRELAY +src_libdrivers_la_SOURCES += \ + src/hardware/icstation-usbrelay/protocol.h \ + src/hardware/icstation-usbrelay/protocol.c \ + src/hardware/icstation-usbrelay/api.c +endif if HW_IKALOGIC_SCANALOGIC2 src_libdrivers_la_SOURCES += \ src/hardware/ikalogic-scanalogic2/protocol.h \ @@ -704,6 +733,35 @@ nodist_library_include_HEADERS = \ include/libsigrok/version.h noinst_HEADERS = src/libsigrok-internal.h +$(builddir)/src/version.lo: $(builddir)/include/libsigrok/git-version.h + +# Create the git-version.h file even for non-versioned source trees, +# to reduce complexity in the library code. Re-create the header file +# when branches change, when revisions change, or upon re-configuration. +# Use the verbatim tagged version number when applicable, or append the +# "-git-[-dirty]" suffix for non-tagged source trees. +if VCS_IS_GIT + +$(builddir)/include/libsigrok/git-version.h: Makefile $(VERSION_GITVERSION_DEPS) + $(AM_V_GEN) \ + HASH=`git -C "$(srcdir)" describe --match "@VERSION_TAG_MATCH@" --always --dirty` && \ + HASH=`echo "$${HASH}" | sed 's/@VERSION_TAG_MATCH@-//'` && \ + SUFFIX=`git -C "$(srcdir)" describe --match "@VERSION_TAG_MATCH@" --exact-match > /dev/null 2> /dev/null || echo "-$${HASH}"` && \ + echo "#undef SR_PACKAGE_VERSION_STRING_SUFFIX" > $@ && \ + echo "#define SR_PACKAGE_VERSION_STRING_SUFFIX \"$${SUFFIX}\"" >> $@ + +else + +$(builddir)/include/libsigrok/git-version.h: + $(AM_V_GEN)echo '#define SR_PACKAGE_VERSION_STRING_SUFFIX ""' > $@ + +endif + +version-clean: + rm -f $(builddir)/include/libsigrok/git-version.h + +CLEAN_EXTRA += version-clean + pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libsigrok.pc @@ -746,7 +804,11 @@ EXTRA_DIST = \ contrib/vnd.sigrok.session.xml \ contrib/60-libsigrok.rules \ contrib/61-libsigrok-plugdev.rules \ - contrib/61-libsigrok-uaccess.rules + contrib/61-libsigrok-uaccess.rules \ + src/minilzo/COPYING \ + src/minilzo/Makefile \ + src/minilzo/README.LZO \ + src/minilzo/testmini.c if HAVE_CHECK TESTS = tests/main @@ -777,7 +839,6 @@ tests_main_LDADD = libsigrok.la $(SR_EXTRA_LIBS) $(TESTS_LIBS) BUILD_EXTRA = INSTALL_EXTRA = UNINSTALL_EXTRA = -CLEAN_EXTRA = libsigrok-uninstall: -rmdir $(DESTDIR)$(includedir)/libsigrok