summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-05-05 20:47:12 +0100
committerPeter Powell <petpow@saberuk.com>2019-05-06 01:57:26 +0100
commite122a986a4261bf6ef0bc38af356e6cb2ea92a8c (patch)
tree6b0d395819145f167831489c447bb34276edf7ed /make
parent5e1cb9ed76594f49fa153e1865d34715a0ec950b (diff)
Fix relying on PWD being set in the makefile.
This may not be set in some circumstances.
Diffstat (limited to 'make')
-rw-r--r--make/template/main.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/make/template/main.mk b/make/template/main.mk
index ef5e8c1ab..e39a24f87 100644
--- a/make/template/main.mk
+++ b/make/template/main.mk
@@ -32,7 +32,7 @@
CXX = @CXX@
COMPILER = @COMPILER_NAME@
SYSTEM = @SYSTEM_NAME@
-BUILDPATH ?= $(PWD)/build
+BUILDPATH ?= $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/build
SOCKETENGINE = @SOCKETENGINE@
CORECXXFLAGS = -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -pipe -Iinclude -Wall -Wextra -Wfatal-errors -Wno-unused-parameter -Wshadow
LDLIBS = -lstdc++