r232 - trunk/rott
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat May 24 03:19:38 EDT 2008
Author: jwrdegoede
Date: 2008-05-24 03:19:38 -0400 (Sat, 24 May 2008)
New Revision: 232
Modified:
trunk/rott/Makefile
trunk/rott/_rt_ted.h
trunk/rott/rt_def.h
trunk/rott/rt_main.c
Log:
Allow overriding CFLAGS without loosing root specific flags / defines, add LDFLAGS makefile variable, add DATADIR define to allow specifying rott datafiles install location
Modified: trunk/rott/Makefile
===================================================================
--- trunk/rott/Makefile 2008-05-24 06:45:26 UTC (rev 231)
+++ trunk/rott/Makefile 2008-05-24 07:19:38 UTC (rev 232)
@@ -47,13 +47,18 @@
CC = gcc
-CFLAGS = -g $(SDL_CFLAGS) -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused -Wno-pointer-sign $(EXTRACFLAGS)
-LDLIBS = $(SDL_LDFLAGS) -lSDL -lSDL_mixer $(EXTRALDFLAGS) -Wl,-E
+CFLAGS += -g -W -Wall -Wno-unused -Wno-pointer-sign
+ALL_CFLAGS = $(SDL_CFLAGS) -DUSE_SDL=1 -DPLATFORM_UNIX=1 $(CFLAGS) $(EXTRACFLAGS)
+LDFLAGS += -Wl,-E
+LDLIBS = $(LDFLAGS) $(SDL_LDFLAGS) -lSDL -lSDL_mixer $(EXTRALDFLAGS)
+%.o: %.c
+ $(CC) $(ALL_CFLAGS) -c $< -o $@
+
all: rott
audiolib/audiolib.a:
- $(MAKE) -C audiolib CC="$(CC)" CFLAGS="$(CFLAGS)" LDLIBS="$(LDLIBS)"
+ $(MAKE) -C audiolib CC="$(CC)" CFLAGS="$(ALL_CFLAGS)" LDLIBS="$(LDLIBS)"
rott: \
cin_actr.o \
Modified: trunk/rott/_rt_ted.h
===================================================================
--- trunk/rott/_rt_ted.h 2008-05-24 06:45:26 UTC (rev 231)
+++ trunk/rott/_rt_ted.h 2008-05-24 07:19:38 UTC (rev 232)
@@ -85,17 +85,17 @@
#define MAXSILLYSTRINGS 32
#if (SHAREWARE==0)
- #define STANDARDGAMELEVELS ("DARKWAR.RTL")
+ #define STANDARDGAMELEVELS (DATADIR "DARKWAR.RTL")
#if (SUPERROTT==1)
- #define STANDARDBATTLELEVELS ("ROTTCD.RTC")
+ #define STANDARDBATTLELEVELS (DATADIR "ROTTCD.RTC")
#elif (SITELICENSE==1)
- #define STANDARDBATTLELEVELS ("ROTTSITE.RTC")
+ #define STANDARDBATTLELEVELS (DATADIR "ROTTSITE.RTC")
#else
- #define STANDARDBATTLELEVELS ("DARKWAR.RTC")
+ #define STANDARDBATTLELEVELS (DATADIR "DARKWAR.RTC")
#endif
#else
- #define STANDARDGAMELEVELS ("HUNTBGIN.RTL")
- #define STANDARDBATTLELEVELS ("HUNTBGIN.RTC")
+ #define STANDARDGAMELEVELS (DATADIR "HUNTBGIN.RTL")
+ #define STANDARDBATTLELEVELS (DATADIR "HUNTBGIN.RTC")
#endif
Modified: trunk/rott/rt_def.h
===================================================================
--- trunk/rott/rt_def.h 2008-05-24 06:45:26 UTC (rev 231)
+++ trunk/rott/rt_def.h 2008-05-24 07:19:38 UTC (rev 232)
@@ -84,6 +84,10 @@
//
//***************************************************************************
+#ifndef DATADIR
+#define DATADIR ""
+#endif
+
#undef PI
#undef M_PI
Modified: trunk/rott/rt_main.c
===================================================================
--- trunk/rott/rt_main.c 2008-05-24 06:45:26 UTC (rev 231)
+++ trunk/rott/rt_main.c 2008-05-24 07:19:38 UTC (rev 232)
@@ -968,9 +968,9 @@
// Normal ROTT wads
#if (SHAREWARE)
- newargs [argnum++] = "huntbgin.wad";
+ newargs [argnum++] = DATADIR "HUNTBGIN.WAD";
#else
- newargs [argnum++] = "darkwar.wad";
+ newargs [argnum++] = DATADIR "DARKWAR.WAD";
#endif
// newargs [argnum++] = "credits.wad";
@@ -990,7 +990,7 @@
}
else
{
- newargs [argnum++] = "remote1.rts";
+ newargs [argnum++] = DATADIR "REMOTE1.RTS";
}
newargs [argnum++] = NULL;
More information about the rott-commits
mailing list