Why make keeps recompiling all the objects?
<p>I've been trying to make this Makefile to work at least three times now. With each iteration I am getting closer to my goal, fixing some previous problems while re-reading the official GNU docs. Now I'm left with only one place which I don't understand.</p>

<p>Here's the Makefile:</p>

<pre class="lang-none prettyprint-override"><code>MAKEFLAGS=-j2
CC=clang++
OPTIMALIZATION=-O2
CFLAGS=-c -std=c++11 -gsplit-dwarf -I. -Iengine -Iengine/bootstrap
LDFLAGS=-lglut -lGL -lGLU -lGLEW -lSOIL -lassimp
SOURCES=$(wildcard *.cpp engine/*.cpp engine/lighting/*.cpp engine/bootstrap/*.cpp)
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=$(addprefix build/,$(shell basename ${PWD}))

.PHONY: depend clean

all: $(SOURCES) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
    $(CC) $(addprefix build/,$(notdir $(OBJECTS))) -o $@ $(LDFLAGS)

.cpp.o:
    $(CC) $(CFLAGS) $&lt; -o build/$(notdir $@)

run: all
    ./$(EXECUTABLE)

clean:
    rm -rf build/*

depend: $(SOURCES)
    makedepend $^

# DO NOT DELETE
</code></pre>

<p>My goal is to build all the files into <code>./build</code> directory. And I recently managed to do that with some file name functions, as the GNU docs describe.</p>

<p>But now every time I run <code>make</code> or <code>make run</code>, it recompiles the entire project.</p>

<p>How can I fix it to work only for files that have been changed recently?</p>