Makefile cleanup, comments, style

This commit is contained in:
Timo Schmidt 2023-04-05 10:47:24 +02:00
parent ad66be3697
commit 998974c177
1 changed files with 22 additions and 17 deletions

View File

@ -1,16 +1,18 @@
SRC = main.c \ SRC = \
io.c \ main.c \
parsing.c \ io.c \
parsing_simple.c \ parsing.c \
solution.c \ parsing_simple.c \
printing.c \ solution.c \
map_helpers.c \ printing.c \
ft_string.c \ map_helpers.c \
ft_string.c \
HEADERS = parsing.h \ HEADERS = \
printing.h \ parsing.h \
solution.h \ printing.h \
ft_string.h \ solution.h \
ft_string.h \
OBJDIR = obj OBJDIR = obj
SRCDIR = srcs SRCDIR = srcs
@ -19,11 +21,11 @@ INCDIR = includes
CC = cc CC = cc
LDFLAGS = LDFLAGS =
CFLAGS = \ CFLAGS = \
-Wall \ -Wall \
-Wextra \ -Wextra \
-Werror \ -Werror \
-I$(INCDIR) \ -I$(INCDIR) \
-fcolor-diagnostics \ -fcolor-diagnostics \
_OBJ = $(SRC:.c=.o) _OBJ = $(SRC:.c=.o)
OBJ = $(addprefix $(OBJDIR)/,$(_OBJ)) OBJ = $(addprefix $(OBJDIR)/,$(_OBJ))
@ -74,6 +76,9 @@ SUCCESS_VALG = && $(SUCCESS_MSG_VALG) || $(FAIL_MSG_VALG)
FAIL = && $(FAIL_MSG) || $(SUCCESS_MSG) FAIL = && $(FAIL_MSG) || $(SUCCESS_MSG)
VALGRIND = valgrind --leak-check=full --error-exitcode=1 VALGRIND = valgrind --leak-check=full --error-exitcode=1
VALGRIND_SMALL = 2>/dev/null 1>&2 valgrind --error-exitcode=1 VALGRIND_SMALL = 2>/dev/null 1>&2 valgrind --error-exitcode=1
# The following 3 lines intentionally contain non-printable characters, namely
# the escape character \x1b. It is soley for the color-coding. If you use this Makefile,
# either download/copy this file or select/copy the text directly and lose the colors.
YLW = : ; YLW = : ;
CYN = : ; CYN = : ;
CLR_RST = && :  CLR_RST = && :