X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=Makefile.am;h=df8fb86d1ae641ef220241269991ba48fd9cd3f5;hp=6aac2c1b2a4e139aada31cdac2702edb6fd68e63;hb=783b54337242e5c40da8ffc0fc18babbcd09bc67;hpb=1c6fa20f549c0565ce4fae6ddf7d5eb60db2ddea diff --git a/Makefile.am b/Makefile.am index 6aac2c1..df8fb86 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ ## -## This file is part of the sigrok project. +## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2010 Uwe Hermann ## @@ -18,14 +18,80 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -SUBDIRS = scripts +ACLOCAL_AMFLAGS = -I autostuff lib_LTLIBRARIES = libsigrokdecode.la -libsigrokdecode_la_SOURCES = decode.c +libsigrokdecode_la_SOURCES = \ + srd.c \ + session.c \ + decoder.c \ + instance.c \ + log.c \ + util.c \ + exception.c \ + module_sigrokdecode.c \ + type_decoder.c \ + type_logic.c \ + error.c \ + version.c -libsigrokdecode_la_CPPFLAGS = $(CPPFLAGS_PYTHON) -libsigrokdecode_la_LDFLAGS = $(LDFLAGS_PYTHON) +libsigrokdecode_la_CPPFLAGS = $(CPPFLAGS_PYTHON) \ + -DDECODERS_DIR='"$(DECODERS_DIR)"' +libsigrokdecode_la_LDFLAGS = $(SRD_LIB_LDFLAGS) $(LDFLAGS_PYTHON) -include_HEADERS = sigrokdecode.h +library_includedir = $(includedir)/libsigrokdecode +library_include_HEADERS = libsigrokdecode.h version.h +noinst_HEADERS = libsigrokdecode-internal.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libsigrokdecode.pc + +EXTRA_DIST = Doxyfile HACKING contrib/sigrok-logo-notext.png + +if HAVE_CHECK +TESTS = tests/check_main +check_PROGRAMS = ${TESTS} +tests_check_main_SOURCES = \ + libsigrokdecode.h \ + tests/lib.h \ + tests/check_main.c \ + tests/check_core.c \ + tests/check_decoder.c \ + tests/check_inst.c \ + tests/check_session.c +tests_check_main_CFLAGS = @check_CFLAGS@ +tests_check_main_LDADD = $(top_builddir)/libsigrokdecode.la @check_LIBS@ +tests_check_main_CPPFLAGS = $(CPPFLAGS_PYTHON) \ + -DDECODERS_DIR='"$(abs_top_builddir)/decoders"' +endif + +if BUILD_RUNTC +noinst_PROGRAMS = tests/runtc +tests_runtc_LDADD = $(top_builddir)/libsigrokdecode.la +tests_runtc_SOURCES = tests/runtc.c +tests_runtc_CPPFLAGS = $(CPPFLAGS_PYTHON) $(LIBSIGROK_CFLAGS) \ + -DDECODERS_DIR='"$(abs_top_builddir)/decoders"' +tests_runtc_LDFLAGS = -L$(top_builddir) $(LIBSIGROK_LIBS) $(LDFLAGS_PYTHON) +endif + +MAINTAINERCLEANFILES = ChangeLog + +.PHONY: ChangeLog +ChangeLog: + git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog + +dist-hook: ChangeLog + $(MKDIR_P) $(distdir)/tools + cp ${top_srcdir}/tools/install-decoders $(distdir)/tools + $(MKDIR_P) $(distdir)/decoders + ${top_srcdir}/tools/install-decoders -i ${top_srcdir}/decoders \ + -o $(distdir)/decoders + +install-decoders: + $(MKDIR_P) $(DESTDIR)$(DECODERS_DIR) + $(PYTHON3) ${top_srcdir}/tools/install-decoders \ + -i ${top_srcdir}/decoders -o $(DESTDIR)$(DECODERS_DIR) + +install-data-hook: install-decoders