From 0ab2814ddfdf88ed5eb1c77296271d8b51fabc37 Mon Sep 17 00:00:00 2001 From: TimePath Date: Sun, 21 Aug 2016 21:41:29 +1000 Subject: [PATCH] Change mod loading to take an absolute path --- qcsrc/Makefile | 4 ++-- qcsrc/client/progs.inc | 4 ++-- qcsrc/menu/progs.inc | 4 ++-- qcsrc/server/progs.inc | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) 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 -- 2.39.2