X-Git-Url: http://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/f228da9594290408ee03ffddbd01eadefbf06f1d..2f0e47fcf78aeae3bcd0e8126f2f33b98bd285e8:/Makefile.am diff --git a/Makefile.am b/Makefile.am index 13f6354..ccadd43 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,23 +1,81 @@ -# Copyright (C) 2009-2010 Nick Bowler -# Copying and distribution of this file, with or without modification, -# are permitted in any medium without royalty provided the copyright -# notice and this notice are preserved. This file is offered as-is, -# without any warranty. +# Copyright © 2009-2010, 2013 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. -ACLOCAL_AMFLAGS = -I m4 +AUTOMAKE_OPTIONS = parallel-tests color-tests +ACLOCAL_AMFLAGS = -I m4 -I common/m4 -EXTRA_DIST = m4/gnulib-cache.m4 +EXTRA_DIST = m4/gnulib-cache.m4 +CLEANFILES = +MOSTLYCLEANFILES = +noinst_LTLIBRARIES = -AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib -AM_LDFLAGS = -L$(top_builddir)/lib +AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib -I$(top_srcdir)/src +AM_CFLAGS = $(LIBPNG_CFLAGS) $(GTK_CFLAGS) -dist_man_MANS = -dist_doc_DATA = -noinst_HEADERS = -lib_LTLIBRARIES = -bin_PROGRAMS = +dist_man_MANS = doc/man/lbxtool.1 doc/man/lbximg.1 +dist_doc_DATA = doc/txt/moo2-data.txt -include doc/Makefile.inc -include src/Makefile.inc +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 -SUBDIRS = lib . +lib_LTLIBRARIES = liblbx.la +liblbx_la_SOURCES = src/lbx.c src/fops.c src/image.c src/pack.c src/error.c +liblbx_la_LDFLAGS = -export-symbols-regex '^lbx_' + +bin_PROGRAMS = lbxtool lbximg +if BUILD_LBXGUI +bin_PROGRAMS += lbxgui +endif + +lbxtool_SOURCES = src/lbxtool.c src/tools.c +lbxtool_LDADD = liblbx.la libgnu.la +$(lbxtool_OBJECTS): $(gnulib_headers) + +lbximg_SOURCES = src/lbximg.c src/tools.c src/pnm.c +lbximg_LDADD = liblbx.la libgnu.la $(LIBPNG_LIBS) +$(lbximg_OBJECTS): $(gnulib_headers) + +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 \ + 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 + +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 + +.xml.c: + $(AM_V_GEN) printf '%s\n' $(*F) | sed -e 's/[^[:alnum:]]/_/g' \ + -e 's/.*/const char &[] =/' > $@.tmp + $(AM_V_at) sed -e 's/\\/\\\\/g' \ + -e 's/"/\\"/g' \ + -e 's/.*/"&\\n"/' \ + -e '$$ s/$$/;/' $< >> $@.tmp + $(AM_V_at) mv -f $@.tmp $@ + +EXTRA_DIST += src/gui/lbxgui.glade.xml +CLEANFILES += src/gui/lbxgui.glade.c + +include lib/gnulib.mk