aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2015-11-11 15:38:34 +0000
committerHarry Jeffery <harry@exec64.co.uk>2015-11-11 15:38:34 +0000
commitee3c3432cbc4a988c534b00cb274a11e3e23d6f8 (patch)
treeb3d42214fa4381f4214e814168bc422cc9bf27b8 /Makefile
parentc155280cb82db4756742e1ae5300d36506af78f3 (diff)
downloadimv-ee3c3432cbc4a988c534b00cb274a11e3e23d6f8.tar.gz
Improve Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 7 insertions, 8 deletions
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