Merge branch 'mylan2' into mylan

This commit is contained in:
mcolonna 2024-04-24 13:29:49 +02:00
commit 24d8b38510
43 changed files with 1395 additions and 17 deletions

38
libft/Makefile Normal file
View file

@ -0,0 +1,38 @@
# The interesting part
NAME = libft.a
SRCS = ./
INCLUDES = ./
FUNCTIONS = \
isalpha isdigit isalnum isascii isprint \
toupper tolower \
strncmp strlen strlcpy strlcat strchr strrchr strnstr strdup \
strmapi striteri substr strjoin strtrim split \
memset bzero memcpy memmove memchr memcmp calloc \
atoi itoa \
putchar_fd putstr_fd putendl_fd putnbr_fd
CODE = $(addprefix ft_, $(FUNCTIONS))
# It works and I probably won't change it for the rest of my life
C_FILES = $(addsuffix .c,$(addprefix $(SRCS),$(CODE)))
O_FILES = $(addsuffix .o,$(addprefix $(SRCS),$(CODE)))
CC = cc -Wall -Wextra -Werror
AR = ar rcs
MAKE = make
all : $(NAME)
$(NAME) : $(O_FILES)
$(AR) $(NAME) $(O_FILES)
%.o : %.c
$(CC) -I $(INCLUDES) -c $< -o $@
clean :
rm -f $(O_FILES)
fclean : clean
rm -f $(NAME)
re : fclean all
.PHONY : all clean fclean re