mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-14 06:01:10 +00:00
define the product version in the Makefile
This commit is contained in:
parent
4e30f4cb35
commit
d7bdf4b344
2 changed files with 10 additions and 27 deletions
29
Makefile
29
Makefile
|
@ -168,27 +168,17 @@ OPENAL_LIBS=$(shell pkg-config --libs openal)
|
||||||
SDL_CFLAGS=$(shell pkg-config --cflags sdl|sed 's/-Dmain=SDL_main//')
|
SDL_CFLAGS=$(shell pkg-config --cflags sdl|sed 's/-Dmain=SDL_main//')
|
||||||
SDL_LIBS=$(shell pkg-config --libs sdl)
|
SDL_LIBS=$(shell pkg-config --libs sdl)
|
||||||
|
|
||||||
# extract version info
|
# version info
|
||||||
|
VERSION=1.35
|
||||||
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=
|
USE_SVN=
|
||||||
ifeq ($(wildcard .svn),.svn)
|
ifeq ($(wildcard .svn),.svn)
|
||||||
SVN_REV=$(shell LANG=C svnversion .)
|
SVN_REV=$(shell LANG=C svnversion .)
|
||||||
ifneq ($(SVN_REV),)
|
ifneq ($(SVN_REV),)
|
||||||
SVN_VERSION=$(VERSION)_SVN$(SVN_REV)
|
VERSION:=$(VERSION)_SVN$(SVN_REV)
|
||||||
USE_SVN=1
|
USE_SVN=1
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifneq ($(USE_SVN),1)
|
|
||||||
SVN_VERSION=$(VERSION)
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
@ -801,9 +791,7 @@ else
|
||||||
DEPEND_CFLAGS =
|
DEPEND_CFLAGS =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_SVN),1)
|
BASE_CFLAGS += -DPRODUCT_VERSION=\\\"$(VERSION)\\\"
|
||||||
BASE_CFLAGS += -DSVN_VERSION=\\\"$(SVN_VERSION)\\\"
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(V),1)
|
ifeq ($(V),1)
|
||||||
echo_cmd=@:
|
echo_cmd=@:
|
||||||
|
@ -918,6 +906,7 @@ targets: makedirs
|
||||||
@echo "Building ioquake3 in $(B):"
|
@echo "Building ioquake3 in $(B):"
|
||||||
@echo " PLATFORM: $(PLATFORM)"
|
@echo " PLATFORM: $(PLATFORM)"
|
||||||
@echo " ARCH: $(ARCH)"
|
@echo " ARCH: $(ARCH)"
|
||||||
|
@echo " VERSION: $(VERSION)"
|
||||||
@echo " COMPILE_PLATFORM: $(COMPILE_PLATFORM)"
|
@echo " COMPILE_PLATFORM: $(COMPILE_PLATFORM)"
|
||||||
@echo " COMPILE_ARCH: $(COMPILE_ARCH)"
|
@echo " COMPILE_ARCH: $(COMPILE_ARCH)"
|
||||||
@echo " CC: $(CC)"
|
@echo " CC: $(CC)"
|
||||||
|
@ -2011,10 +2000,10 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
rm -rf ioquake3-$(SVN_VERSION)
|
rm -rf ioquake3-$(VERSION)
|
||||||
svn export . ioquake3-$(SVN_VERSION)
|
svn export . ioquake3-$(VERSION)
|
||||||
tar --owner=root --group=root --force-local -cjf ioquake3-$(SVN_VERSION).tar.bz2 ioquake3-$(SVN_VERSION)
|
tar --owner=root --group=root --force-local -cjf ioquake3-$(VERSION).tar.bz2 ioquake3-$(VERSION)
|
||||||
rm -rf ioquake3-$(SVN_VERSION)
|
rm -rf ioquake3-$(VERSION)
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# DEPENDENCIES
|
# DEPENDENCIES
|
||||||
|
|
|
@ -28,23 +28,17 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
#ifdef STANDALONE
|
#ifdef STANDALONE
|
||||||
#define PRODUCT_NAME "iofoo3"
|
#define PRODUCT_NAME "iofoo3"
|
||||||
#define PRODUCT_VERSION "-1"
|
|
||||||
#define BASEGAME "foobar"
|
#define BASEGAME "foobar"
|
||||||
#define CLIENT_WINDOW_TITLE "changeme"
|
#define CLIENT_WINDOW_TITLE "changeme"
|
||||||
#define CLIENT_WINDOW_MIN_TITLE "changeme2"
|
#define CLIENT_WINDOW_MIN_TITLE "changeme2"
|
||||||
#else
|
#else
|
||||||
#define PRODUCT_NAME "ioq3"
|
#define PRODUCT_NAME "ioq3"
|
||||||
#define PRODUCT_VERSION "1.35"
|
|
||||||
#define BASEGAME "baseq3"
|
#define BASEGAME "baseq3"
|
||||||
#define CLIENT_WINDOW_TITLE "ioquake3"
|
#define CLIENT_WINDOW_TITLE "ioquake3"
|
||||||
#define CLIENT_WINDOW_MIN_TITLE "ioq3"
|
#define CLIENT_WINDOW_MIN_TITLE "ioq3"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SVN_VERSION
|
#define Q3_VERSION PRODUCT_NAME " " PRODUCT_VERSION
|
||||||
# define Q3_VERSION PRODUCT_NAME " " SVN_VERSION
|
|
||||||
#else
|
|
||||||
# define Q3_VERSION PRODUCT_NAME " " PRODUCT_VERSION
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MAX_TEAMNAME 32
|
#define MAX_TEAMNAME 32
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue