Include #ifdef to make it easier to create a stand-alone binary.

This commit is contained in:
Thilo Schulz 2008-04-09 23:43:30 +00:00
parent ca5fabe8c6
commit b3822d03e2
10 changed files with 84 additions and 20 deletions

View file

@ -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