summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2009-07-11 12:26:15 +0000
committerSimon Howard2009-07-11 12:26:15 +0000
commit04911de6b34fe139214d7cc2893d2b1e8eb6ac44 (patch)
tree9021e39deb6805336abb7579de4687f062c794e3
parent7c9dcf6db6b123b046a37270cd1e961a9986e814 (diff)
downloadchocolate-doom-04911de6b34fe139214d7cc2893d2b1e8eb6ac44.tar.gz
chocolate-doom-04911de6b34fe139214d7cc2893d2b1e8eb6ac44.tar.bz2
chocolate-doom-04911de6b34fe139214d7cc2893d2b1e8eb6ac44.zip
Generate programs with names based on PROGRAM_PREFIX.
Subversion-branch: /branches/raven-branch Subversion-revision: 1617
-rw-r--r--configure.in11
-rw-r--r--src/Makefile.am38
2 files changed, 28 insertions, 21 deletions
diff --git a/configure.in b/configure.in
index d4ebafab..16c7df8a 100644
--- a/configure.in
+++ b/configure.in
@@ -84,8 +84,15 @@ AM_INIT_AUTOMAKE([1.8.0])
WINDOWS_RC_VERSION=`echo $PACKAGE_VERSION.0 | sed 's/\./, /g' `
-AC_DEFINE(PROGRAM_PREFIX, "chocolate-",
- Change this when you create your awesome forked version)
+# This controls the prefix added to the start of program names. For example,
+# if this is changed to "lemon-", the programs generated will be named
+# lemon-doom, lemon-heretic, etc.
+
+PROGRAM_PREFIX=chocolate-
+
+AC_SUBST(PROGRAM_PREFIX)
+AC_DEFINE_UNQUOTED(PROGRAM_PREFIX, "$PROGRAM_PREFIX",
+ Change this when you create your awesome forked version)
AM_CONFIG_HEADER(config.h:config.hin)
diff --git a/src/Makefile.am b/src/Makefile.am
index b0662395..b84f0b29 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,11 +3,11 @@ SUBDIRS=doom heretic hexen setup
gamesdir = $(prefix)/games
-games_PROGRAMS = chocolate-doom \
- chocolate-heretic \
- chocolate-hexen \
- chocolate-server \
- chocolate-setup
+games_PROGRAMS = @PROGRAM_PREFIX@doom \
+ @PROGRAM_PREFIX@heretic \
+ @PROGRAM_PREFIX@hexen \
+ @PROGRAM_PREFIX@server \
+ @PROGRAM_PREFIX@setup
AM_CFLAGS = -I$(top_builddir)/textscreen \
-I$(top_builddir)/pcsound \
@@ -36,8 +36,8 @@ net_server.c net_server.h \
net_structrw.c net_structrw.h \
z_native.c z_zone.h
-chocolate_server_SOURCES=$(COMMON_SOURCE_FILES) $(DEDSERV_FILES)
-chocolate_server_LDADD = $(top_builddir)/wince/libc_wince.a \
+@PROGRAM_PREFIX@server_SOURCES=$(COMMON_SOURCE_FILES) $(DEDSERV_FILES)
+@PROGRAM_PREFIX@server_LDADD = $(top_builddir)/wince/libc_wince.a \
@LDFLAGS@ @SDLNET_LIBS@
# Source files used by the game binaries (chocolate-doom, etc.)
@@ -128,28 +128,28 @@ EXTRA_LIBS = \
@SDLNET_LIBS@
if HAVE_WINDRES
-chocolate_doom_SOURCES=$(SOURCE_FILES) resource.rc
+@PROGRAM_PREFIX@doom_SOURCES=$(SOURCE_FILES) resource.rc
else
-chocolate_doom_SOURCES=$(SOURCE_FILES)
+@PROGRAM_PREFIX@doom_SOURCES=$(SOURCE_FILES)
endif
-chocolate_doom_LDADD = doom/libdoom.a $(EXTRA_LIBS)
+@PROGRAM_PREFIX@doom_LDADD = doom/libdoom.a $(EXTRA_LIBS)
if HAVE_WINDRES
-chocolate_heretic_SOURCES=$(SOURCE_FILES) resource.rc
+@PROGRAM_PREFIX@heretic_SOURCES=$(SOURCE_FILES) resource.rc
else
-chocolate_heretic_SOURCES=$(SOURCE_FILES)
+@PROGRAM_PREFIX@heretic_SOURCES=$(SOURCE_FILES)
endif
-chocolate_heretic_LDADD = heretic/libheretic.a $(EXTRA_LIBS)
+@PROGRAM_PREFIX@heretic_LDADD = heretic/libheretic.a $(EXTRA_LIBS)
if HAVE_WINDRES
-chocolate_hexen_SOURCES=$(SOURCE_FILES) resource.rc
+@PROGRAM_PREFIX@hexen_SOURCES=$(SOURCE_FILES) resource.rc
else
-chocolate_hexen_SOURCES=$(SOURCE_FILES)
+@PROGRAM_PREFIX@hexen_SOURCES=$(SOURCE_FILES)
endif
-chocolate_hexen_LDADD = hexen/libhexen.a $(EXTRA_LIBS)
+@PROGRAM_PREFIX@hexen_LDADD = hexen/libhexen.a $(EXTRA_LIBS)
# Source files needed for chocolate-setup:
@@ -162,11 +162,11 @@ m_controls.c m_controls.h \
z_native.c z_zone.h
if HAVE_WINDRES
-chocolate_setup_SOURCES=$(SETUP_FILES) $(COMMON_SOURCE_FILES) setup-res.rc
+@PROGRAM_PREFIX@setup_SOURCES=$(SETUP_FILES) $(COMMON_SOURCE_FILES) setup-res.rc
else
-chocolate_setup_SOURCES=$(SETUP_FILES) $(COMMON_SOURCE_FILES)
+@PROGRAM_PREFIX@setup_SOURCES=$(SETUP_FILES) $(COMMON_SOURCE_FILES)
endif
-chocolate_setup_LDADD = setup/libsetup.a \
+@PROGRAM_PREFIX@setup_LDADD = setup/libsetup.a \
$(top_builddir)/wince/libc_wince.a \
$(top_builddir)/textscreen/libtextscreen.a \
@LDFLAGS@ @SDL_LIBS@ @SDLNET_LIBS@