git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8353
d7cf8633-e32d-0410-b094-
e92efae38249
+#define STRINGIFY2(arg) #arg
+#define STRINGIFY(arg) STRINGIFY2(arg)
-char *buildstring = __TIME__ " " __DATE__;
-
+char *buildstring = __TIME__ " " __DATE__
+#ifdef SVNREVISION
+" " STRINGIFY(SVNREVISION)
+#endif
+#ifdef BUILDTYPE
+" " STRINGIFY(BUILDTYPE)
+#endif
+;
# Link
-LDFLAGS_DEBUG=-g -ggdb $(OPTIM_DEBUG)
-LDFLAGS_PROFILE=-g -pg $(OPTIM_RELEASE)
-LDFLAGS_RELEASE=$(OPTIM_RELEASE)
+LDFLAGS_DEBUG=-g -ggdb $(OPTIM_DEBUG) -DSVNREVISION=`test -d .svn && svnversion || echo -` -DBUILDTYPE=debug
+LDFLAGS_PROFILE=-g -pg $(OPTIM_RELEASE) -DSVNREVISION=`test -d .svn && svnversion || echo -` -DBUILDTYPE=profile
+LDFLAGS_RELEASE=$(OPTIM_RELEASE) -DSVNREVISION=`test -d .svn && svnversion || echo -` -DBUILDTYPE=release
##### UNIX specific variables #####