aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
Diffstat (limited to 'code')
-rw-r--r--code/unix/Makefile15
-rw-r--r--code/unix/unix_main.c6
2 files changed, 15 insertions, 6 deletions
diff --git a/code/unix/Makefile b/code/unix/Makefile
index 399c65e..acee11a 100644
--- a/code/unix/Makefile
+++ b/code/unix/Makefile
@@ -54,8 +54,6 @@ BUILD_FREETYPE=0
##
#############################################################################
-BASEQ3_DIR=$(BDIR)/baseq3
-
BD=debug$(ARCH)$(GLIBC)
BR=release$(ARCH)$(GLIBC)
CDIR=$(MOUNT_DIR)/client
@@ -96,8 +94,8 @@ LIB=lib
ifeq ($(PLATFORM),linux)
GLIBC=-glibc
- CC=gcc
- CXX=g++
+ CC?=gcc
+ CXX?=g++
RPMARCH=$(ARCH)
ifeq ($(ARCH),alpha)
@@ -165,8 +163,9 @@ ifeq ($(PLATFORM),linux)
SHLIBCFLAGS=-fPIC
SHLIBLDFLAGS=-shared $(LDFLAGS)
- ARFLAGS=ar rv
- RANLIB=ranlib
+ AR?=ar
+ ARFLAGS=rv
+ RANLIB?=ranlib
THREAD_LDFLAGS=-lpthread
LDFLAGS=-ldl -lm
@@ -344,6 +343,10 @@ endif #Linux
endif #FreeBSD
endif #IRIX
+ifdef DEFAULT_BASEDIR
+BASE_CFLAGS += -DDEFAULT_BASEDIR=\\\"$(DEFAULT_BASEDIR)\\\"
+endif
+
DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
DO_CXX=$(CXX) $(CFLAGS) -o $@ -c $<
DO_SMP_CC=$(CC) $(CFLAGS) -DSMP -o $@ -c $<
diff --git a/code/unix/unix_main.c b/code/unix/unix_main.c
index 9e15e0e..ebf4684 100644
--- a/code/unix/unix_main.c
+++ b/code/unix/unix_main.c
@@ -1246,6 +1246,10 @@ void Sys_ParseArgs( int argc, char* argv[] ) {
}
}
+#ifndef DEFAULT_BASEDIR
+# define DEFAULT_BASEDIR Sys_Cwd()
+#endif
+
#include "../client/client.h"
extern clientStatic_t cls;
@@ -1266,6 +1270,8 @@ int main ( int argc, char* argv[] )
strncat(cdpath, argv[0], sizeof(cdpath)-1);
Sys_SetDefaultCDPath(dirname(cdpath));
+ Sys_SetDefaultInstallPath(DEFAULT_BASEDIR);
+
// merge the command line, this is kinda silly
for (len = 1, i = 1; i < argc; i++)
len += strlen(argv[i]) + 1;