- some comments in makefile

- multiple infos in computer tuto
This commit is contained in:
asus
2024-01-23 09:59:08 +01:00
parent 3648f72cfe
commit 1302de3e9a
2 changed files with 32 additions and 14 deletions

View File

@@ -46,16 +46,16 @@ VPATH = $(D_SRCS)
LIBS =
F_INCLUDES = $(HEADERS:%=$(D_HEADERS)/%) \
$(TEMPLATES:%=$(D_TEMPLATES)/%)
$(TEMPLATES:%=$(D_TEMPLATES)/%)
INCLUDES = -I$(D_HEADERS) \
-I$(D_TEMPLATES)
-I$(D_TEMPLATES)
D_SRCS = ./srcs
SRCS = main.c
D_HEADERS = ./headers
HEADERS = colors.h \
tests.hpp
tests.hpp
D_TEMPLATES = ./templates
TEMPLATES = template.tpp
@@ -78,6 +78,13 @@ endif
all: $(NAME)
# %.$(EXT) | $(D_OBJS) -> pipe is for order-only prerequisites :
# - for each file "%.$(EXT)" :
# - if it has been modified since last time
# - execute rules on corresponding target file "$(D_OBJS)/%.o"
# - and directory "$(D_OBJS)" is order-only prerequisite :
# - it must exist before executing rule
# - but last time modification is not checked
$(D_OBJS)/%.o: %.$(EXT) | $(D_OBJS)
@echo $(CYAN)"compilation (objects.o) :"$(RESET)
$(CC) $(CFLAGS) -c $< -o $@