summaryrefslogtreecommitdiff
path: root/games/tremor/files/patch-Makefile
blob: 033c8838a70d8c6ea2155d244df49396aa27126e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
--- ./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