From ab59cd3f0e9f0261007f844f0853fbd9d29f856a Mon Sep 17 00:00:00 2001 From: thilo Date: Wed, 9 Apr 2008 23:43:30 +0000 Subject: 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 --- Makefile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3