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
|
--- Makefile.orig Wed Jan 17 06:19:35 2007
+++ Makefile Wed Feb 14 15:40:17 2007
@@ -21,51 +21,44 @@
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)
+X11BASE?=/usr/X11R6
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 +69,6 @@
-falign-loops=2 \
-falign-jumps=2 \
-falign-functions=2
- ifeq ($(ARCH),i386)
- RELEASE_CFLAGS+=-march=$(MARCH)
- endif
endif
ifeq ($(strip $(STRIP)),YES)
@@ -107,7 +97,7 @@
-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 +395,4 @@
@echo
@printf "Type tremor as user to start playing.\n"
@echo .....
- @echo Done
\ No newline at end of file
+ @echo Done
|