Makefile: separate sources by allowed functions

This commit is contained in:
Khaïs COLIN 2024-10-21 10:46:19 +02:00
parent fb498eca6d
commit 55ee770fa8

View file

@ -6,13 +6,13 @@
# By: kcolin <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/10/14 13:43:59 by kcolin #+# #+# #
# Updated: 2024/10/19 18:39:43 by kcolin ### ########.fr #
# Updated: 2024/10/21 10:44:42 by kcolin ### ########.fr #
# #
# **************************************************************************** #
NAME = libft.a
CFLAGS = -Wall -Wextra -Werror -ggdb
SOURCES = ft_isalpha.c \
SOURCES_NOTHING_ALLOWED = ft_isalpha.c \
ft_isdigit.c \
ft_isalnum.c \
ft_isascii.c \
@ -33,19 +33,23 @@ SOURCES = ft_isalpha.c \
ft_memcmp.c \
ft_strnstr.c \
ft_atoi.c \
ft_calloc.c \
ft_striteri.c
SOURCES_MALLOC_ALLOWED = ft_calloc.c \
ft_strdup.c \
ft_substr.c \
ft_strjoin.c \
ft_strtrim.c \
ft_split.c \
ft_itoa.c \
ft_strmapi.c \
ft_striteri.c \
ft_putchar_fd.c \
ft_strmapi.c
SOURCES_MALLOC_FREE_ALLOWED = ft_split.c
SOURCES_WRITE_ALLOWED = ft_putchar_fd.c \
ft_putstr_fd.c \
ft_putendl_fd.c \
ft_putnbr_fd.c
SOURCES = $(SOURCES_NOTHING_ALLOWED) \
$(SOURCES_MALLOC_ALLOWED) \
$(SOURCES_MALLOC_FREE_ALLOWED) \
$(SOURCES_WRITE_ALLOWED)
OBJECTS = $(SOURCES:.c=.o)
.PHONY: all