# **************************************************************************** # # LE - / # # / # # Makefile .:: .:/ . .:: # # +:+:+ +: +: +:+:+ # # By: rbousset +:+ +: +: +:+ # # #+# #+ #+ #+# # # Created: 2019/10/08 15:04:55 by rbousset #+# ## ## #+# # # Updated: 2019/10/13 14:01:21 by rbousset ### #+. /#+ ###.fr # # / # # / # # **************************************************************************** # SRCS_DIR = ./ SRCS = \ ft_memset.c \ ft_bzero.c \ ft_memcpy.c \ ft_memccpy.c \ ft_memmove.c \ ft_memchr.c \ ft_memcmp.c \ ft_strlen.c \ ft_isalpha.c \ ft_isdigit.c \ ft_isalnum.c \ ft_isascii.c \ ft_isprint.c \ ft_tolower.c \ ft_toupper.c \ ft_strchr.c \ ft_strrchr.c \ ft_strncmp.c \ ft_strlcpy.c \ ft_strlcat.c \ ft_strnstr.c \ ft_atoi.c \ 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_putchar_fd.c \ ft_putstr_fd.c \ ft_putendl_fd.c \ ft_putnbr_fd.c BONUS_SRCS_DIR = ./ BONUS_SRCS = \ ft_lstnew_bonus.c \ ft_lstadd_front_bonus.c \ ft_lstsize_bonus.c \ ft_lstlast_bonus.c \ ft_lstadd_back_bonus.c \ ft_lstdelone_bonus.c \ ft_lstclear_bonus.c \ ft_lstiter_bonus.c \ ft_lstmap_bonus.c \ ft_putchar_bonus.c \ ft_putstr_bonus.c \ ft_putendl_bonus.c \ ft_putnbr_bonus.c \ ft_strcat_bonus.c \ ft_strcmp_bonus.c \ ft_isspace_bonus.c \ ft_sqrt_bonus.c OBJS_DIR = ./ #OBJS = $(patsubst ${SRCS_DIR}%.c,${OBJS_DIR}%.o,${SRCS}) OBJS = ${SRCS:.c=.o} BONUS_OBJS_DIR = ./ B_OBJS = ${BONUS_SRCS:.c=.o} #B_OBJS = \ $(patsubst ${SRCS_DIR}bonus/%.c,${OBJS_DIR}bonus/%.o,${BONUS_SRCS}) INCS_DIR = ./ CC = gcc CFLAGS = -Wall -Wextra -Werror NAME = libft.a RM = rm -rf AR = ar rcs %.o: %.c ${CC} ${CFLAGS} -I${INCS_DIR} -c $< -o $@ $(NAME): ${OBJS} ${AR} ${NAME} ${OBJS} all: ${NAME} bonus: all ${B_OBJS} ${AR} ${NAME} ${B_OBJS} clean: ${RM} ${OBJS} ${B_OBJS} fclean: clean ${RM} ${NAME} re: fclean all build: ${OBJS} ${B_OBJS} ${CC} ${CFLAGS} -g3 -fsanitize=address -I./ -o a.out \ ${OBJS} ${B_OBJS} main.c default: all .PHONY: all clean clean fclean re bonus run