ALLFILES := $(SRCFILES) $(HDRFILES) $(AUXFILES)
WARNINGS := -Wall -Wextra -pedantic -Wno-unused-parameter -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wuninitialized -Wstrict-prototypes
-PLATFORM_FLAGS=-nostdinc -mlittle-endian -mthumb -mcpu=cortex-m3 -ffreestanding -nostdlib
+PLATFORM_FLAGS=-nostdinc -mlittle-endian -mthumb -mcpu=$(CPU) -ffreestanding -nostdlib
CFLAGS := -fno-builtin -Os -g -std=c99 -I./$(BUILD)/internals -I./testing $(WARNINGS) $(USERFLAGS) $(PLATFORM_FLAGS)
.PHONY: all clean srcdist bindist test tests testdrivers regtests regtestdrivers todos fixmes find links unlink help
install-hdr:
+make CPU=$(FIRSTCPU) install-hdr-$(FIRSTCPU)
+clean:
+ +for i in $(CPUS); do make CPU=$$i clean-$$i; done
+
check: all testdrivers regtestdrivers
@echo
@echo "========================"
-include $(DEPFILES) $(TSTDEPFILES) $(REGDEPFILES)
-clean: $(BUILD)
+clean-$(CPU): $(BUILD)
-@$(RM) $(wildcard $(OBJFILES) $(DEPFILES) $(TSTFILES) $(TSTDEPFILES) $(REGFILES) $(REGDEPFILES) $(PDCLIB) pdclib.tgz scanf_testdata_*)
srcdist: