From bd33f6640cf5882f8630766a9acdd1bc420a9dda Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 29 Nov 2015 20:21:43 -0600 Subject: [PATCH] Build cortex-m4 version of pdclib We're using the m4 version until the arm binutils package gains support for the m7. Signed-off-by: Keith Packard --- Makefile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4796dfb..97da5cc 100644 --- a/Makefile +++ b/Makefile @@ -9,11 +9,22 @@ bindir=$(prefix)/bin includedir=$(prefix)/include #CPU=cortex-m3 -CPUS=cortex-m0 cortex-m3 +CPUS=cortex-m0 cortex-m3 cortex-m4 FIRSTCPU=cortex-m0 CPU=none BUILD=build-$(CPU) +# CPU specific compiler flags +ifeq ($(CPU),cortex-m0) +CPU_FLAGS= +endif +ifeq ($(CPU),cortex-m3) +CPU_FLAGS= +endif +ifeq ($(CPU),cortex-m4) +CPU_FLAGS=-mfloat-abi=hard +endif + #CC=$(bindir)/arm-none-eabi-gcc CC=/usr/bin/arm-none-eabi-gcc @@ -49,7 +60,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=-mlittle-endian -mthumb -mcpu=$(CPU) -ffreestanding +PLATFORM_FLAGS=-mlittle-endian -mthumb -mcpu=$(CPU) -ffreestanding $(CPU_FLAGS) CFLAGS := -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 -- 2.30.2