aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 8a56abf..d3eb2c4 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -26,14 +26,23 @@ CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CFLAGS = -Os -g -Wall -Wextra -I../include -fno-common \
-mcpu=cortex-m3 -mthumb
-ARFLAGS = rcsv
+# ARFLAGS = rcsv
+ARFLAGS = rcs
OBJS = gpio.o
+# Be silent per default, but 'make V=1' will show all compiler calls.
+ifneq ($(V),1)
+Q := @
+endif
+
all: $(LIBNAME).a
$(LIBNAME).a: $(OBJS)
- $(AR) $(ARFLAGS) $@ $^
+ $(Q)$(AR) $(ARFLAGS) $@ $^
+
+%.o: %.c
+ $(Q)$(CC) $(CFLAGS) -o $@ -c $<
clean:
- rm -f *.o $(LIBNAME).a
+ $(Q)rm -f *.o $(LIBNAME).a