Quieter build
This commit is contained in:
parent
ddcfa5b1b2
commit
a125975737
6 changed files with 124 additions and 8 deletions
32
common.mk
32
common.mk
|
|
@ -1,19 +1,39 @@
|
|||
CFLAGS := $(shell pkg-config --cflags glib-2.0) -std=c99
|
||||
CFLAGS := $(shell pkg-config --cflags glib-2.0) -std=gnu99 -Wall -Wextra -Werror
|
||||
LDFLAGS := $(shell pkg-config --libs glib-2.0)
|
||||
CC := gcc
|
||||
|
||||
# Set V=1 for verbose mode...
|
||||
V := 0
|
||||
CFLAGS += -DINCLUDE_TESTS
|
||||
HUSH = $(TOPLEVEL)/lib/hush
|
||||
|
||||
.SUFFIX:
|
||||
# Check to make sure variables are properly set
|
||||
ifeq ($(TOPLEVEL),)
|
||||
$(error $$TOPLEVEL is unset)
|
||||
endif
|
||||
|
||||
#.SUFFIXES:
|
||||
|
||||
ifeq ($(V),0)
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
.DEFAULT_GOAL:=all
|
||||
|
||||
%.a:
|
||||
%.a: | $(HUSH)
|
||||
-rm -f $@
|
||||
ar crv $@ $^
|
||||
$(if $(findstr 0,$(V)),$(HUSH) "Archiving $@",) ar cr $@ $^
|
||||
|
||||
|
||||
ifeq ($(V),0)
|
||||
# silent mode
|
||||
%.o: %.c | $(HUSH)
|
||||
$(HUSH) "Compiling $<" $(CC) $(CFLAGS) -c -o $@ $<
|
||||
else
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
endif
|
||||
clean:
|
||||
-rm -f $(OUTPUTS)
|
||||
|
||||
$(TOPLEVEL)/lib/hush: $(TOPLEVEL)/lib/hush.c
|
||||
make -C $(TOPLEVEL)/lib hush
|
||||
Loading…
Add table
Add a link
Reference in a new issue