This Makefile rule doesn't have to include all *.cc files at once. They can be
compiled separately.
Note that this slows down compilation slightly, but it also allows better
parallel (jobserver) compilation; for example, you can use `make -j4' to
perform separate compilations using 4 different threads, utilizing a multi-core
system more effectively.
snapshot.o: mymemory.h snapshot.h snapshotimp.h snapshot.cc
$(CXX) -fPIC -c snapshot.cc $(CPPFLAGS)
-$(MODEL_O): $(MODEL_CC) $(MODEL_H)
- $(CXX) -fPIC -c $(MODEL_CC) $(CPPFLAGS)
+%.o: %.cc $(MODEL_H)
+ $(CXX) -fPIC -c $< $(CPPFLAGS)
clean:
rm -f $(BIN) *.o *.so