From a6a198a0dd782a42beb2950133804c3add5a091e Mon Sep 17 00:00:00 2001 From: batt Date: Fri, 19 Oct 2007 08:49:34 +0000 Subject: [PATCH] Fixed non-embedded rules. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@913 38d2e660-2303-0410-9eaa-f027e97ec537 --- rules.mk | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/rules.mk b/rules.mk index 6870cfab..a74ae4ba 100644 --- a/rules.mk +++ b/rules.mk @@ -40,6 +40,7 @@ TRG_HEX = $(TRG:%=$(OUTDIR)/%.hex) TRG_BIN = $(TRG:%=$(OUTDIR)/%.bin) TRG_ROM = $(TRG:%=$(OUTDIR)/%.rom) TRG_COF = $(TRG:%=$(OUTDIR)/%.cof) +TRG_EXE = $(TRG:%=$(OUTDIR)/%) RECURSIVE_TARGETS = all-recursive install-recursive clean-recursive @@ -49,7 +50,7 @@ RECURSIVE_TARGETS = all-recursive install-recursive clean-recursive ifeq ($(EMBEDDED_TARGET),1) all:: all-recursive $(TRG_S19) $(TRG_HEX) $(TRG_BIN) else -all:: all-recursive $(TRG_ELF) +all:: all-recursive $(TRG_EXE) endif # Generate project documentation @@ -125,15 +126,15 @@ $$($(1)_CPPAOBJ): $$(OBJDIR)/$(1)/%.o : %.S # Link: instructions to create elf output file from object files -$$(OUTDIR)/$(1).elf: bumprev $$($(1)_OBJ) $$($(1)_LDSCRIPT) - $L "$(1): Linking $$(OUTDIR)/$(1)" +$$(OUTDIR)/$(1).elf $$(OUTDIR)/$(1)_nostrip: bumprev $$($(1)_OBJ) $$($(1)_LDSCRIPT) + $L "$(1): Linking $$@" @$$(MKDIR_P) $$(dir $$@) -ifeq ($(EMBEDDED_TARGET), 1) $Q $$(LD) $$($(1)_OBJ) $$(LIB) $$(LDFLAGS) $$($(1)_LDFLAGS) -o $$@ -else - $Q $$(LD) $$($(1)_OBJ) $$(LIB) $$(LDFLAGS) $$($(1)_LDFLAGS) -o $$(OUTDIR)/$(1)_nostrip - $Q $$(STRIP) -o $$(OUTDIR)/$(1) $$(OUTDIR)/$(1)_nostrip -endif + +# Strip debug info +$$(OUTDIR)/$(1): $$(OUTDIR)/$(1)_nostrip + $L "$(1): Generating stripped executable $$@" + $Q $$(STRIP) -o $$@ $$^ # Compile and link (program-at-a-time) $$(OUTDIR)/$(1)_whole.elf: bumprev $$($(1)_SRC) $$($(1)_LDSCRIPT) -- 2.25.1