summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 6 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index 1ed0627..62cee75 100644
--- a/Makefile
+++ b/Makefile
@@ -3,27 +3,13 @@ all: image/trunk/openwrt-ar71xx-tl-wr841 \
image/trunk/openwrt-ar71xx-tl-wr741 \
image/trunk/openwrt-atheros
-# parallelization
+# parallelization:
+# This Makefile reuses the same OpenWRT repo for multiple targets,
+# thus must process these targets serially. .NOTPARALLEL is _not_
+# inherited by sub-makes, and passing -jX to this Makefile results
+# in parallel builds for all submakes processes.
.NOTPARALLEL:
-NUMPROC := 1
-OS := $(shell uname)
-export NUMPROC
-
-ifeq ($(OS),Linux)
- NUMPROC := $(shell grep -c ^processor /proc/cpuinfo)
-else ifeq ($(OS),Darwin)
- NUMPROC := $(shell sysctl hw.ncpu | awk '{print $$2}')
-endif
-
-# Always use # of processory plus 1
-NUMPROC:=$$((${NUMPROC}+1))
-NUMPROC:=$(shell echo ${NUMPROC})
-
-ifeq ($(NUMPROC),0)
- NUMPROC = 1
-endif
-
# fetching and maintaing OpenWRT repositories
define init-repo
mkdir -p openwrt dl
@@ -69,7 +55,7 @@ image/%: config/$$(REPO)-$$(HW).config openwrt/$$(REPO)/.repo_access
files/common $(shell toolbin/extract_variants files/$(HW))
toolbin/name_firmware openwrt/$(REPO)
cd openwrt/$(REPO) && while true; do echo; done | make oldconfig >/dev/null
- cd openwrt/$(REPO) && $(MAKE) -j$(NUMPROC)
+ cd openwrt/$(REPO) && $(MAKE)
mkdir -p $(shell dirname $@)
rsync -a openwrt/$(REPO)/bin/$(PLATFORM)/ $@/
contact: Jan Huwald // Impressum