.endif
DP_ARCH != uname
-CFLAGS_MAKEDEP=-MD
-
# Command used to delete files
CMD_RM=$(CMD_UNIXRM)
.endif
+##### Extra CFLAGS #####
+
+CFLAGS_MAKEDEP=-MD
+.ifdef DP_FS_BASEDIR
+CFLAGS_FS=-DDP_FS_BASEDIR='\"$(DP_FS_BASEDIR)\"'
+.else
+CFLAGS_FS=
+.endif
+
+
##### BSD Make specific definitions #####
MAKE:=$(MAKE) -f BSDmakefile
/*
DarkPlaces file system
- Copyright (C) 2003-2005 Mathieu Olivier
+ Copyright (C) 2003-2006 Mathieu Olivier
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
strcpy(fs_basedir, DP_FS_BASEDIR);
#else
strcpy(fs_basedir, "");
-#endif
#ifdef MACOSX
// FIXME: is there a better way to find the directory outside the .app?
- if (!fs_basedir[0] && strstr(com_argv[0], ".app/"))
+ if (strstr(com_argv[0], ".app/"))
{
char *split;
strlcpy(fs_basedir, com_argv[0], sizeof(fs_basedir));
fs_basedir[split - com_argv[0]] = 0;
}
+#endif
#endif
PK3_OpenLibrary ();
endif # ifdef windir
endif # ifndef DP_MAKE_TARGET
-CFLAGS_MAKEDEP=-MD
-
# If we're not on compiling for Win32, we need additional information
ifneq ($(DP_MAKE_TARGET), mingw)
DP_ARCH:=$(shell uname)
endif
+##### Extra CFLAGS #####
+
+CFLAGS_MAKEDEP?=-MD
+ifdef DP_FS_BASEDIR
+ CFLAGS_FS=-DDP_FS_BASEDIR='\"$(DP_FS_BASEDIR)\"'
+else
+ CFLAGS_FS=
+endif
+
+
##### GNU Make specific definitions #####
DO_LD=$(CC) -o $@ $^ $(LDFLAGS)
SDL_CONFIG?=sdl-config
-DP_FS_BASEDIR?=
-
###### Sound and audio CD #####
# Compilation
-CFLAGS_COMMON=$(CFLAGS_MAKEDEP) -D'DP_FS_BASEDIR=\"$(DP_FS_BASEDIR)\"' -Wall -Wsign-compare
+CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_FS) -Wall -Wsign-compare
CFLAGS_DEBUG=-ggdb
CFLAGS_PROFILE=-g -pg -ggdb
CFLAGS_RELEASE=