File: Makefile.deps

package info (click to toggle)
libloki 0.1.7-4
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 6,568 kB
  • sloc: cpp: 30,476; ansic: 1,974; makefile: 365; php: 316; perl: 108
file content (26 lines) | stat: -rw-r--r-- 518 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.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