summaryrefslogtreecommitdiff
path: root/package/afboot-stm32/patches/patch-Makefile
blob: 4fbb034c617f36ea1fcab39b2139eae3546ce677 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- afboot-stm32-8e9e03159ce47629d40dbed4c50c1879b69bb197.orig/Makefile	2017-01-19 06:54:21.000000000 +0100
+++ afboot-stm32-8e9e03159ce47629d40dbed4c50c1879b69bb197/Makefile	2017-01-19 06:55:03.370200767 +0100
@@ -1,14 +1,15 @@
 CROSS_COMPILE ?= arm-none-eabi-
 
-CC = $(CROSS_COMPILE)gcc
-LD = $(CROSS_COMPILE)ld
-OBJCOPY = $(CROSS_COMPILE)objcopy
-OBJDUMP = $(CROSS_COMPILE)objdump
+CC ?= $(CROSS_COMPILE)gcc
+LD ?= $(CROSS_COMPILE)ld
+OBJCOPY ?= $(CROSS_COMPILE)objcopy
+OBJDUMP ?= $(CROSS_COMPILE)objdump
 SIZE = $(CROSS_COMPILE)size
 GDB = $(CROSS_COMPILE)gdb
 OPENOCD = openocd
 
-CFLAGS := -mthumb -mcpu=cortex-m4
+CFLAGS ?= 
+CFLAGS += -mthumb
 CFLAGS += -ffunction-sections -fdata-sections
 CFLAGS += -Os -std=gnu99 -Wall
 LINKERFLAGS := -nostartfiles --gc-sections