--- ./Makefile.orig 2007-01-17 10:19:35.000000000 +0100 +++ ./Makefile 2008-04-13 17:38:19.000000000 +0200 @@ -21,51 +21,42 @@ BUILD_DEBUG_DIR=debug_build BUILD_RELEASE_DIR=release_build -BUILD_TREMOR=YES # Tremor glx executable (uses ioctl's for cdrom and oss for sound). -BUILD_TREMOR_SDL=YES # Tremor sdl glx executable (uses SDL for cdrom and sound). -BUILD_DZIP=NO # Dzip binary for compress/uncompress demos +BUILD_TREMOR?=NO # Tremor glx executable (uses ioctl's for cdrom and oss for sound). +BUILD_TREMOR_SDL?=NO # Tremor sdl glx executable (uses SDL for cdrom and sound). +BUILD_DZIP?=NO # Dzip binary for compress/uncompress demos ifeq ($(OSTYPE),linux) WITH_FMOD=NO # Use FMOD library for ingame music, no tested endif # Use DATADIR for reading and ~/.tremor for writting. -WITH_DATADIR=NO +WITH_DATADIR=YES # The next option is required when DATADIR is set to YES, Use ~/ for writing, instead of . -WITH_HOMEDIR=NO +WITH_HOMEDIR=YES # Directory within $HOME to write to HOMEDIR=.tremor -CC=gcc +CC?=gcc CC_VERSION=$(shell $(CC) -dumpversion | sed -e 's/\..*//g') CC_VERSION_NUM=$(shell $(CC) -dumpversion) -OPTIMIZE=NO # Enable Optimization, release build only. +OPTIMIZE?=NO # Enable Optimization, release build only. STRIP=NO # Remove symbols from binaries, reduce size. VERBOSE=NO -LOCALBASE= /usr/local -GAMEBASE= /usr/local -X11BASE=/usr/X11R6 +LOCALBASE?=/usr/local +GAMEBASE=$(LOCALBASE) SYSBINDIR=$(LOCALBASE)/bin -DATADIR= $(GAMEBASE)/games/quake - -ifeq ($(ARCH),x86_64) - ARCH_LIBDIR=64 -endif +DATADIR=$(Q1DIR) # Seems that gcc 4.0 has some issues with -march option here, so i added it by default. # Feel free to remove it. -BASE_CFLAGS+= \ +BASE_CFLAGS+= $(CFLAGS) \ -I$(LOCALBASE)/include \ - -I$(X11BASE)/include \ -Dstricmp=strcasecmp \ -DGLQUAKE -ifeq ($(ARCH),i386) - BASE_CFLAGS+=-march=$(MARCH) -endif - + DEBUG_CFLAGS=$(BASE_CFLAGS) -g -ggdb -Wall RELEASE_CFLAGS+=$(BASE_CFLAGS) \ -fno-strict-aliasing \ @@ -76,9 +67,6 @@ -falign-loops=2 \ -falign-jumps=2 \ -falign-functions=2 - ifeq ($(ARCH),i386) - RELEASE_CFLAGS+=-march=$(MARCH) - endif endif ifeq ($(strip $(STRIP)),YES) @@ -102,12 +90,11 @@ X_LDFLAGS=-L$(X11BASE)/lib$(ARCH_LIBDIR) \ -lX11 -lXext -lXxf86vm -lXxf86dga -GLX_LDFLAGS=-L$(X11BASE)/lib$(ARCH_LIBDIR) \ - -L$(LOCALBASE)/lib$(ARCH_LIBDIR) \ +GLX_LDFLAGS=-L$(LOCALBASE)/lib$(ARCH_LIBDIR) \ -lGL -lGLU -ljpeg `libpng-config --libs` -SDL_CONFIG=sdl-config +SDL_CONFIG?=sdl-config SDL_CFLAGS=$(shell $(SDL_CONFIG) --cflags) SDL_LDFLAGS=$(shell $(SDL_CONFIG) --libs) @@ -405,4 +392,4 @@ @echo @printf "Type tremor as user to start playing.\n" @echo ..... - @echo Done \ No newline at end of file + @echo Done