summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorUwe Koloska <uwe.koloska@voiceinterconnect.de>2015-10-14 09:02:04 (GMT)
committerUwe Koloska <uwe.koloska@voiceinterconnect.de>2015-10-14 14:48:15 (GMT)
commit6fa3b9f9864951dd050b5310de8e8ec1a14e482c (patch)
treeea2a673ed2139fea248f35ac1b456f1dab451e8d /Makefile
parenta530b79d5a9257588debf6fe0a17fdccc442dc68 (diff)
downloadmxe-6fa3b9f9864951dd050b5310de8e8ec1a14e482c.zip
mxe-6fa3b9f9864951dd050b5310de8e8ec1a14e482c.tar.gz
mxe-6fa3b9f9864951dd050b5310de8e8ec1a14e482c.tar.bz2
add variable to define directory for tmp-directories
sometimes it's necessary to not build inside the mxe folder. The variable MXE_TMP can be used to change the base directory for creating tmp directories that are used for building. Rationale: when using virtualbox to build the cross-compile environment and the mxe project is in a shared folder, at least stripping is not working because of an internal error of the shared filesystem. So the solution is to change the tmp-directory to a place inside the VM.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b928b37..0655c2e 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,8 @@ PKG_CDN := d1yihgixbnrglp.cloudfront.net
PWD := $(shell pwd)
SHELL := bash
+MXE_TMP := $(PWD)
+
BUILD_CC := $(shell (gcc --help >/dev/null 2>&1 && echo gcc) || (clang --help >/dev/null 2>&1 && echo clang))
BUILD_CXX := $(shell (g++ --help >/dev/null 2>&1 && echo g++) || (clang++ --help >/dev/null 2>&1 && echo clang++))
DATE := $(shell gdate --help >/dev/null 2>&1 && echo g)date
@@ -45,7 +47,7 @@ PREFIX := $(PWD)/usr
LOG_DIR := $(PWD)/log
TIMESTAMP := $(shell date +%Y%m%d_%H%M%S)
PKG_DIR := $(PWD)/pkg
-TMP_DIR = $(PWD)/tmp-$(1)
+TMP_DIR = $(MXE_TMP)/tmp-$(1)
PKGS := $(call set_create,\
$(shell $(SED) -n 's/^.* class="package">\([^<]*\)<.*$$/\1/p' '$(TOP_DIR)/index.html'))
BUILD := $(shell '$(EXT_DIR)/config.guess')
@@ -223,6 +225,12 @@ else
echo '# within one package ("intra-package parallelism").'; \
echo '#JOBS := $(JOBS)'; \
echo; \
+ echo '# This variable controls where intermediate files are created'; \
+ echo '# this is necessary when compiling inside a virtualbox shared'; \
+ echo '# directory. Some commands like strip fail in there with »Protocol error'; \
+ echo '# default is the current directory'; \
+ echo '#MXE_TMP := /tmp'; \
+ echo; \
echo '# This variable controls the targets that will build.'; \
echo '#MXE_TARGETS := $(MXE_TARGET_LIST)'; \
echo; \