summaryrefslogtreecommitdiff
blob: 0c02710e89f60d4d1a64d7d656add03a1d383b7a (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
diff -ur orig/quake2-3.21/linux/Makefile work-mywork/quake2-3.21/linux/Makefile
--- orig/quake2-3.21/linux/Makefile	2001-12-29 20:37:22.000000000 -0500
+++ work-mywork/quake2-3.21/linux/Makefile	2003-07-17 22:14:50.000000000 -0400
@@ -54,7 +54,7 @@
 RELEASE_CFLAGS=$(BASE_CFLAGS) -O6 -ffast-math -funroll-loops \
 	-fomit-frame-pointer -fexpensive-optimizations
 else
-RELEASE_CFLAGS=$(BASE_CFLAGS) -g -mpentiumpro -O6 -ffast-math -funroll-loops \
+RELEASE_CFLAGS=$(BASE_CFLAGS) -g $(GENTOO_CFLAGS) -DGENTOO_DATADIR=\\\"$(GENTOO_DATADIR)\\\" -O6 -ffast-math -funroll-loops \
 	-fomit-frame-pointer -fexpensive-optimizations
 endif
 
@@ -92,7 +92,7 @@
 #############################################################################
 
 ifeq ($(ARCH),axp)
-TARGETS=$(BUILDDIR)/q2ded \
+TARGETS=\
 	$(BUILDDIR)/game$(ARCH).$(SHLIBEXT) \
 	$(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) \
 #	$(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT) \
@@ -100,11 +100,7 @@
 else
 TARGETS=$(BUILDDIR)/quake2 \
 	$(BUILDDIR)/game$(ARCH).$(SHLIBEXT) \
-	$(BUILDDIR)/ref_soft.$(SHLIBEXT) \
-	$(BUILDDIR)/ref_softx.$(SHLIBEXT) \
 	$(BUILDDIR)/ref_softaa.$(SHLIBEXT) \
-	$(BUILDDIR)/ref_gl.$(SHLIBEXT) \
-	$(BUILDDIR)/ref_glx.$(SHLIBEXT) \
 	$(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) \
 #	$(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT) \
 #	$(BUILDDIR)/rogue/game$(ARCH).$(SHLIBEXT)
@@ -125,9 +121,6 @@
 build_release:
 	@-mkdir $(BUILD_RELEASE_DIR) \
 		$(BUILD_RELEASE_DIR)/client \
-		$(BUILD_RELEASE_DIR)/ded \
-		$(BUILD_RELEASE_DIR)/ref_soft \
-		$(BUILD_RELEASE_DIR)/ref_gl \
 		$(BUILD_RELEASE_DIR)/game \
 		$(BUILD_RELEASE_DIR)/ctf \
 #		$(BUILD_RELEASE_DIR)/xatrix \
diff -ur orig/quake2-3.21/linux/sys_linux.c work-mywork/quake2-3.21/linux/sys_linux.c
--- orig/quake2-3.21/linux/sys_linux.c	2001-12-22 18:45:58.000000000 -0500
+++ work-mywork/quake2-3.21/linux/sys_linux.c	2003-07-17 22:34:11.000000000 -0400
@@ -220,7 +220,7 @@
 	char	curpath[MAX_OSPATH];
 	char	*path;
 #ifdef __i386__
-	const char *gamename = "gamei386.so";
+	const char *gamename = "GENTOO_DIR/gamei386.so";
 #elif defined __alpha__
 	const char *gamename = "gameaxp.so";
 #else
@@ -250,6 +250,14 @@
 		{
 			Com_Printf ("LoadLibrary (%s)\n",name);
 			break;
+		} else {
+			sprintf (name, "%s", gamename);
+			game_library = dlopen (name, RTLD_LAZY );
+			if (game_library)
+			{
+				Com_Printf ("LoadLibrary (%s)\n",name);
+				break;
+			}
 		}
 	}
 
diff -ur orig/quake2-3.21/qcommon/files.c work-mywork/quake2-3.21/qcommon/files.c
--- orig/quake2-3.21/qcommon/files.c	2001-12-22 16:32:26.000000000 -0500
+++ work-mywork/quake2-3.21/qcommon/files.c	2003-07-17 22:34:29.000000000 -0400
@@ -865,7 +865,7 @@
 	//
 	// start up with baseq2 by default
 	//
-	FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) );
+	FS_AddGameDirectory (va(BASEDIRNAME) );
 
 	// any set gamedirs will be freed up to here
 	fs_base_searchpaths = fs_searchpaths;
diff -ur orig/quake2-3.21/qcommon/qcommon.h work-mywork/quake2-3.21/qcommon/qcommon.h
--- orig/quake2-3.21/qcommon/qcommon.h	2001-12-22 16:32:26.000000000 -0500
+++ work-mywork/quake2-3.21/qcommon/qcommon.h	2003-07-17 21:20:03.000000000 -0400
@@ -25,7 +25,7 @@
 
 #define	VERSION		3.21
 
-#define	BASEDIRNAME	"baseq2"
+#define	BASEDIRNAME	GENTOO_DATADIR
 
 #ifdef WIN32