--- 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
