makefile with special rules for deps
This commit is contained in:
6
Makefile
6
Makefile
@@ -38,8 +38,8 @@ CC = c++
|
||||
EXT = cpp
|
||||
|
||||
CFLAGS = -Wall -Wextra -Werror $(INCLUDES)
|
||||
CFLAGS += -MMD -MP #see end-page note on header dependencie
|
||||
#CFLAGS += -std=c++98
|
||||
#CFLAGS += -MMD -MP #see end-page note on header dependencie
|
||||
#CFLAGS += -g3
|
||||
|
||||
CFLAGS_STL = $(CFLAGS)
|
||||
@@ -72,7 +72,7 @@ D_OBJS_STL = builds_stl
|
||||
OBJS_STL = $(SRCS:%.$(EXT)=$(D_OBJS_STL)/%.o)
|
||||
|
||||
OBJS = $(OBJS_FT) $(OBJS_STL)
|
||||
#DEPS = $(OBJS:.o=.d) #see end-page note on header dependencie
|
||||
DEPS = $(OBJS:.o=.d) #see end-page note on header dependencie
|
||||
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||
@@ -121,5 +121,5 @@ re: fclean all
|
||||
# header dependencie
|
||||
# https://spin.atomicobject.com/2016/08/26/makefile-c-projects
|
||||
# https://stackoverflow.com/questions/13432127/how-to-use-the-include-directive-in-a-makefile-for-a-specific-target
|
||||
#-include $(DEPS)
|
||||
-include $(DEPS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user