aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2020-11-15 02:44:16 +0000
committerxiphon <xiphon@protonmail.com>2020-11-15 02:45:28 +0000
commitb4c0cb65debf37ec4e15d468ecb4f491b36fc9da (patch)
tree415533652b980b3bfddd68c25d0853028af0f632 /Makefile
parent6fce5c7a848b770fbfa72f7b45e2d66e13acde22 (diff)
downloadmonzero-gui-b4c0cb65debf37ec4e15d468ecb4f491b36fc9da.tar.gz
monzero-gui-b4c0cb65debf37ec4e15d468ecb4f491b36fc9da.tar.xz
monzero-gui-b4c0cb65debf37ec4e15d468ecb4f491b36fc9da.zip
Makefile: refactor USE_SINGLE_BUILDDIR=OFF builddir path
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 12 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 9ed907da..01aa7189 100644
--- a/Makefile
+++ b/Makefile
@@ -6,15 +6,20 @@ ifneq ($(dotgit), .git/config)
USE_SINGLE_BUILDDIR=1
endif
-subbuilddir:=$(shell echo `uname | sed -e 's|[:/\\ \(\)]|_|g'`/`git branch | grep '\* ' | cut -f2- -d' '| sed -e 's|[:/\\ \(\)]|_|g'`)
+builddir := build
+topdir := ../..
ifeq ($(USE_SINGLE_BUILDDIR), OFF)
- builddir := build/"$(subbuilddir)"
- topdir := ../../../..
- deldirs := $(builddir)
+ os := $(shell echo `uname | sed -e 's|[:/\\ \(\)]|_|g'`)
+ builddir := $(builddir)/$(os)
+ topdir := $(topdir)/..
+
+ branch:=$(shell git branch | grep '\* ' | cut -f2- -d' '| sed -e 's|[:/\\ \(\)]|_|g')
+ builddir := $(builddir)/$(branch)
+ topdir := $(topdir)/..
+
+ deldirs := $(builddir)
else
- builddir := build
- topdir := ../..
- deldirs := $(builddir)/debug $(builddir)/release $(builddir)/fuzz
+ deldirs := $(builddir)/debug $(builddir)/release $(builddir)/fuzz
endif
default: