From 71573b0c26453f4f1d49cc584b5d96a7daf8782b Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 18 Apr 2013 08:38:21 -0500 Subject: [PATCH] Actually use $(CPU) when building object files. Add clean target. Signed-off-by: Keith Packard --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 84e3393..2fd8747 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ REGDEPFILES := $(patsubst %,%.d,$(REGFILES)) 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 @@ -62,6 +62,9 @@ install: install-hdr 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 "========================" @@ -108,7 +111,7 @@ regtestdrivers: $(REGFILES) -include $(DEPFILES) $(TSTDEPFILES) $(REGDEPFILES) -clean: $(BUILD) +clean-$(CPU): $(BUILD) -@$(RM) $(wildcard $(OBJFILES) $(DEPFILES) $(TSTFILES) $(TSTDEPFILES) $(REGFILES) $(REGDEPFILES) $(PDCLIB) pdclib.tgz scanf_testdata_*) srcdist: -- 2.30.2