From 4f802a421dd3ad20c94ba0744e7fb53744b7f096 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Wed, 11 Aug 2010 16:18:37 +0000 Subject: [PATCH] Add a few more autotools rules. --- configure.ac | 8 +++++++- tools/Makefile.am | 13 ++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 6e12e562..d4592e36 100644 --- a/configure.ac +++ b/configure.ac @@ -34,7 +34,9 @@ fi dnl conditional builds AC_ARG_ENABLE(debug, - [ --enable-debug build debug versions of the library (default no)]) + [ --enable-debug build debug versions of the game (default no)]) +AC_ARG_ENABLE(release, + [ --enable-release build final release of the game (default no)]) AC_CHECK_HEADERS(stdio.h stdarg.h inttypes.h endian.h stdint.h getopt.h) @@ -69,6 +71,10 @@ if test "${enable_debug}" = "yes"; then AC_DEFINE(DEBUG, 1, Define to 1 to activate debug) fi +if test "${enable_release}" = "yes"; then + AC_DEFINE(FINAL_RELEASE, 1, Define to 1 to activate final release) +fi + AC_SUBST(MATH_LIBS) AC_CONFIG_FILES([ diff --git a/tools/Makefile.am b/tools/Makefile.am index b6371ee3..44711721 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,12 +1,7 @@ -all: make-font +noinst_PROGRAMS = make-font -make-font: make-font.o - g++ -g -Wall -O3 $^ -o $@ `pkg-config --libs caca` - -%.o: %.cpp - g++ -g -Wall -O3 -c $^ -o $@ `pkg-config --cflags caca` - -clean: - rm -f *.o make-font +make_font_SOURCES = make-font.cpp +make_font_CXXFLAGS = `pkg-config --cflags caca` +make_font_LDFLAGS = `pkg-config --libs caca`