From 54da1d608ed612741db0362a3abdad44031acf67 Mon Sep 17 00:00:00 2001 From: Andrei Pago Date: Wed, 5 Apr 2023 20:14:23 +0200 Subject: [PATCH] Revert "Makefile???" This reverts commit 56a46c0bb0585cf4ae59f91d3991b53279c29885. --- Makefile | 43 +++---------------------------------------- 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile index f86db1f..0f34232 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ SRC = \ HEADERS = ft_bsq.h -OBJDIR = obj +OBJDIR = srcs SRCDIR = srcs INCDIR = includes @@ -22,20 +22,18 @@ CFLAGS = \ -Wextra \ -Werror \ -I$(INCDIR) \ - -fcolor-diagnostics \ _OBJ = $(SRC:.c=.o) OBJ = $(addprefix $(OBJDIR)/,$(_OBJ)) DEPS = $(addprefix $(INCDIR)/,$(HEADERS)) RM = /bin/rm -f -RMDIR = /bin/rmdir .DEFAULT_GOAL = all NAME ?= bsq -.PHONY: re fclean clean all test tests run valgrind +.PHONY: re fclean clean all all: $(NAME) @@ -44,46 +42,11 @@ clean: fclean: clean $(RM) $(NAME) - @$(RMDIR) $(OBJDIR) 2>/dev/null || true re: fclean all $(NAME): $(OBJ) $(CC) $(LDFLAGS) $^ -o $@ -$(OBJ): | $(OBJDIR) - $(OBJDIR)/%.o: $(SRCDIR)/%.c $(DEPS) - @norminette $< >/dev/null || { printf '\033[101;37m%s\033[m\n' "!Norminette Failed>>>"; norminette $<; printf '\033[101;37m%s\033[m\n' "<</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 = : ; -CYN = : ; -CLR_RST = && :  - -run: - @clear - $(CYN) $(VALGRIND_SMALL) ./$(NAME) $(CLR_RST) $(SUCCESS_VALG) - $(YLW) ./$(NAME) $(CLR_RST) $(SUCCESS) - -valgrind: re - $(CYN) $(VALGRIND) ./$(NAME) ./assets/subject.map ./assets/full.map $(CLR_RST) $(SUCCESS_VALG) + $(CC) $(CFLAGS) -c $< -o $@ \ No newline at end of file