X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=config.mk;h=c0473a157967ec98b33fce8a110ccac7b1277eba;hb=272271646858e81780184331f386656203223575;hp=604cd639b6d23374bf2d24a59547a7c58b9a427f;hpb=241cc32da8af1981b84d9eafe213ca2dce1bf275;p=bertos.git diff --git a/config.mk b/config.mk index 604cd639..c0473a15 100644 --- 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 @@ -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 = \