aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorUwe Hermann2009-07-16 14:59:06 +0200
committerUwe Hermann2009-07-16 14:59:06 +0200
commit1c459b8c48c9a7369ecc88691c7a7f63cf89b325 (patch)
tree70a4eae41175cbc56c084c875cd44bc73691653a /example
parentf0661cb343976d752f512644dc117125d102f89f (diff)
Add 'make V=1' support for the example blink code.
Diffstat (limited to 'example')
-rw-r--r--example/Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/example/Makefile b/example/Makefile
index b6f4f9a..28a4245 100644
--- a/example/Makefile
+++ b/example/Makefile
@@ -29,14 +29,19 @@ CFLAGS = -Os -g -Wall -Wextra -I../include -fno-common \
LDFLAGS = -L../lib -T$(BINARY).ld -nostartfiles
OBJS = $(BINARY).o
+# Be silent per default, but 'make V=1' will show all compiler calls.
+ifneq ($(V),1)
+Q := @
+endif
+
all: $(BINARY)
$(BINARY): $(OBJS) $(BINARY).ld
- $(LD) $(LDFLAGS) -o $(BINARY) $(OBJS) -lopenstm32
+ $(Q)$(LD) $(LDFLAGS) -o $(BINARY) $(OBJS) -lopenstm32
$(BINARY).o: $(BINARY).c
- $(CC) $(CFLAGS) -c $(BINARY).c
+ $(Q)$(CC) $(CFLAGS) -c $(BINARY).c
clean:
- rm -f *.o $(BINARY)
+ $(Q)rm -f *.o $(BINARY)