From f7b568328c85d3b6012ccb94b3d513dfd629f673 Mon Sep 17 00:00:00 2001 From: Aleksei Chubukov Date: Sat, 2 Dec 2023 21:52:49 +0400 Subject: [PATCH] makefile: fix --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b75b89f..6197f99 100644 --- a/Makefile +++ b/Makefile @@ -6,13 +6,14 @@ # By: achubuko +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2023/12/02 21:33:22 by achubuko #+# #+# # -# Updated: 2023/12/02 21:33:31 by achubuko ### ########.fr # +# Updated: 2023/12/02 21:48:05 by achubuko ### ########.fr # # # # **************************************************************************** # NAME=rush-02 _CFLAGS = -Wall -Wextra -Werror CFLAGS = -g +CFLAGS := $(_CFLAGS) $(CFLAGS) ##################################### ######### MANDATORY RULES ########### ##################################### @@ -42,5 +43,6 @@ norme: cfiles := $(wildcard ex00/*.c) ofiles = $(foreach f, $(cfiles), $(subst .c,.o,$f)) %.o: %.c %.h - $(CC) $(_CFLAGS) $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) -c -o $@ $< $(NAME): $(ofiles) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^