aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-04-09 23:43:30 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-04-09 23:43:30 +0000
commitab59cd3f0e9f0261007f844f0853fbd9d29f856a (patch)
tree42e83b21a5b5903fe5dd7191ef2ff198d189290f /Makefile
parentfd55fbe832148411137d50e2afa6ca2bc0197d0e (diff)
downloadioquake3-aero-ab59cd3f0e9f0261007f844f0853fbd9d29f856a.tar.gz
ioquake3-aero-ab59cd3f0e9f0261007f844f0853fbd9d29f856a.zip
Include #ifdef to make it easier to create a stand-alone binary.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1307 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 16 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 40b68d2..bf188b6 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,9 @@ ifeq ($(COMPILE_PLATFORM),mingw32)
endif
endif
+ifndef BUILD_STANDALONE
+ BUILD_STANDALONE =
+endif
ifndef BUILD_CLIENT
BUILD_CLIENT =
endif
@@ -151,8 +154,15 @@ LIBSDIR=$(MOUNT_DIR)/libs
TEMPDIR=/tmp
# extract version info
-VERSION=$(shell grep "\#define *PRODUCT_VERSION" $(CMDIR)/q_shared.h | \
- sed -e 's/[^"]*"\(.*\)"/\1/')
+# echo $(BUILD_CLIENT)
+
+ifeq ($(BUILD_STANDALONE),1)
+ VERSION=$(shell grep "\#define *PRODUCT_VERSION" $(CMDIR)/q_shared.h | head -n 1 | \
+ sed -e 's/[^"]*"\(.*\)"/\1/')
+else
+ VERSION=$(shell grep "\#define *PRODUCT_VERSION" $(CMDIR)/q_shared.h | tail -n 1 | \
+ sed -e 's/[^"]*"\(.*\)"/\1/')
+endif
USE_SVN=
ifeq ($(wildcard .svn),.svn)
@@ -760,6 +770,10 @@ ifeq ($(USE_LOCAL_HEADERS),1)
BASE_CFLAGS += -DUSE_LOCAL_HEADERS
endif
+ifeq ($(BUILD_STANDALONE),1)
+ BASE_CFLAGS += -DSTANDALONE
+endif
+
ifeq ($(GENERATE_DEPENDENCIES),1)
DEPEND_CFLAGS = -MMD
else