From 1162ae833973fa81f0599b93a944672feb1bb982 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 26 Jul 2013 18:53:52 -0400 Subject: Add autotools files. --- Makefile.am | 19 +++++++++++++++++++ autogen.sh | 3 +++ configure.ac | 23 +++++++++++++++++++++++ env.in | 14 ++++++++++++++ guile.am | 19 +++++++++++++++++++ 5 files changed, 78 insertions(+) create mode 100644 Makefile.am create mode 100755 autogen.sh create mode 100644 configure.ac create mode 100644 env.in create mode 100644 guile.am diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..19f9992 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,19 @@ +include guile.am + +moddir=$(prefix)/share/guile/site/2.0 +godir=$(libdir)/guile/2.0/ccache + +SOURCES = \ + 2d/agenda.scm\ + 2d/animation.scm\ + 2d/coroutine.scm\ + 2d/game-loop.scm\ + 2d/gl.scm\ + 2d/helpers.scm\ + 2d/math.scm\ + 2d/sprite.scm\ + 2d/texture.scm\ + 2d/vector.scm\ + 2d/window.scm + +EXTRA_DIST += env.in diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..e756b42 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,3 @@ +#! /bin/sh + +autoreconf -vif diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..dbf869d --- /dev/null +++ b/configure.ac @@ -0,0 +1,23 @@ +dnl -*- Autoconf -*- + +AC_INIT(guile-2d, 0.1.0) +AC_CONFIG_SRCDIR(2d) +AC_CONFIG_AUX_DIR([build-aux]) +AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability foreign]) +AM_SILENT_RULES([yes]) + +GUILE_PROGS + +if $GUILE_TOOLS | grep -q compile; then + # everything cool + true +else + AC_MSG_ERROR([Guile 2.0 required.]) +fi + +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([env], [chmod +x env]) + +PKG_CHECK_MODULES([SDL], [sdl <= 1.3 sdl >= 1.2]) + +AC_OUTPUT diff --git a/env.in b/env.in new file mode 100644 index 0000000..db507ca --- /dev/null +++ b/env.in @@ -0,0 +1,14 @@ +#!/bin/sh + +GUILE_LOAD_PATH=@abs_top_srcdir@:$GUILE_LOAD_PATH +if test "@abs_top_srcdir@" != "@abs_top_builddir@"; then + GUILE_LOAD_PATH=@abs_top_builddir@:$GUILE_LOAD_PATH +fi +GUILE_LOAD_COMPILED_PATH=@abs_top_builddir@:$GUILE_LOAD_PATH +PATH=@abs_top_builddir@/bin:$PATH + +export GUILE_LOAD_PATH +export GUILE_LOAD_COMPILED_PATH +export PATH + +exec "$@" diff --git a/guile.am b/guile.am new file mode 100644 index 0000000..dc1e63f --- /dev/null +++ b/guile.am @@ -0,0 +1,19 @@ +GOBJECTS = $(SOURCES:%.scm=%.go) + +nobase_mod_DATA = $(SOURCES) $(NOCOMP_SOURCES) +nobase_go_DATA = $(GOBJECTS) + +# Make sure source files are installed first, so that the mtime of +# installed compiled files is greater than that of installed source +# files. See +# +# for details. +guile_install_go_files = install-nobase_goDATA +$(guile_install_go_files): install-nobase_modDATA + +CLEANFILES = $(GOBJECTS) +EXTRA_DIST = $(SOURCES) $(NOCOMP_SOURCES) +GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat +SUFFIXES = .scm .go +.scm.go: + $(AM_V_GEN)$(top_builddir)/env $(GUILE_TOOLS) compile $(GUILE_WARNINGS) -o "$@" "$<" -- cgit v1.2.3