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
108
109
110
111
112
113
114
115
|
$NetBSD: patch-ae,v 1.10 2011/09/14 19:19:37 marino Exp $
--- QW/Makefile.Linux.orig 1999-04-21 18:16:24.000000000 +0000
+++ QW/Makefile.Linux
@@ -27,41 +27,57 @@ ARCH=i386
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 \
- -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
- -malign-jumps=2 -malign-functions=2
+# 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) \
+ -mtune=i486 \
+ -ffast-math \
+ -funroll-loops \
+ -fomit-frame-pointer \
+ -fexpensive-optimizations \
+ -falign-loops=2 \
+ -falign-jumps=2 \
+ -falign-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
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 ${LDFLAGS} -lX11 -lXext
+GL_SVGA_LDFLAGS=-L${X11BASE}/lib ${LDFLAGS} -L${MESA_DIR}/lib -lm -lMesaGL -lglide2x -lX11 -lXext -lvga
+GL_X11_LDFLAGS=-L${X11BASE}/lib ${LDFLAGS} -L${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 +87,7 @@ ifeq ($(ARCH),axp)
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 +501,7 @@ $(BUILDDIR)/client/wad.o : $(
$(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 +625,7 @@ GLQWCL_OBJS = \
$(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 +731,7 @@ $(BUILDDIR)/glclient/wad.o : $
$(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
|