From 2069190c25158e94d299e230a2bd361cd720ca8f Mon Sep 17 00:00:00 2001 From: TimePath Date: Sun, 19 Jun 2016 18:03:50 +1000 Subject: [PATCH] Define XONOTIC=1 --- CMakeLists.txt | 1 + qcsrc/Makefile | 2 ++ qcsrc/client/progs.inc | 5 +++++ qcsrc/menu/progs.inc | 4 ++++ qcsrc/server/progs.inc | 5 +++++ qcsrc/tools/compilationunits.sh | 1 + 6 files changed, 18 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c2b856435..fdbce7d5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ project(xonotic-data LANGUAGES ASM) include_directories(qcsrc) +add_definitions(-DXONOTIC=1) add_definitions(-DNDEBUG=1) find_package(Git REQUIRED) diff --git a/qcsrc/Makefile b/qcsrc/Makefile index ee335d9b0..0ed67281b 100644 --- a/qcsrc/Makefile +++ b/qcsrc/Makefile @@ -7,6 +7,7 @@ WORKDIR ?= ../.tmp QCCFLAGS_WATERMARK ?= $(shell git describe --tags --dirty='~') VER = $(subst *,\*,$(QCCFLAGS_WATERMARK)) NDEBUG ?= 1 +XONOTIC ?= 1 BUILD_MOD ?= 0 ifndef ZIP @@ -30,6 +31,7 @@ QCCFLAGS_WTFS ?= \ -Wno-field-redeclared QCCDEFS ?= \ + -DXONOTIC=$(XONOTIC) \ -DWATERMARK="$(QCCFLAGS_WATERMARK)" \ -DNDEBUG=$(NDEBUG) \ -DBUILD_MOD=$(BUILD_MOD) \ diff --git a/qcsrc/client/progs.inc b/qcsrc/client/progs.inc index a736d3262..8952f058f 100644 --- a/qcsrc/client/progs.inc +++ b/qcsrc/client/progs.inc @@ -1,4 +1,7 @@ #include + +#if XONOTIC + #include "_all.qh" #include "../client/_mod.inc" @@ -20,6 +23,8 @@ #include #include +#endif + #if BUILD_MOD #include "../../mod/client/progs.inc" #endif diff --git a/qcsrc/menu/progs.inc b/qcsrc/menu/progs.inc index 9b15d8caa..ad08af93d 100644 --- a/qcsrc/menu/progs.inc +++ b/qcsrc/menu/progs.inc @@ -1,5 +1,7 @@ #include +#if XONOTIC + #include "../menu/_mod.inc" #include "anim/_mod.inc" #include "command/_mod.inc" @@ -9,6 +11,8 @@ #include +#endif + #if BUILD_MOD #include "../../mod/menu/progs.inc" #endif diff --git a/qcsrc/server/progs.inc b/qcsrc/server/progs.inc index 0396dee6c..ed005dfad 100644 --- a/qcsrc/server/progs.inc +++ b/qcsrc/server/progs.inc @@ -3,6 +3,9 @@ #endif #include + +#if XONOTIC + #include "_all.qh" #include "../server/_mod.inc" @@ -23,6 +26,8 @@ #include #include +#endif + #if BUILD_MOD #include "../../mod/server/progs.inc" #endif diff --git a/qcsrc/tools/compilationunits.sh b/qcsrc/tools/compilationunits.sh index 3c794e93f..0a03de360 100755 --- a/qcsrc/tools/compilationunits.sh +++ b/qcsrc/tools/compilationunits.sh @@ -9,6 +9,7 @@ CPP="cc -xc -E" declare -a QCCDEFS=( -DNDEBUG=1 + -DXONOTIC=1 -DWATERMARK="\"$(git describe --tags --dirty='~')\"" -DDEBUGPATHING=0 ) -- 2.39.2