Makefile cleanup

This commit is contained in:
Timo Schmidt 2023-04-05 10:43:24 +02:00
parent c52d665691
commit ad66be3697
1 changed files with 4 additions and 5 deletions

View File

@ -17,6 +17,7 @@ SRCDIR = srcs
INCDIR = includes
CC = cc
LDFLAGS =
CFLAGS = \
-Wall \
-Wextra \
@ -24,8 +25,6 @@ CFLAGS = \
-I$(INCDIR) \
-fcolor-diagnostics \
LDFLAGS =
_OBJ = $(SRC:.c=.o)
OBJ = $(addprefix $(OBJDIR)/,$(_OBJ))
DEPS = $(addprefix $(INCDIR)/,$(HEADERS))
@ -37,7 +36,7 @@ RMDIR = /bin/rmdir
NAME ?= bsq
.PHONY: re fclean clean all
.PHONY: re fclean clean all test tests run valgrind
all: $(NAME)
@ -62,7 +61,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c $(DEPS)
$(OBJDIR):
@mkdir -p $@
tests: test
tests: test valgrind
test: re run fclean
@ -74,7 +73,7 @@ SUCCESS = && $(SUCCESS_MSG) || $(FAIL_MSG)
SUCCESS_VALG = && $(SUCCESS_MSG_VALG) || $(FAIL_MSG_VALG)
FAIL = && $(FAIL_MSG) || $(SUCCESS_MSG)
VALGRIND = valgrind --leak-check=full --error-exitcode=1
VALGRIND_SMALL = 2>/dev/null 1>&2 valgrind --leak-check=full --error-exitcode=1
VALGRIND_SMALL = 2>/dev/null 1>&2 valgrind --error-exitcode=1
YLW = : ;
CYN = : ;
CLR_RST = && :