X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=Makefile.am;h=cd93059a68392f8bee8d99f5323c3aaa467e2398;hp=0d33f533bec5aec7bfe454f14fcd4693241cfa36;hb=583001b3f16795abd24278fbb2e5232a7ca27fb0;hpb=7eb90f2304e10d13281d47d944168fe40a77e6d6 diff --git a/Makefile.am b/Makefile.am index 0d33f53..cd93059 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,13 +20,18 @@ ACLOCAL_AMFLAGS = -I m4 AM_LIBTOOLFLAGS = --silent -MAKEFLAGS = --no-print-directory +GNUMAKEFLAGS = --no-print-directory DECODERS_DIR = $(pkgdatadir)/decoders -AM_CPPFLAGS = -D_POSIX_C_SOURCE=200112L -DDECODERS_DIR='"$(DECODERS_DIR)"' +# Do not hard-code the decoders location on Windows. +if WIN32 +AM_CPPFLAGS = +else +AM_CPPFLAGS = -DDECODERS_DIR='"$(DECODERS_DIR)"' +endif -# The check CFLAGS are a superset of the libsigrokdecode CFLAGS. -AM_CFLAGS = $(SRD_EXTRA_CFLAGS) $(SRD_WFLAGS) $(CHECK_CFLAGS) +# The tests CFLAGS are a superset of the libsigrokdecode CFLAGS. +AM_CFLAGS = $(SRD_EXTRA_CFLAGS) $(SRD_WFLAGS) $(TESTS_CFLAGS) lib_LTLIBRARIES = libsigrokdecode.la @@ -70,15 +75,15 @@ tests_main_SOURCES = \ tests/inst.c \ tests/session.c -tests_main_CPPFLAGS = -D_POSIX_C_SOURCE=200112L -DDECODERS_DIR='"$(abs_top_srcdir)/decoders"' -tests_main_LDADD = libsigrokdecode.la $(SRD_EXTRA_LIBS) $(CHECK_LIBS) +tests_main_CPPFLAGS = -DDECODERS_DIR='"$(abs_top_srcdir)/decoders"' +tests_main_LDADD = libsigrokdecode.la $(SRD_EXTRA_LIBS) $(TESTS_LIBS) MAINTAINERCLEANFILES = ChangeLog .PHONY: ChangeLog install-decoders ChangeLog: - git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog + git --git-dir '$(top_srcdir)/.git' log >$@ || touch $@ dist-hook: ChangeLog $(MKDIR_P) $(distdir)/tools