From: TimePath Date: Sun, 21 Aug 2016 11:41:29 +0000 (+1000) Subject: Change mod loading to take an absolute path X-Git-Tag: xonotic-v0.8.2~683 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0ab2814ddfdf88ed5eb1c77296271d8b51fabc37;p=xonotic%2Fxonotic-data.pk3dir.git Change mod loading to take an absolute path --- diff --git a/qcsrc/Makefile b/qcsrc/Makefile index 0ed67281b..903d8537e 100644 --- a/qcsrc/Makefile +++ b/qcsrc/Makefile @@ -8,7 +8,7 @@ QCCFLAGS_WATERMARK ?= $(shell git describe --tags --dirty='~') VER = $(subst *,\*,$(QCCFLAGS_WATERMARK)) NDEBUG ?= 1 XONOTIC ?= 1 -BUILD_MOD ?= 0 +BUILD_MOD ?= ifndef ZIP ifneq ($(shell which zip),) @@ -34,7 +34,7 @@ QCCDEFS ?= \ -DXONOTIC=$(XONOTIC) \ -DWATERMARK="$(QCCFLAGS_WATERMARK)" \ -DNDEBUG=$(NDEBUG) \ - -DBUILD_MOD=$(BUILD_MOD) \ + $(if $(BUILD_MOD), -DBUILD_MOD="$(BUILD_MOD)" -I$(BUILD_MOD), ) \ $(QCCDEFS_EXTRA) # -Ooverlap-locals is required diff --git a/qcsrc/client/progs.inc b/qcsrc/client/progs.inc index 5c0eace4f..327df77c2 100644 --- a/qcsrc/client/progs.inc +++ b/qcsrc/client/progs.inc @@ -6,6 +6,6 @@ #include -#if BUILD_MOD -#include "../../mod/client/progs.inc" +#ifdef BUILD_MOD +#include #endif diff --git a/qcsrc/menu/progs.inc b/qcsrc/menu/progs.inc index 525b9d2f8..404c6f2e5 100644 --- a/qcsrc/menu/progs.inc +++ b/qcsrc/menu/progs.inc @@ -4,6 +4,6 @@ #include #endif -#if BUILD_MOD -#include "../../mod/menu/progs.inc" +#ifdef BUILD_MOD +#include #endif diff --git a/qcsrc/server/progs.inc b/qcsrc/server/progs.inc index 381fd33ea..1000a5105 100644 --- a/qcsrc/server/progs.inc +++ b/qcsrc/server/progs.inc @@ -6,6 +6,6 @@ #include -#if BUILD_MOD -#include "../../mod/server/progs.inc" +#ifdef BUILD_MOD +#include #endif