From 9d933f7d4cdbcff8fbb43632cff90a54635d6dda Mon Sep 17 00:00:00 2001 From: bernd Date: Fri, 29 Jul 2011 04:33:29 +0200 Subject: [PATCH] Use untracked Makefile.sitespecific to optionally override some build flags --- firmware/Makefile | 4 ++-- firmware/Makefile.inc | 6 ++++++ simulat0r/firmware/Makefile.inc | 7 ++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/firmware/Makefile b/firmware/Makefile index f92d179..0f47a3d 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -62,7 +62,7 @@ loadables: $(OUTFILE).bin clean: rm -f $(OBJS) $(LD_TEMP) $(OUTFILE).elf $(OUTFILE).bin $(OUTFILE).hex for dir in $(SUBDIRS); do \ - $(MAKE) --no-print-directory -C $$dir clean; \ + $(MAKE) $(CONFIG_MAKE_PRINTDIRECTORY) -C $$dir clean; \ done flash: all ../tools/bootloader/autoflash @@ -78,7 +78,7 @@ flash: all subdirs: $(SUBDIRS) $(SUBDIRS): - $(MAKE) ROOT_PATH=../$(ROOT_PATH) --no-print-directory -C $@ + $(MAKE) ROOT_PATH=../$(ROOT_PATH) $(CONFIG_MAKE_PRINTDIRECTORY) -C $@ ../tools/bootloader/lpcfix: cd ../tools/bootloader && $(MAKE) diff --git a/firmware/Makefile.inc b/firmware/Makefile.inc index 2c06605..7085dd9 100644 --- a/firmware/Makefile.inc +++ b/firmware/Makefile.inc @@ -42,3 +42,9 @@ CPU_TYPE = cortex-$(CORTEX_TYPE) CFLAGS = -std=c99 -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -DRAMCODE=$(RAMCODE) -fno-builtin LDFLAGS = -nostartfiles + + +CONFIG_MAKE_PRINTDIRECTORY = --no-print-directory +CONFIG_GCC_SHOWCOLUMN = + +-include Makefile.sitespecific diff --git a/simulat0r/firmware/Makefile.inc b/simulat0r/firmware/Makefile.inc index c444d46..cfa0f0a 100644 --- a/simulat0r/firmware/Makefile.inc +++ b/simulat0r/firmware/Makefile.inc @@ -41,6 +41,11 @@ endif # Compiler settings, parameters and flags ########################################################################## -CFLAGS = -std=c99 -c -g -O0 $(INCLUDE_PATHS) -Wall -funsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -DRAMCODE=$(RAMCODE) -fno-builtin -DSIMULATOR -I$(ROOT_PATH)/../simcore -include libc-unc0llide.h +CFLAGS = -std=c99 -c -g -O0 $(INCLUDE_PATHS) -Wall -funsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -DRAMCODE=$(RAMCODE) -fno-builtin -DSIMULATOR -I$(ROOT_PATH)/../simcore -include libc-unc0llide.h $(CONFIG_GCC_SHOWCOLUMN) #LDFLAGS = -nostartfiles + +CONFIG_MAKE_PRINTDIRECTORY = --no-print-directory +CONFIG_GCC_SHOWCOLUMN = + +-include Makefile.sitespecific