--- ./Makefile.orig	Sun Jan 21 16:03:40 2007
+++ ./Makefile	Sun Jan 21 16:14:19 2007
@@ -12,8 +12,6 @@
 
 # this nice line comes from the linux kernel makefile
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc/ -e s/sparc64/sparc/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/alpha/axp/)
-MARCH :=$(shell uname -m)
-
 
 VERSION=0.16
 BINDIR=quake
@@ -21,14 +19,14 @@
 BUILD_DEBUG_DIR=debug_build
 BUILD_RELEASE_DIR=release_build
 
-BUILD_DEMONQUAKE=YES          # DemonQuake glx executable (uses oss for cdrom and sound)
-BUILD_DEMONQUAKE_SDL=YES      # DemonQuake sdl glx executable (uses SDL for cdrom and sound)
-BUILD_DZIP=YES                # Dzip binary for compress/uncompress demos
+BUILD_DEMONQUAKE?=NO          # DemonQuake glx executable (uses oss for cdrom and sound)
+BUILD_DEMONQUAKE_SDL?=NO      # DemonQuake sdl glx executable (uses SDL for cdrom and sound)
+BUILD_DZIP?=NO                # Dzip binary for compress/uncompress demos
 
 # Use DATADIR for reading and ~/.demonquake 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=.demonquake
 
@@ -36,33 +34,26 @@
 WITH_FMOD=NO                  # Fmod Sound support
 endif
 
-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
+X11BASE?=/usr/X11R6
 SYSBINDIR=$(LOCALBASE)/bin
-DATADIR= $(GAMEBASE)/games/quake
-
-ifeq ($(ARCH),x86_64)
- ARCH_LIBDIR=64
-endif
+DATADIR?=$(Q2DIR)
 
 # 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+= \
+	      $(CFLAGS) \
              -I$(LOCALBASE)/include \
              -I$(X11BASE)/include \
              -DGLQUAKE
-ifeq ($(ARCH),i386)
- BASE_CFLAGS+=-march=$(MARCH)
-endif
 	    
 DEBUG_CFLAGS=$(BASE_CFLAGS) -g -ggdb -Wall
 RELEASE_CFLAGS+=$(BASE_CFLAGS)\
