]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
build: Allow overriding BUILDDIR from command line
authorJohannes Berg <johannes.berg@intel.com>
Fri, 18 Sep 2020 09:50:00 +0000 (11:50 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 10 Oct 2020 10:06:53 +0000 (13:06 +0300)
You can now specify BUILDDIR= on the make command line,
e.g., in order to put that into a tmpfs or similar.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
src/build.rules

index bdcae65519cfbfa2f4eb080e563d77fa489367fe..32f45ae1eff121ff2e006fa152ac44099d7f0630 100644 (file)
@@ -7,7 +7,8 @@ all: _all
 # setup some variables
 ROOTDIR := $(dir $(lastword $(MAKEFILE_LIST)))
 ROOTDIR := $(dir $(ROOTDIR:%../src/=%))../
-BUILDDIR := $(ROOTDIR)build
+BUILDDIR ?= $(abspath $(ROOTDIR)build)
+BUILDDIR := $(BUILDDIR:%/=%)
 _PROJ := $(abspath $(dir $(firstword $(MAKEFILE_LIST))))
 ABSROOT := $(abspath $(ROOTDIR))
 _PROJ := $(_PROJ:$(ABSROOT)/%=%)