From ad66be3697b2895fd014d2fe9538482eccc53cc8 Mon Sep 17 00:00:00 2001 From: Timo Schmidt Date: Wed, 5 Apr 2023 10:43:24 +0200 Subject: [PATCH] Makefile cleanup --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 39e15d6..387bbc0 100644 --- a/Makefile +++ b/Makefile @@ -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 = && :