# Cleanup environment from any variables
unexport BUILD_ARCH BUILD_PLATFORM BUILDTARGET CROSSTARGET TOOLCHAIN TOOLS_DIR
+unexport XZ_OPT
+
+PARALLELISM = $(shell echo $$( \
+ if [ -n "$(MAX_PARALLELISM)" ] && [ $(MAX_PARALLELISM) -lt $(DEFAULT_PARALLELISM) ]; then \
+ echo $(MAX_PARALLELISM); \
+ else \
+ echo $(DEFAULT_PARALLELISM); \
+ fi) \
+)
+
+MAKETUNING = -j$(PARALLELISM)
ifeq "$(BUILD_ARCH)" "aarch64"
IS_64BIT = 1
endif
+ifeq "$(BUILD_ARCH)" "armv7hl"
+ IS_32BIT = 1
+endif
+
+ifeq "$(BUILD_ARCH)" "armv5tel"
+ IS_32BIT = 1
+endif
+
ifeq "$(BUILD_ARCH)" "x86_64"
IS_64BIT = 1
endif
+ifeq "$(BUILD_ARCH)" "i586"
+ IS_32BIT = 1
+endif
+
ifeq "$(TOOLCHAIN)" "1"
PREFIX = $(TOOLS_DIR)
else