1
0

Simplify buildsystem

This rolls everything into one Makefile.am and fixes
`make distcheck`.
This commit is contained in:
Hans-Joerg Schurr 2020-05-30 21:47:13 +02:00
parent 127875a0e4
commit a0873c9369
5 changed files with 81 additions and 73 deletions

3
.gitignore vendored
View File

@ -18,6 +18,8 @@ src/config.h*
src/stamp-h1 src/stamp-h1
src/src src/src
docs/html docs/html
.deps
ar-lib
.gdb_history .gdb_history
doxyfile.stamp doxyfile.stamp
@ -32,6 +34,7 @@ config.status
configure configure
depcomp depcomp
hvif hvif
libhviflight.a
install-sh install-sh
missing missing
.cquery .cquery

View File

@ -1,4 +1,77 @@
dist_data_DATA = README.md LICENSE NULL =
include docs/Makefile.am bin_PROGRAMS = hvif
include src/Makefile.am lib_LIBRARIES = libhviflight.a
# hvif configuration
hvif_CFLAGS = \
$(AM_CFLAGS) \
$(CAIRO_CFLAGS) \
$(NULL)
hvif_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_builddir)/src \
$(NULL)
hvif_LDADD = \
$(AM_LDADD) \
$(CAIRO_LIBS) \
-lm \
libhviflight.a \
$(NULL)
# libhviflight.a configuration
libhviflight_a_CFLAGS = \
$(AM_CFLAGS) \
$(CAIRO_CFLAGS) \
$(NULL)
libhviflight_a_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_builddir)/src \
$(NULL)
libhviflight_a_LIBADD = \
$(AM_LIBAD) \
$(NULL)
libhviflight_a_SOURCES = \
$(BUILT_SOURCES) \
src/hvif-light.c \
src/hvif-light.h \
src/hvif-cairo.c \
src/hvif-cairo.h \
$(NULL)
hvif_SOURCES = \
$(BUILT_SOURCES) \
src/main.c \
src/hvif-light.h \
src/hvif-cairo.h \
$(NULL)
cquery:
echo '%clang' > .cquery
echo '%c -std=gnu11' >> .cquery
echo '$(CAIRO_CFLAGS)' | sed "s/ /\\n/g" >> .cquery
.PHONY: cquery
EXTRA_DIST = \
README.md \
LICENSE \
docs/examples/ICON_LICENSE \
docs/examples/File_GoogleFS_hviflight.png \
docs/examples/File_GoogleFS_orig.png \
src/config.h.in
if HAVE_DOXYGEN
doxyfile.stamp:
$(DOXYGEN) $(top_builddir)/docs/Doxyfile
echo Timestamp > doxyfile.stamp
CLEANFILES = doxyfile.stamp
html-local: doxyfile.stamp
clean-local:
rm -rf $(top_builddir)/docs/html
endif

View File

@ -4,7 +4,7 @@
AC_PREREQ([2.69]) AC_PREREQ([2.69])
AC_INIT([hvif-light], [0.0.1], [commits@schurr.at]) AC_INIT([hvif-light], [0.0.1], [commits@schurr.at])
AC_CONFIG_MACRO_DIR(m4) AC_CONFIG_MACRO_DIR(m4)
AM_INIT_AUTOMAKE([subdir-objects foreign 1.13]) AM_INIT_AUTOMAKE([subdir-objects foreign 1.16])
AM_SILENT_RULES([yes]) AM_SILENT_RULES([yes])
AC_CONFIG_SRCDIR([src/hvif-light.h]) AC_CONFIG_SRCDIR([src/hvif-light.h])
AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_HEADERS([src/config.h])
@ -58,7 +58,7 @@ else
CPPFLAGS+=" -DNDEBUG" CPPFLAGS+=" -DNDEBUG"
fi fi
AC_CONFIG_FILES([Makefile src/Makefile]) AC_CONFIG_FILES([Makefile])
# Documentation # Documentation
AC_CHECK_PROGS([DOXYGEN], [doxygen]) AC_CHECK_PROGS([DOXYGEN], [doxygen])

View File

@ -1,13 +0,0 @@
if HAVE_DOXYGEN
doxyfile.stamp:
$(DOXYGEN) $(top_builddir)/docs/Doxyfile
echo Timestamp > doxyfile.stamp
CLEANFILES = doxyfile.stamp
html-local: doxyfile.stamp
clean-local:
rm -rf $(top_builddir)/docs/html
endif

View File

@ -1,55 +0,0 @@
NULL =
bin_PROGRAMS = hvif
lib_LIBRARIES = libhviflight.a
# hvif configuration
hvif_CFLAGS = \
$(AM_CFLAGS) \
$(CAIRO_CFLAGS) \
$(NULL)
hvif_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_builddir)/src \
$(NULL)
hvif_LDADD = \
$(AM_LDADD) \
$(CAIRO_LIBS) \
-lm \
libhviflight.a \
$(NULL)
# libhviflight.a configuration
libhviflight_a_CFLAGS = \
$(AM_CFLAGS) \
$(CAIRO_CFLAGS) \
$(NULL)
libhviflight_a_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_builddir)/src \
$(NULL)
libhviflight_a_LIBADD = \
$(AM_LIBAD) \
$(NULL)
libhviflight_a_SOURCES = \
$(BUILT_SOURCES) \
src/hvif-light.c \
src/hvif-light.h \
src/hvif-cairo.c \
src/hvif-cairo.h \
$(NULL)
hvif_SOURCES = \
$(BUILT_SOURCES) \
src/main.c \
src/hvif-light.h \
src/hvif-cairo.h \
$(NULL)
cquery:
echo '%clang' > .cquery
echo '%c -std=gnu11' >> .cquery
echo '$(CAIRO_CFLAGS)' | sed "s/ /\\n/g" >> .cquery
.PHONY: cquery