From ee3c3432cbc4a988c534b00cb274a11e3e23d6f8 Mon Sep 17 00:00:00 2001 From: Harry Jeffery Date: Wed, 11 Nov 2015 15:38:34 +0000 Subject: Improve Makefile --- Makefile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0b7843a..00c009f 100644 --- a/Makefile +++ b/Makefile @@ -12,20 +12,19 @@ SOURCES = $(wildcard src/*.c) OBJECTS = $(patsubst src/%.c,$(BUILDDIR)/%.o,$(SOURCES)) $(TARGET): $(OBJECTS) - $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) + @echo "LINKING $@" + @$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) debug: CFLAGS += -DDEBUG -g -pg debug: $(TARGET) -$(BUILDDIR)/%.o: src/%.c $(BUILDDIR) - $(CC) -c $(CFLAGS) -o $@ $< - -$(BUILDDIR): - mkdir -p $(BUILDDIR) +$(BUILDDIR)/%.o: src/%.c + @mkdir -p $(BUILDDIR) + @echo "COMPILING $@" + @$(CC) -c $(CFLAGS) -o $@ $< clean: - $(RM) $(TARGET) $(OBJECTS) - rmdir $(BUILDDIR) + @$(RM) $(TARGET) $(OBJECTS) install: $(TARGET) install -m 0755 $(TARGET) $(prefix)/bin -- cgit v1.2.3