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
99
100
101
102
103
104
105
106
107
|
$NetBSD: patch-ae,v 1.6 2002/01/02 10:01:35 hubertf Exp $
--- qw/makefile.linux.orig Wed Apr 21 20:16:24 1999
+++ qw/makefile.linux
@@ -27,41 +27,51 @@
RPMARCH=i386
endif
-MAINDIR=/grog/Projects/QW
-
-BUILD_DEBUG_DIR=debug$(ARCH)$(GLIBC)
-BUILD_RELEASE_DIR=release$(ARCH)$(GLIBC)
+#BUILD_DEBUG_DIR=debug$(ARCH)$(GLIBC)
+#BUILD_RELEASE_DIR=release$(ARCH)$(GLIBC)
+BUILD_DEBUG_DIR=debug_version
+BUILD_RELEASE_DIR=release_version
CLIENT_DIR=$(MAINDIR)/client
SERVER_DIR=$(MAINDIR)/server
-MESA_DIR=/usr/local/src/Mesa-3.0
+#MESA_DIR=/usr/local/src/Mesa-3.0
CC=gcc
-BASE_CFLAGS=-Wall -Dstricmp=strcasecmp -I$(CLIENT_DIR) -I$(SERVER_DIR)
+BASE_CFLAGS=-Wall -Dstricmp=strcasecmp -I$(CLIENT_DIR) -I$(SERVER_DIR) \
+ ${CFLAGS} -I${X11BASE}/include -O0
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
ifeq ($(ARCH),axp)
RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
-fomit-frame-pointer -fexpensive-optimizations
else
-RELEASE_CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \
+# Optimizer bug?!?!?
+#RELEASE_CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \
+# -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
+# -malign-jumps=2 -malign-functions=2
+RELEASE_CFLAGS=$(BASE_CFLAGS) -m486 -ffast-math -funroll-loops \
-fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
-malign-jumps=2 -malign-functions=2
endif
-GLCFLAGS=-DGLQUAKE -I/usr/local/src/Mesa-3.0/include -I/usr/include/glide
+GLCFLAGS=-DGLQUAKE -I${MESA_DIR}/include -I/usr/include/glide
-LDFLAGS=-lm
+LDFLAGS=-lm -lossaudio
SVGALDFLAGS=-lvga
-XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext
-GL_SVGA_LDFLAGS=-L/usr/X11/lib -L/usr/local/src/Mesa-3.0/lib -lm -lMesaGL -lglide2x -lX11 -lXext -lvga
-GL_X11_LDFLAGS=-L/usr/X11/lib -L/usr/local/src/Mesa-3.0/lib -lm -lGL -lX11 -lXext
+XLDFLAGS=-L${X11BASE}/lib -Wl,-rpath -Wl,${X11BASE}/lib -lX11 -lXext
+GL_SVGA_LDFLAGS=-L${X11BASE}/lib -Wl,-rpath -Wl,${X11BASE}/lib -L${MESA_DIR}/lib -Wl,-rpath -Wl,${MESA_DIR}/lib -lm -lMesaGL -lglide2x -lX11 -lXext -lvga
+GL_X11_LDFLAGS=-L${X11BASE}/lib -Wl,-rpath -Wl,${X11BASE}/lib -L${MESA_DIR}/lib -Wl,-rpath -Wl,${MESA_DIR}/lib -lm -lGL -lX11 -lXext
DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
-DO_O_CC=$(CC) -O $(CFLAGS) -o $@ -c $<
+#DO_O_CC=$(CC) -O $(CFLAGS) -o $@ -c $<
+DO_O_CC=$(CC) $(CFLAGS) -o $@ -c $<
DO_GL_CC=$(CC) $(CFLAGS) $(GLCFLAGS) -o $@ -c $<
DO_SERVER_CC=$(CC) -DSERVERONLY $(CFLAGS) -o $@ -c $<
-DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
-DO_GL_AS=$(CC) $(CFLAGS) $(GLCFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
+DO_AS=$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<
+#DO_AS=$(CC) $(CFLAGS) -DAOUT -x assembler-with-cpp -o $@ -c $<
+#DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
+DO_GL_AS=$(CC) $(CFLAGS) $(GLCFLAGS) -x assembler-with-cpp -o $@ -c $<
+#DO_GL_AS=$(CC) $(CFLAGS) $(GLCFLAGS) -DAOUT -x assembler-with-cpp -o $@ -c $<
+#DO_GL_AS=$(CC) $(CFLAGS) $(GLCFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
#############################################################################
# SETUP AND BUILD
@@ -71,7 +81,7 @@
TARGETS=$(BUILDDIR)/qwsv
#$(BUILDDIR)/qwcl.x11
else
-TARGETS=$(BUILDDIR)/qwsv $(BUILDDIR)/qwcl $(BUILDDIR)/qwcl.x11 $(BUILDDIR)/glqwcl $(BUILDDIR)/glqwcl.glx
+TARGETS=$(BUILDDIR)/qwsv $(BUILDDIR)/qwcl.x11 $(BUILDDIR)/glqwcl.glx
endif
build_debug:
@@ -485,7 +495,7 @@
$(BUILDDIR)/client/zone.o : $(CLIENT_DIR)/zone.c
$(DO_CC)
-$(BUILDDIR)/client/cd_linux.o : $(CLIENT_DIR)/cd_linux.c
+$(BUILDDIR)/client/cd_linux.o : $(CLIENT_DIR)/cd_linux.c
$(DO_CC)
$(BUILDDIR)/client/sys_linux.o : $(CLIENT_DIR)/sys_linux.c
@@ -609,7 +619,7 @@
$(BUILDDIR)/glclient/math.o \
$(BUILDDIR)/glclient/snd_mixa.o \
$(BUILDDIR)/glclient/sys_dosa.o
-
+
GLQWCL_SVGA_OBJS = $(BUILDDIR)/glclient/gl_vidlinux.o
GLQWCL_X11_OBJS = $(BUILDDIR)/glclient/gl_vidlinuxglx.o
@@ -715,7 +725,7 @@
$(BUILDDIR)/glclient/zone.o : $(CLIENT_DIR)/zone.c
$(DO_GL_CC)
-$(BUILDDIR)/glclient/cd_linux.o : $(CLIENT_DIR)/cd_linux.c
+$(BUILDDIR)/glclient/cd_linux.o : $(CLIENT_DIR)/cd_linux.c
$(DO_GL_CC)
$(BUILDDIR)/glclient/sys_linux.o : $(CLIENT_DIR)/sys_linux.c
|