Change mod loading to take an absolute path
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 21 Aug 2016 11:41:29 +0000 (21:41 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 21 Aug 2016 11:41:29 +0000 (21:41 +1000)
qcsrc/Makefile
qcsrc/client/progs.inc
qcsrc/menu/progs.inc
qcsrc/server/progs.inc

index 0ed67281b4259d18fdd466d6f29912b94f011a63..903d8537e695bf35b33fb78889c814a38536cf7b 100644 (file)
@@ -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
index 5c0eace4ff265ba2829801c87c69e487b31e054e..327df77c25fd6583f6fe7365bf931f61cc52400d 100644 (file)
@@ -6,6 +6,6 @@
 
 #include <ecs/_mod.inc>
 
-#if BUILD_MOD
-#include "../../mod/client/progs.inc"
+#ifdef BUILD_MOD
+#include <mod/client/progs.inc>
 #endif
index 525b9d2f867491bfb77619413dd059c9f329805c..404c6f2e5a409a588e1014849337e1133fca81fd 100644 (file)
@@ -4,6 +4,6 @@
 #include <menu/_all.inc>
 #endif
 
-#if BUILD_MOD
-#include "../../mod/menu/progs.inc"
+#ifdef BUILD_MOD
+#include <mod/menu/progs.inc>
 #endif
index 381fd33eab2bfabf52f7891ecd919c415ffb3240..1000a5105ba25da7332711ae91b3b6c3d0323f3e 100644 (file)
@@ -6,6 +6,6 @@
 
 #include <ecs/_mod.inc>
 
-#if BUILD_MOD
-#include "../../mod/server/progs.inc"
+#ifdef BUILD_MOD
+#include <mod/server/progs.inc>
 #endif