make: use $(PREFIX)gcc instead of $(PREFIX)-gcc

The leading - makes it rather inconsistent with the majority of other
projects around the world.  Use the form everyone else uses.
To solve this, properly pass prefix to inner makes as was always
intended.

Fixes: https://github.com/libopencm3/libopencm3/issues/1058
This commit is contained in:
Karl Palsson
2019-06-07 21:25:46 +00:00
parent 795fe21860
commit 7be50a5e75
35 changed files with 70 additions and 139 deletions

View File

@@ -20,10 +20,8 @@
LIBNAME = libopencm3_stm32f0
SRCLIBDIR ?= ../..
PREFIX ?= arm-none-eabi
#PREFIX ?= arm-elf
CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CC = $(PREFIX)gcc
AR = $(PREFIX)ar
TGT_CFLAGS = -Os \
-Wall -Wextra -Wimplicit-function-declaration \
-Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \

View File

@@ -20,10 +20,8 @@
LIBNAME = libopencm3_stm32f1
SRCLIBDIR ?= ../..
PREFIX ?= arm-none-eabi
CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CC = $(PREFIX)gcc
AR = $(PREFIX)ar
TGT_CFLAGS = -Os \
-Wall -Wextra -Wimplicit-function-declaration \
-Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \

View File

@@ -20,10 +20,8 @@
LIBNAME = libopencm3_stm32f2
SRCLIBDIR ?= ../..
PREFIX ?= arm-none-eabi
CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CC = $(PREFIX)gcc
AR = $(PREFIX)ar
TGT_CFLAGS = -Os \
-Wall -Wextra -Wimplicit-function-declaration \
-Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \

View File

@@ -21,10 +21,8 @@ LIBNAME = libopencm3_stm32f3
SRCLIBDIR ?= ../..
FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16
PREFIX ?= arm-none-eabi
CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CC = $(PREFIX)gcc
AR = $(PREFIX)ar
TGT_CFLAGS = -Os \
-Wall -Wextra -Wimplicit-function-declaration \
-Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \

View File

@@ -22,10 +22,8 @@ LIBNAME = libopencm3_stm32f4
SRCLIBDIR ?= ../..
FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16
PREFIX ?= arm-none-eabi
CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CC = $(PREFIX)gcc
AR = $(PREFIX)ar
TGT_CFLAGS = -Os \
-Wall -Wextra -Wimplicit-function-declaration \
-Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \

View File

@@ -21,10 +21,8 @@
LIBNAME = libopencm3_stm32f7
SRCLIBDIR ?= ../..
PREFIX ?= arm-none-eabi
CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CC = $(PREFIX)gcc
AR = $(PREFIX)ar
# STM32F7 only supports single precision FPU
FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv5-sp-d16

View File

@@ -20,10 +20,8 @@
LIBNAME = libopencm3_stm32g0
SRCLIBDIR ?= ../..
PREFIX ?= arm-none-eabi
CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CC = $(PREFIX)gcc
AR = $(PREFIX)ar
TGT_CFLAGS = -Os \
-Wall -Wextra -Wimplicit-function-declaration \
-Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \

View File

@@ -20,10 +20,8 @@
LIBNAME = libopencm3_stm32l0
SRCLIBDIR ?= ../..
PREFIX ?= arm-none-eabi
#PREFIX ?= arm-elf
CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CC = $(PREFIX)gcc
AR = $(PREFIX)ar
TGT_CFLAGS = -Os \
-Wall -Wextra -Wimplicit-function-declaration \
-Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \

View File

@@ -20,10 +20,8 @@
LIBNAME = libopencm3_stm32l1
SRCLIBDIR ?= ../..
PREFIX ?= arm-none-eabi
CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CC = $(PREFIX)gcc
AR = $(PREFIX)ar
TGT_CFLAGS = -Os \
-Wall -Wextra -Wimplicit-function-declaration \
-Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \

View File

@@ -21,10 +21,8 @@ LIBNAME = libopencm3_stm32l4
SRCLIBDIR ?= ../..
FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16
PREFIX ?= arm-none-eabi
CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CC = $(PREFIX)gcc
AR = $(PREFIX)ar
TGT_CFLAGS = -Os \
-Wall -Wextra -Wimplicit-function-declaration \
-Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \