Change .d to .dep
This commit is contained in:
parent
6831eaa7c3
commit
ace5db88b3
10
Makefile
10
Makefile
@ -30,7 +30,7 @@ DOCDIR ?= $(DATADIR)/$(LIBNAME)/doc
|
||||
|
||||
SRCS := $(notdir $(wildcard src/*.cpp))
|
||||
OBJS := $(SRCS:.cpp=.o)
|
||||
DEPS := $(SRCS:.cpp=.d)
|
||||
DEPS := $(SRCS:.cpp=.dep)
|
||||
HDRS ?= $(wildcard src/*.hpp)
|
||||
|
||||
CXX ?= g++
|
||||
@ -50,7 +50,7 @@ RM := /bin/rm -rf
|
||||
INSTALL := /usr/bin/install -c
|
||||
|
||||
vpath %.cpp src
|
||||
vpath %.d $(BUILDDIR)
|
||||
vpath %.dep $(BUILDDIR)
|
||||
vpath %.o $(BUILDDIR)
|
||||
|
||||
.PHONY: all clean install prebuild test
|
||||
@ -71,9 +71,9 @@ ifeq ($(UNAME_S),Linux)
|
||||
$(CXX) -g -shared -Wl,-soname,$(SONAME) -o $(OUTDIR)$(REALNAME) $(LDFLAGS) $(LDLIBS) $(addprefix $(BUILDDIR),$(OBJS))
|
||||
endif
|
||||
|
||||
%.o %.d: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -MMD -MP -MT $@ -MF $*.d -c $<
|
||||
@mv $@ $*.d $(BUILDDIR)
|
||||
%.o %.dep: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -MMD -MP -MT $@ -MF $*.dep -c $<
|
||||
@mv $@ $*.dep $(BUILDDIR)
|
||||
|
||||
-include $(addprefix $(BUILDDIR), $(DEPS))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user