Make GENHDR build faster

master
Fabio Pugliese Ornellas 2 years ago committed by Karl Palsson
parent d7ec88c4ea
commit d60d7802fd
  1. 10
      Makefile

@ -46,6 +46,10 @@ endif
# Avoid the use of shell find, for windows compatibility
IRQ_DEFN_FILES := $(foreach TARGET,$(TARGETS),$(wildcard include/libopencm3/$(TARGET)/irq.json))
NVIC_H := $(IRQ_DEFN_FILES:%/irq.json=%/nvic.h)
VECTOR_NVIC_C := $(IRQ_DEFN_FILES:./include/libopencm3/%/irq.json=./lib/%/vector_nvic.c)
IRQHANDLERS_H := $(IRQ_DEFN_FILES:./include/libopencm3/%/irq.json=./include/libopencmsis/%/irqhandlers.h)
IRQ_GENERATED_FILES = $(NVIC_H) $(VECTOR_NVIC_C) $(IRQHANDLERS_H)
STYLECHECKFILES := $(wildcard include/*/*.h include/*/*/*.h include/*/*/*/*.h)
STYLECHECKFILES += $(wildcard lib/*/*.h lib/*/*/*.h lib/*/*/*/*.h)
STYLECHECKFILES += $(wildcard lib/*/*.c lib/*/*/*.c lib/*/*/*/*.c)
@ -54,16 +58,16 @@ all: build
build: lib
%.genhdr:
include/libopencm3/%/nvic.h lib/%/vector_nvic.c include/libopencmsis/%/irqhandlers.h: include/libopencm3/%/irq.json ./scripts/irq2nvic_h
@printf " GENHDR $*\n";
$(Q)./scripts/irq2nvic_h ./$*;
$(Q)./scripts/irq2nvic_h ./$<;
%.cleanhdr:
@printf " CLNHDR $*\n";
$(Q)./scripts/irq2nvic_h --remove ./$*
LIB_DIRS:=$(wildcard $(addprefix lib/,$(TARGETS)))
$(LIB_DIRS): $(IRQ_DEFN_FILES:=.genhdr)
$(LIB_DIRS): $(IRQ_GENERATED_FILES)
$(Q)$(RM) .stamp_failure_$(subst /,_,$@)
@printf " BUILD $@\n";
$(Q)$(MAKE) --directory=$@ PREFIX="$(PREFIX)" || \

Loading…
Cancel
Save