[BUILD] Paralelize BUILD HEADERS
make 1:06:47 -> 1:06:90 make -j 24:52 -> 20:18 (measured on Core2 quad, 2.84GHz, 4GB ram, windows x86)
This commit is contained in:
committed by
Piotr Esden-Tempski
parent
85aa16f8c9
commit
ea28feb537
12
Makefile
12
Makefile
@@ -53,18 +53,16 @@ build: lib
|
|||||||
|
|
||||||
YAMLFILES := $(shell find . -name 'irq.yaml')
|
YAMLFILES := $(shell find . -name 'irq.yaml')
|
||||||
|
|
||||||
generatedheaders:
|
%.genhdr:
|
||||||
@printf " UPDATING HEADERS\n"
|
@printf " GENHDR $*\n";
|
||||||
$(Q)for yamlfile in $(YAMLFILES); do \
|
@./scripts/irq2nvic_h ./$*;
|
||||||
./scripts/irq2nvic_h $$yamlfile ; \
|
|
||||||
done
|
|
||||||
|
|
||||||
%.cleanhdr:
|
%.cleanhdr:
|
||||||
@printf " CLNHDR $*\n";
|
@printf " CLNHDR $*\n";
|
||||||
@./scripts/irq2nvic_h --remove ./$*
|
@./scripts/irq2nvic_h --remove ./$*
|
||||||
|
|
||||||
LIB_DIRS:=$(wildcard $(addprefix lib/,$(TARGETS)))
|
LIB_DIRS:=$(wildcard $(addprefix lib/,$(TARGETS)))
|
||||||
$(LIB_DIRS): generatedheaders
|
$(LIB_DIRS): $(YAMLFILES:=.genhdr)
|
||||||
@printf " BUILD $@\n";
|
@printf " BUILD $@\n";
|
||||||
$(Q)$(MAKE) --directory=$@ SRCLIBDIR=$(SRCLIBDIR)
|
$(Q)$(MAKE) --directory=$@ SRCLIBDIR=$(SRCLIBDIR)
|
||||||
|
|
||||||
@@ -105,5 +103,5 @@ stylecheck:
|
|||||||
fi ; \
|
fi ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
.PHONY: build lib $(LIB_DIRS) install doc clean generatedheaders stylecheck
|
.PHONY: build lib $(LIB_DIRS) install doc clean stylecheck
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user