1
0
libft_new/Makefile

77 lines
1.8 KiB
Makefile
Raw Normal View History

2023-11-03 16:21:15 +01:00
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/11/01 11:03:22 by adjoly #+# #+# #
2023-11-11 11:56:43 +01:00
# Updated: 2023/11/11 11:49:54 by adjoly ### ########.fr #
2023-11-03 16:21:15 +01:00
# #
# **************************************************************************** #
NAME = libft.a
2023-11-03 19:49:13 +01:00
CC = clang
2023-11-03 16:21:15 +01:00
SRCS = ft_atoi.c \
ft_bzero.c \
ft_isalnum.c \
ft_isalpha.c \
ft_isascii.c \
ft_isdigit.c \
2023-11-05 15:12:25 +01:00
ft_isprint.c \
2023-11-03 16:21:15 +01:00
ft_putchar_fd.c \
ft_putnbr_fd.c \
ft_putstr_fd.c \
ft_strdup.c \
2023-11-03 16:21:15 +01:00
ft_memcpy.c \
ft_memset.c \
2023-11-06 11:00:52 +01:00
ft_memmove.c \
2023-11-03 16:21:15 +01:00
ft_strlcpy.c \
ft_strlen.c \
ft_substr.c \
ft_tolower.c \
ft_toupper.c \
2023-11-04 18:37:19 +01:00
ft_strlcat.c \
ft_strjoin.c \
2023-11-05 14:43:39 +01:00
ft_strncmp.c \
2023-11-06 11:00:52 +01:00
ft_itoa.c \
ft_calloc.c \
2023-11-08 12:46:30 +01:00
ft_memchr.c \
ft_memcmp.c \
ft_strchr.c \
ft_strrchr.c \
ft_strnstr.c \
2023-11-10 18:49:34 +01:00
ft_putendl_fd.c \
2023-11-11 01:28:12 +01:00
ft_strtrim.c \
2023-11-11 11:20:15 +01:00
ft_split.c \
2023-11-11 11:56:43 +01:00
ft_strmapi.c \
2023-11-06 11:00:52 +01:00
2023-11-03 16:21:15 +01:00
OBJS = $(SRCS:.c=.o)
2023-11-11 11:20:15 +01:00
FLAGS = -g -Werror -Wall -Wextra
2023-11-03 16:21:15 +01:00
HEADER = libft.h
$(NAME): $(OBJS)
ar -rcs $(NAME) $(OBJS)
# so:
# $(CC) -nostartfiles -fPIC $(CFLAGS) $(SRCS)
# gcc -nostartfiles -shared -o libft.so $(OBJS)
2023-11-04 18:37:19 +01:00
2023-11-03 16:21:15 +01:00
%.o: %.c
$(CC) $(FLAGS) -I $(HEADER) $< -c -o $@
all: $(NAME)
clean:
rm -f $(OBJS)
fclean: clean
rm -f $(NAME)
re: fclean all
.PHONY: clean all re fclean