fs_mempool = Mem_AllocPool("file management", 0, NULL);
- strcpy(fs_basedir, "");
strcpy(fs_gamedir, "");
+// If the base directory is explicitly defined by the compilation process
+#ifdef DP_FS_BASEDIR
+ strcpy(fs_basedir, DP_FS_BASEDIR);
+
+#else
+ strcpy(fs_basedir, "");
+
#ifdef MACOSX
// FIXME: is there a better way to find the directory outside the .app?
if (strstr(com_argv[0], ".app/"))
strlcpy(fs_basedir, com_argv[0], sizeof(fs_basedir));
fs_basedir[split - com_argv[0]] = 0;
}
+#endif
#endif
PK3_OpenLibrary ();
SDL_CONFIG?=sdl-config
+DP_FS_BASEDIR?=
+
###### Sound and audio CD #####
# Common objects
OBJ_COMMON= \
- libcurl.o \
cd_shared.o \
cl_collision.o \
cl_demo.o \
jpeg.o \
keys.o \
lhnet.o \
+ libcurl.o \
mathlib.o \
matrixlib.o \
mdfour.o \
# Compilation
-# CFLAGS_COMMON=-MD -Wall -Werror
-CFLAGS_COMMON=$(CFLAGS_MAKEDEP) -Wall -Wsign-compare
+CFLAGS_COMMON=$(CFLAGS_MAKEDEP) -DDP_FS_BASEDIR=\"$(DP_FS_BASEDIR)\" -Wall -Wsign-compare
CFLAGS_DEBUG=-ggdb
CFLAGS_PROFILE=-g -pg -ggdb
CFLAGS_RELEASE=