diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2015-11-11 15:38:34 +0000 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2015-11-11 15:38:34 +0000 |
commit | ee3c3432cbc4a988c534b00cb274a11e3e23d6f8 (patch) | |
tree | b3d42214fa4381f4214e814168bc422cc9bf27b8 /Makefile | |
parent | c155280cb82db4756742e1ae5300d36506af78f3 (diff) | |
download | imv-ee3c3432cbc4a988c534b00cb274a11e3e23d6f8.tar.gz |
Improve Makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -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 |