Makefile: move -MMD option out of CFLAGS
This commit is contained in:
parent
9a63c16cd2
commit
e16a4396d7
4
Makefile
4
Makefile
@ -11,7 +11,7 @@ VPATH = $(SPATH) $(IPATH) $(DPATH) $(OPATH)
|
||||
|
||||
# compiler and compiler flags
|
||||
CC = g++
|
||||
CFLAGS = -MMD -I$(IPATH) -pthread -lrt
|
||||
CFLAGS = -I$(IPATH) -pthread -lrt
|
||||
|
||||
# list of object files
|
||||
SOURCES = $(wildcard $(SPATH)/*.cpp)
|
||||
@ -39,7 +39,7 @@ $(DPATH) $(OPATH):
|
||||
$(CC) $(CFLAGS) -o $@ $^
|
||||
# Make the object and dependency files
|
||||
$(OPATH)/%.o: $(SPATH)/%.cpp
|
||||
$(CC) $(CFLAGS) -MF $(DPATH)/$(@F:.o=.d) -o $@ -c $<
|
||||
$(CC) $(CFLAGS) -MMD -MF $(DPATH)/$(@F:.o=.d) -o $@ -c $<
|
||||
|
||||
# Don't autodelete object files:
|
||||
.SECONDARY: $(OPATH)/%.o
|
||||
|
Loading…
Reference in New Issue
Block a user