diff options
Diffstat (limited to 'src/target/firmware/Makefile.inc')
-rw-r--r-- | src/target/firmware/Makefile.inc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/target/firmware/Makefile.inc b/src/target/firmware/Makefile.inc new file mode 100644 index 00000000..f3f19478 --- /dev/null +++ b/src/target/firmware/Makefile.inc @@ -0,0 +1,19 @@ +CROSS_COMPILE?=arm-elf- +CC=gcc +LD=ld +SIZE=size +OBJCOPY=objcopy + +DEBUGF=dwarf-2 + +CFLAGS=-mcpu=arm7tdmi $(INCLUDES) +CFLAGS += -Wall -Wextra -Wcast-align -Wimplicit -Wunused +CFLAGS += -Wswitch -Wredundant-decls -Wreturn-type -Wshadow -Wnested-externs +CFLAGS += -Wbad-function-cast -Wsign-compare -Waggregate-return +CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<) +CFLAGS += -Os -ffunction-sections +CFLAGS += -g$(DEBUGF) + +ASFLAGS=-Wa,-adhlns=$(<:.S=.lst),--g$(DEBUGF) $(INCLUDES) -D__ASSEMBLY__ + +LDFLAGS = -nostartfiles -nostdlib -nodefaultlibs --gc-sections #-Wl,-Map=$(TARGET).map,--cref |