Add ft_eoflags to replace ft_skipchars. Improve Makefile

This commit is contained in:
gbaconni
2022-04-26 12:13:32 +02:00
parent c20463e27a
commit 5cb8d465bf
5 changed files with 59 additions and 12 deletions

View File

@@ -6,7 +6,7 @@
# By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/01/18 15:11:16 by gbaconni #+# #+# #
# Updated: 2022/04/25 22:39:57 by gbaconni ### lausanne.ch #
# Updated: 2022/04/26 12:11:46 by gbaconni ### ########.fr #
# #
# **************************************************************************** #
#
@@ -41,15 +41,15 @@ endif
ifeq ($(DEBUG), 1)
CFLAGS += -g -O0 -fsanitize=address -fsanitize=undefined -fsanitize=signed-integer-overflow
endif
ifeq ($(LEAK), 1)
CFLAGS += -g -O0
endif
VALGRIND = valgrind
VALGRINDFLAGS = --quiet --leak-check=full --show-leak-kinds=all
ifeq ($(LEAK), 1)
CFLAGS += -g -O0
PREFIX += $(VALGRIND) $(VALGRINDFLAGS)
endif
KERNEL = $(shell uname -s)
MACHINE = $(shell uname -m)
RM = rm
RMFLAGS = -f
@@ -103,13 +103,15 @@ test: clean $(NAME)
@$(PREFIX) ./$(NAME) "\t\r\n" ""
@$(PREFIX) ./$(NAME) "%1d" 42
ifeq ($(KERNEL),Linux)
test2: leak
@$(MAKE) test LEAK=1
test3: debug
else
test2: debug
@$(MAKE) test DEBUG=1
endif
test4: fast
test3: fast
@$(MAKE) test FAST=1
test42: clean $(NAME)
@@ -122,7 +124,10 @@ test42: clean $(NAME)
@$(PREFIX) ./$(NAME) "floats: %4.2f %+.0e %E \n" 3.1416 3.1416 3.1416
@$(PREFIX) ./$(NAME) "Width trick: %*d \n" 5 10
@$(PREFIX) ./$(NAME) "%s \n" "A string"
watch:
@read -p "cmd: " cmd; while :; do clear; date "+%F %T"; echo; $${cmd} 2>&1 | tail -n 20; sleep 2; done
doc:
@curl -s -L -z fr.subject.pdf -o fr.subject.pdf $(PDF_FR)
@curl -s -L -z en.subject.pdf -o en.subject.pdf $(PDF_EN)