Have you got LDFLAGS and CPPFLAGS the right way round?
$(EXE): $(OBJECTS)
$(CXX) $(CPPFLAGS) $(OBJECTS) -o $@
.cpp.o:
$(CXX) -c $(SOURCES) -o $@ $(LDFLAGS) |
And your inference rule doesn't look right. Why are you passing $(SOURCES) to the compiler here? (this rule is about converting one .cpp file to one .o file)
make --just-print (as ne555 mentioned), or equivalently make -n (if you're lazy) will help.
And make --print-data-base or make -p will print out all the predefined rules, including
CXX = g++
# Not a target:
.cpp.o:
# Implicit rule search has not been done.
# Modification time never checked.
# File has not been updated.
# commands to execute (built-in):
$(COMPILE.cpp) $(OUTPUT_OPTION) $<
COMPILE.cpp = $(COMPILE.cc)
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
Andy