Index: code/unix/unix_main.c =================================================================== --- code/unix/unix_main.c (revision 25) +++ code/unix/unix_main.c (working copy) @@ -1227,6 +1227,10 @@ } } +#ifndef DEFAULT_BASEDIR +# define DEFAULT_BASEDIR Sys_Cwd() +#endif + #include "../client/client.h" extern clientStatic_t cls; @@ -1245,6 +1249,8 @@ Sys_SetDefaultCDPath(argv[0]); + 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; Index: code/unix/Makefile =================================================================== --- code/unix/Makefile (revision 25) +++ code/unix/Makefile (working copy) @@ -54,8 +54,6 @@ ## ############################################################################# -BASEQ3_DIR=$(BDIR)/baseq3 - BD=debug$(ARCH)$(GLIBC) BR=release$(ARCH)$(GLIBC) CDIR=$(MOUNT_DIR)/client @@ -94,8 +92,8 @@ ifeq ($(PLATFORM),linux) GLIBC=-glibc - CC=gcc - CXX=g++ + CC?=gcc + CXX?=g++ RPMARCH=$(ARCH) ifeq ($(ARCH),alpha) @@ -140,8 +138,9 @@ SHLIBCFLAGS=-fPIC SHLIBLDFLAGS=-shared $(LDFLAGS) - ARFLAGS=ar rv - RANLIB=ranlib + AR?=ar + ARFLAGS=rv + RANLIB?=ranlib THREAD_LDFLAGS=-lpthread LDFLAGS=-ldl -lm @@ -307,6 +306,10 @@ 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 $<