From: Keith Packard Date: Mon, 30 Nov 2015 02:21:43 +0000 (-0600) Subject: Build cortex-m4 version of pdclib X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=bd33f6640cf5882f8630766a9acdd1bc420a9dda;p=fw%2Fpdclib 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 --- 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