X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=config.mk;h=c0473a157967ec98b33fce8a110ccac7b1277eba;hb=b69f8969fb0a96fd75172e8b88f81029efcefef5;hp=a7bf757fa88f8f7ee7ec131f88cbd55c8be2ee94;hpb=bb650f9a4990206e0d731dbad03b52ca5830bb0e;p=bertos.git diff --git a/config.mk b/config.mk old mode 100755 new mode 100644 index a7bf757f..c0473a15 --- a/config.mk +++ b/config.mk @@ -65,6 +65,11 @@ DPROG ?= -V -c stk500 -P /dev/ttyS0 # PonyProg serial programmer #DPROG = -c dasa2 +# Set to 1 to build for embedded devices. +# e.g. produce target.elf instead of target and target_nostrip +EMBEDDED_TARGET = 1 +#EMBEDDED_TARGET = 0 + OPTCFLAGS = -ffunction-sections -fdata-sections #OPTCFLAGS = -funsafe-loop-optimizations @@ -77,7 +82,7 @@ DEBUGCFLAGS = -ggdb # # define some variables based on the AVR base path in $(AVR) # -CROSS = #avr- +CROSS = arm-elf- CC = $(CROSS)gcc CXX = $(CROSS)g++ AS = $(CC) -x assembler-with-cpp @@ -119,8 +124,11 @@ DEP_FLAGS = -MMD -MP LIST_FLAGS = -Wa,-anhlmsd=$(@:.o=.lst) # Linker flags for generating map files -#bernie: bogus binutils from Fedora 6 can't cope with this -#MAP_FLAGS = -Wl,-Map=$(@:%.elf=%.map),--cref +ifeq ($(EMBEDDED_TARGET), 1) +MAP_FLAGS = -Wl,-Map=$(@:%.elf=%.map),--cref +else +MAP_FLAGS = +endif # Compiler warning flags for both C and C++ WARNFLAGS = \