3de4a064cb
- Makefiles can now be called from sub directories - Makefiles know includes and recompile if they are changed (linux, macosx) - Build all tests except SingletonDll with the static library (linux, macosx) git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@695 7ec92016-0320-0410-acc4-a06ded1c099a
26 lines
518 B
Text
26 lines
518 B
Text
.PHONY: cleandeps
|
|
|
|
ifneq ($(OS),Windows)
|
|
|
|
.static-dep/%.dep: %.cpp
|
|
@mkdir -p $(dir $@)
|
|
$(CXX) -MM -MT $(patsubst %.cpp,%.o,$<) $(CPPFLAGS) $< > $@
|
|
|
|
.shared-dep/%.dep: %.cpp
|
|
@mkdir -p $(dir $@)
|
|
$(CXX) -MM -MT $(patsubst %.cpp,%.lo,$<) $(CPPFLAGS) $< > $@
|
|
|
|
ifneq ($(MAKECMDGOALS),clean)
|
|
ifneq ($(MAKECMDGOALS),distclean)
|
|
-include $(addprefix .static-dep/,$(SRC:.cpp=.dep))
|
|
-include $(addprefix .shared-dep/,$(SRC:.cpp=.dep))
|
|
endif
|
|
endif
|
|
|
|
cleandeps:
|
|
$(RM) -R .static-dep
|
|
$(RM) -R .shared-dep
|
|
|
|
else
|
|
cleandeps:
|
|
endif
|