diff options
author | Dmitrij D. Czarkoff <czarkoff@gmail.com> | 2015-12-25 23:27:11 +0100 |
---|---|---|
committer | Dmitrij D. Czarkoff <czarkoff@gmail.com> | 2015-12-25 23:27:11 +0100 |
commit | 447e86d35d4a0a4aed50056a08c4361c7f903dd8 (patch) | |
tree | 4d0cf43883b4036be615b92efb067b7c4cc57b54 /Makefile | |
parent | c42ab088191d5dd8a2d856dc96cb5b3f90687fc4 (diff) | |
download | imv-447e86d35d4a0a4aed50056a08c4361c7f903dd8.tar.gz |
Fix verbose build
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -5,7 +5,9 @@ BINPREFIX ?= $(PREFIX)/bin MANPREFIX ?= $(PREFIX)/share/man DATAPREFIX ?= $(PREFIX)/share -V ?= +ifeq ($(V),) +MUTE := @ +endif CFLAGS ?= -W -Wall -Wpedantic CFLAGS += -std=gnu11 $(shell sdl2-config --cflags) @@ -24,26 +26,26 @@ CFLAGS += -DIMV_VERSION=\"$(VERSION)\" $(TARGET): $(OBJECTS) @echo "LINKING $@" - $(V:%=@)$(CC) -o $@ $^ $(LDLIBS) $(LDFLAGS) + $(MUTE)$(CC) -o $@ $^ $(LDLIBS) $(LDFLAGS) debug: CFLAGS += -DDEBUG -g -pg debug: $(TARGET) $(BUILDDIR)/%.o: src/%.c - $(V:%=@)mkdir -p $(BUILDDIR) + $(MUTE)mkdir -p $(BUILDDIR) @echo "COMPILING $@" - $(V:%=@)$(CC) -c $(CFLAGS) -o $@ $< + $(MUTE)$(CC) -c $(CFLAGS) -o $@ $< test_%: test/%.c src/%.c @echo "BUILDING $@" - $(V:%=@)$(CC) -o $@ -Isrc -W -Wall -std=gnu11 -lcmocka $^ + $(MUTE)$(CC) -o $@ -Isrc -W -Wall -std=gnu11 -lcmocka $^ check: $(TESTS) @echo "RUNNING TESTS" - $(V:%=@)for t in "$(TESTS)"; do ./$$t; done + $(MUTE)for t in "$(TESTS)"; do ./$$t; done clean: - $(V:%=@)$(RM) $(TARGET) $(OBJECTS) $(TESTS) + $(MUTE)$(RM) $(TARGET) $(OBJECTS) $(TESTS) install: $(TARGET) install -D -m 0755 $(TARGET) $(DESTDIR)$(BINPREFIX)/imv |