summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2011-01-24 22:27:57 +0100
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2011-01-24 22:27:57 +0100
commit3209738e135f8ae5755652150ffeb81cb7d91e75 (patch)
tree00aa5cbe7b3ba0a866c6ce409829fa2e00d7de52
parent250095c7bc783f415b3958b1099216e8953600e7 (diff)
Fixing malloc's template, and fixing a bit more the verbose/quiet mode.
-rw-r--r--Makefile15
-rw-r--r--config/general.mk3
-rw-r--r--os/src/malloc.c1
-rw-r--r--target-rules.mk13
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 <reent.h>
+#include <malloc.h>
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)