]> git.draconx.ca Git - liblbx.git/commitdiff
build: Flatten the build system.
authorNick Bowler <nbowler@draconx.ca>
Sat, 23 Mar 2013 15:47:35 +0000 (11:47 -0400)
committerNick Bowler <nbowler@draconx.ca>
Sat, 23 Mar 2013 15:47:35 +0000 (11:47 -0400)
Move everything into a single Makefile.am so that it's all in one place.

Makefile.am
doc/Makefile.inc [deleted file]
src/Makefile.inc [deleted file]
src/gui/Makefile.inc [deleted file]

index 7be6e9c6f72c7fe08659ed59cf6bb95c36863db1..0eaf49e2b2590a1e4e51ffacd93509f2d4b32661 100644 (file)
@@ -1,25 +1,61 @@
-# 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 -I common/m4
 
-EXTRA_DIST       = m4/gnulib-cache.m4
-CLEANFILES       =
-MOSTLYCLEANFILES =
+EXTRA_DIST         = m4/gnulib-cache.m4
+CLEANFILES         =
+MOSTLYCLEANFILES   =
+noinst_LTLIBRARIES =
 
 AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib
 
-dist_man_MANS      =
-dist_doc_DATA      =
-noinst_HEADERS     =
-lib_LTLIBRARIES    =
-noinst_LTLIBRARIES =
-bin_PROGRAMS       =
+dist_man_MANS = doc/man/lbxtool.1 doc/man/lbximg.1
+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
+
+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
+if BUILD_LBXIMG
+bin_PROGRAMS += lbximg
+endif
+if BUILD_LBXGUI
+bin_PROGRAMS += lbxgui
+endif
+
+lbxtool_SOURCES = src/lbxtool.c
+lbxtool_LDADD = liblbx.la libgnu.la
+$(lbxtool_OBJECTS): $(gnulib_headers)
+
+lbximg_SOURCES = src/lbximg.c
+lbximg_LDADD = liblbx.la libgnu.la $(LIBPNG_LIBS)
+lbximg_CFLAGS = $(LIBPNG_CFLAGS)
+$(lbximg_OBJECTS): $(gnulib_headers)
+
+nodist_lbxgui_SOURCES = src/gui/lbxgui_xml.c
+lbxgui_SOURCES = src/gui/lbxgui.c src/gui/render.c src/gui/render.h \
+       src/gui/bg.xbm
+lbxgui_LDADD = liblbx.la $(GTK_LIBS)
+lbxgui_CPPFLAGS = -I$(top_srcdir)/src
+lbxgui_CFLAGS = $(GTK_CFLAGS)
+lbxgui_LDFLAGS = $(AM_LDFLAGS) -export-dynamic
+
+src/gui/lbxgui_xml.c: src/gui/lbxgui.glade
+       $(AM_V_GEN) sed -e 's/"/\\"/g' \
+                       -e 's/.*/"&"/' \
+                       -e '1 s/^/char lbxgui_xml[] =\n/' \
+                       -e '$$ s/$$/;/' $? > $@
+
+CLEANFILES += src/gui/lbxgui_xml.c
+EXTRA_DIST += src/gui/lbxgui.glade
 
-include doc/Makefile.inc
-include src/Makefile.inc
-include src/gui/Makefile.inc
 include lib/gnulib.mk
diff --git a/doc/Makefile.inc b/doc/Makefile.inc
deleted file mode 100644 (file)
index 1e4ee37..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright (C) 2009 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.
-
-dist_man_MANS += doc/man/lbxtool.1
-
-if BUILD_LBXIMG
-dist_man_MANS += doc/man/lbximg.1
-endif
-
-dist_doc_DATA += doc/txt/moo2-data.txt
diff --git a/src/Makefile.inc b/src/Makefile.inc
deleted file mode 100644 (file)
index 0200866..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2009 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.
-
-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
-
-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
-lbxtool_SOURCES  = src/lbxtool.c
-lbxtool_LDADD    = liblbx.la libgnu.la
-$(lbxtool_OBJECTS): $(gnulib_headers)
-
-if BUILD_LBXIMG
-bin_PROGRAMS   += lbximg
-lbximg_SOURCES  = src/lbximg.c
-lbximg_LDADD    = liblbx.la libgnu.la $(LIBPNG_LIBS)
-lbximg_CFLAGS   = $(LIBPNG_CFLAGS)
-$(lbximg_OBJECTS): $(gnulib_headers)
-endif
diff --git a/src/gui/Makefile.inc b/src/gui/Makefile.inc
deleted file mode 100644 (file)
index ef14cf8..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (C) 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.
-
-if BUILD_LBXGUI
-
-LBXGUI_GLADE    = $(top_srcdir)/src/gui/lbxgui.glade
-EXTRA_DIST     += $(LBXGUI_GLADE)
-CLEANFILES     += src/gui/lbxgui_xml.c
-
-noinst_HEADERS += src/gui/bg.xbm src/gui/render.h
-
-src/gui/lbxgui_xml.c: $(LBXGUI_GLADE)
-       $(AM_V_GEN) sed -e 's/"/\\"/g' \
-                       -e 's/.*/"&"/' \
-                       -e '1 s/^/char lbxgui_xml[] =\n/' \
-                       -e '$$ s/$$/;/' $(LBXGUI_GLADE) > $@
-
-bin_PROGRAMS += lbxgui
-nodist_lbxgui_SOURCES = src/gui/lbxgui_xml.c
-lbxgui_SOURCES        = src/gui/render.c src/gui/lbxgui.c
-lbxgui_LDADD          = liblbx.la $(GTK_LIBS)
-lbxgui_CPPFLAGS       = -I$(top_srcdir)/src
-lbxgui_CFLAGS         = $(GTK_CFLAGS)
-lbxgui_LDFLAGS        = $(AM_LDFLAGS) -export-dynamic
-
-endif