X-Git-Url: https://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/955d03ee99a6b932b8b62bd0cbd7f505efddb9a2..HEAD:/Makefile.am diff --git a/Makefile.am b/Makefile.am index 101f774..e5c0d8b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,18 +1,22 @@ -# Copyright © 2009-2010, 2013 Nick Bowler +# Copyright © 2009-2010,2013-2014,2021 Nick Bowler # # License WTFPL2: Do What The Fuck You Want To Public License, version 2. # This is free software: you are free to do what the fuck you want to. # There is NO WARRANTY, to the extent permitted by law. -AUTOMAKE_OPTIONS = parallel-tests color-tests ACLOCAL_AMFLAGS = -I m4 -I common/m4 -EXTRA_DIST = m4/gnulib-cache.m4 -CLEANFILES = -MOSTLYCLEANFILES = -noinst_LTLIBRARIES = +# For Gnulib +MOSTLYCLEANFILES = +EXTRA_LTLIBRARIES = -AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib -I$(top_srcdir)/src +EXTRA_DIST = bootstrap $(DX_BASEDIR)/scripts/fix-gnulib.pl m4/gnulib-cache.m4 +CLEANFILES = $(EXTRA_LTLIBRARIES) +DISTCLEANFILES = + +AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib \ + -I$(top_builddir)/src -I$(top_srcdir)/src \ + -I$(top_srcdir)/common/src AM_CFLAGS = $(LIBPNG_CFLAGS) $(GTK_CFLAGS) dist_man_MANS = doc/man/lbxtool.1 doc/man/lbximg.1 @@ -20,10 +24,11 @@ dist_doc_DATA = doc/txt/moo2-data.txt lbxdir = $(includedir)/lbx lbx_HEADERS = src/lbx.h src/image.h src/error.h -noinst_HEADERS = src/misc.h src/tools.h src/pack.h +noinst_HEADERS = src/misc.h src/tools.h src/imgoutput.h common/src/help.h lib_LTLIBRARIES = liblbx.la -liblbx_la_SOURCES = src/lbx.c src/fops.c src/image.c src/pack.c src/error.c +liblbx_la_SOURCES = src/lbx.c src/fops.c src/image.c src/error.c \ + common/src/pack.c common/src/pack.h liblbx_la_LDFLAGS = -export-symbols-regex '^lbx_' bin_PROGRAMS = lbxtool lbximg @@ -31,42 +36,33 @@ if BUILD_LBXGUI bin_PROGRAMS += lbxgui endif -lbxtool_SOURCES = src/lbxtool.c src/tools.c +lbxtool_SOURCES = src/lbxtool.c src/tools.c common/src/help.c lbxtool_LDADD = liblbx.la libgnu.la $(lbxtool_OBJECTS): $(gnulib_headers) +$(lbxtool_OBJECTS): src/toolopts.h -lbximg_SOURCES = src/lbximg.c src/tools.c src/pnm.c +lbximg_SOURCES = src/lbximg.c src/tools.c src/pnm.c common/src/help.c lbximg_LDADD = liblbx.la libgnu.la $(LIBPNG_LIBS) $(lbximg_OBJECTS): $(gnulib_headers) +$(lbximg_OBJECTS): src/imgopts.h if HAVE_LIBPNG lbximg_SOURCES += src/png.c endif nodist_lbxgui_SOURCES = src/gui/lbxgui.glade.c -lbxgui_SOURCES = src/gui/lbxgui.c src/gui/render.c src/gui/render.h \ +lbxgui_SOURCES = src/gui/lbxgui.c src/gui/lbxgui.h src/gui/image.c \ src/gui/bg.xbm lbxgui_LDFLAGS = $(AM_LDFLAGS) -export-dynamic lbxgui_LDADD = liblbx.la $(GTK_LIBS) -TEST_EXTENSIONS = .tap - -TAP_LOG_COMPILER = $(SHELL) -TAP_LOG_DRIVER = AM_TAP_AWK='$(AWK)' \ - $(SHELL) $(srcdir)/tests/util/tap-driver.sh - -TESTS = tests/empty-image.tap tests/pam-formats.tap tests/moo2-mainmenu.tap \ - tests/moo2-logo.tap tests/moo2-starbg.tap tests/moo2-ships.tap \ - tests/moo2-monster.tap - -mostlyclean-local: clean-testdirs -clean-testdirs: - for dir in $(TESTS:.tap=.dir); do \ - case $$dir in \ - *.dir) rm -rf "$$dir" ;; \ - esac; \ - done -.PHONY: clean-testdirs +OPTFILES = src/toolopts.opt src/imgopts.opt +.opt.h: + $(AM_V_GEN) $(AWK) -f $(DX_BASEDIR)/scripts/gen-options.awk $< >$@.tmp + $(AM_V_at) mv -f $@.tmp $@ +$(OPTFILES:.opt=.h): $(DX_BASEDIR)/scripts/gen-options.awk +CLEANFILES += $(OPTFILES:.opt=.h) +EXTRA_DIST += $(DX_BASEDIR)/scripts/gen-options.awk $(OPTFILES) .xml.c: $(AM_V_GEN) printf '%s\n' $(*F) | sed -e 's/[^[:alnum:]]/_/g' \ @@ -80,4 +76,23 @@ clean-testdirs: EXTRA_DIST += src/gui/lbxgui.glade.xml CLEANFILES += src/gui/lbxgui.glade.c -include lib/gnulib.mk +atlocal: config.status + $(AM_V_GEN) :; { \ + printf ': "$${%s=%s}"\n' \ + datadir '$(datadir)' \ + LN_S '$(LN_S)' \ + MD5 '$(MD5)' \ + PAMARITH '$(PAMARITH)' \ + PAMCHANNEL '$(PAMCHANNEL)' \ + ; } >$@.tmp + $(AM_V_at) mv -f $@.tmp $@ +check_DATA = atlocal +CLEANFILES += atlocal + +# Data files used in test cases +dist_check_DATA = tests/testdata/image-0x0 tests/testdata/image-1x1 \ + tests/testdata/image-1x1-mt tests/testdata/palette-ramp \ + tests/testdata/arch-trunc.lbx + +include $(top_srcdir)/common/snippet/autotest.mk +include $(top_srcdir)/lib/gnulib.mk