From 3209738e135f8ae5755652150ffeb81cb7d91e75 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Mon, 24 Jan 2011 22:27:57 +0100 Subject: Fixing malloc's template, and fixing a bit more the verbose/quiet mode. --- Makefile | 15 +++++++++------ config/general.mk | 3 ++- os/src/malloc.c | 1 + target-rules.mk | 13 +++++++------ 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index d875646..61db0a1 100644 --- a/Makefile +++ b/Makefile @@ -8,22 +8,25 @@ include common.mk all: libs $(TARGET) clean: clean-generic - $(MAKE) -C FreeRTOS clean - $(MAKE) -C arch clean - $(MAKE) -C os clean + $(Q)$(MAKE) $(MAKE_OPTS) -C FreeRTOS clean + $(Q)$(MAKE) $(MAKE_OPTS) -C arch clean + $(Q)$(MAKE) $(MAKE_OPTS) -C os clean .PHONY: libs FreeRTOS arch os libs: FreeRTOS arch os FreeRTOS: - $(MAKE) -C FreeRTOS + $(E) "[MAKE] Entering FreeRTOS" + $(Q)$(MAKE) $(MAKE_OPTS) -C FreeRTOS arch: - $(MAKE) -C arch + $(E) "[MAKE] Entering arch" + $(Q)$(MAKE) $(MAKE_OPTS) -C arch os: - $(MAKE) -C os + $(E) "[MAKE] Entering os" + $(Q)$(MAKE) $(MAKE_OPTS) -C os include FreeRTOS/config.mk include arch/config.mk diff --git a/config/general.mk b/config/general.mk index 5d0ecca..702deb8 100644 --- a/config/general.mk +++ b/config/general.mk @@ -1 +1,2 @@ -VERBOSE = true +VERBOSE = false +MAKE_OPTS = --no-print-directory diff --git a/os/src/malloc.c b/os/src/malloc.c index 7d5f965..539d976 100644 --- a/os/src/malloc.c +++ b/os/src/malloc.c @@ -1,4 +1,5 @@ #include +#include void * malloc(size_t size) { return _malloc_r(_impure_ptr, size); diff --git a/target-rules.mk b/target-rules.mk index 1ce9487..6397bec 100644 --- a/target-rules.mk +++ b/target-rules.mk @@ -1,9 +1,9 @@ %.o: %.c - $(E) [TC] Compiling $< + $(E) "[TC] Compiling $<" $(Q)$(TARGET_CC) $(addprefix -I, $(TARGET_INCLUDES)) $(TARGET_CPPFLAGS) -c -o $@ $< %.o: %.s - $(E) [TS] Compiling $< + $(E) "[TS] Compiling $<" $(Q)$(TARGET_AS) $(addprefix -I, $(TARGET_INCLUDES)) $(TARGET_CPPFLAGS) -c -o $@ $< TARGET_OBJS = $(addsuffix .o, $(basename $(TARGET_SRCS))) @@ -16,20 +16,21 @@ TARGET_OBJS += $(addsuffix .o, $(basename $(TARGET))) endif $(TARGET_ELF): $(TARGET_OBJS) - $(E) [TL] Linking $@ + $(E) "[TL] Linking $@" $(Q)$(TARGET_LD) -Wl,--gc-sections -Wl,-O3 -Wl,-Map=$(TARGET_MAP) -o $@ $^ -T$(LDSCRIPT) $(LIBS) $(TARGET_MAP): $(TARGET_ELF) $(TARGET_BIN): $(TARGET_ELF) - $(E) [TB] Creating $@ + $(E) "[TB] Creating $@" $(Q)$(TARGET_OBJCOPY) $< -O binary $@ $(TARGET_LIB): $(TARGET_OBJS) - $(E) [TLIB] Creating $@ + $(E) "[TLIB] Creating $@" $(Q)$(TARGET_AR) rcs $@ $^ .PHONY: clean-generic clean-generic: - rm -f $(TARGET_LIB) $(TARGET_OBJS) $(TARGET) $(TARGET_ELF) $(TARGET_BIN) + $(E) "[CLEAN] $(CURDIR)" + $(Q)rm -f $(TARGET_LIB) $(TARGET_OBJS) $(TARGET) $(TARGET_ELF) $(TARGET_BIN) -- cgit v1.2.3