diff options
| author | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2019-10-30 15:00:17 +0100 | 
|---|---|---|
| committer | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2019-10-30 15:00:17 +0100 | 
| commit | a3f3fc742daa4b28094b5ebe9be60263c41979d1 (patch) | |
| tree | 5a6ce0fba04b55d6f4607038eeace0396e97f0e6 /libft/Makefile | |
| parent | commit, lotta stuff (diff) | |
| download | 42-minishell-a3f3fc742daa4b28094b5ebe9be60263c41979d1.tar.gz 42-minishell-a3f3fc742daa4b28094b5ebe9be60263c41979d1.tar.bz2 42-minishell-a3f3fc742daa4b28094b5ebe9be60263c41979d1.tar.xz 42-minishell-a3f3fc742daa4b28094b5ebe9be60263c41979d1.tar.zst 42-minishell-a3f3fc742daa4b28094b5ebe9be60263c41979d1.zip | |
New libft, feelsgoodman
Diffstat (limited to 'libft/Makefile')
| -rw-r--r-- | libft/Makefile | 174 | 
1 files changed, 83 insertions, 91 deletions
| diff --git a/libft/Makefile b/libft/Makefile index fbe5c6e..83c4b54 100644 --- a/libft/Makefile +++ b/libft/Makefile @@ -11,114 +11,106 @@  #                                                         /                    #  # **************************************************************************** # -SRCS_DIR		= ./ - +SRCS_DIR		= src/  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 - +				${SRCS_DIR}ft_memset.c \ +				${SRCS_DIR}ft_bzero.c \ +				${SRCS_DIR}ft_memcpy.c \ +				${SRCS_DIR}ft_memccpy.c \ +				${SRCS_DIR}ft_memmove.c \ +				${SRCS_DIR}ft_memchr.c \ +				${SRCS_DIR}ft_memcmp.c \ +				${SRCS_DIR}ft_strlen.c \ +				${SRCS_DIR}ft_isalpha.c \ +				${SRCS_DIR}ft_isdigit.c \ +				${SRCS_DIR}ft_isalnum.c \ +				${SRCS_DIR}ft_isascii.c \ +				${SRCS_DIR}ft_isprint.c \ +				${SRCS_DIR}ft_tolower.c \ +				${SRCS_DIR}ft_toupper.c \ +				${SRCS_DIR}ft_strchr.c \ +				${SRCS_DIR}ft_strrchr.c \ +				${SRCS_DIR}ft_strncmp.c \ +				${SRCS_DIR}ft_strlcpy.c \ +				${SRCS_DIR}ft_strlcat.c \ +				${SRCS_DIR}ft_strnstr.c \ +				${SRCS_DIR}ft_atoi.c \ +				${SRCS_DIR}ft_calloc.c \ +				${SRCS_DIR}ft_strdup.c \ +				\ +				${SRCS_DIR}ft_substr.c \ +				${SRCS_DIR}ft_strjoin.c \ +				${SRCS_DIR}ft_strtrim.c \ +				${SRCS_DIR}ft_split.c \ +				${SRCS_DIR}ft_itoa.c \ +				${SRCS_DIR}ft_strmapi.c \ +				${SRCS_DIR}ft_putchar_fd.c \ +				${SRCS_DIR}ft_putstr_fd.c \ +				${SRCS_DIR}ft_putendl_fd.c \ +				${SRCS_DIR}ft_putnbr_fd.c \ +				\ +				${SRCS_DIR}ft_lstnew.c \ +				${SRCS_DIR}ft_lstadd_front.c \ +				${SRCS_DIR}ft_lstsize.c \ +				${SRCS_DIR}ft_lstlast.c \ +				${SRCS_DIR}ft_lstadd_back.c \ +				${SRCS_DIR}ft_lstdelone.c \ +				${SRCS_DIR}ft_lstclear.c \ +				${SRCS_DIR}ft_lstiter.c \ +				${SRCS_DIR}ft_lstmap.c \ +				${SRCS_DIR}ft_putchar.c \ +				${SRCS_DIR}ft_putstr.c \ +				${SRCS_DIR}ft_putendl.c \ +				${SRCS_DIR}ft_putnbr.c \ +				${SRCS_DIR}ft_strnlen.c \ +				${SRCS_DIR}ft_strcat.c \ +				${SRCS_DIR}ft_strcmp.c \ +				${SRCS_DIR}ft_isspace.c \ +				${SRCS_DIR}ft_sqrt.c + +OBJS_DIR		= obj/ +OBJS			= $(patsubst ${SRCS_DIR}%.c,${OBJS_DIR}%.o,${SRCS}) + +INCS_DIR		= inc/ +INCS			= libft.h + +CC				= clang  CFLAGS			= -Wall -Wextra -Werror +DEBUG			= -g3 +FSANITIZE		= -fsanitize=address + +AR				= ar rcs  NAME			= libft.a +MKDIR			= mkdir -p  RM				= rm -rf -AR				= ar rcs - -%.o:		%.c -	${CC} ${CFLAGS} -I${INCS_DIR} -c $< -o $@ +${OBJS_DIR}%.o:		${SRCS_DIR}%.c ${INCS_DIR}${INCS} +	@if [ ! -a ${OBJS_DIR} ]; then \ +		${MKDIR} ${OBJS_DIR}; \ +	fi +	@${CC} ${CFLAGS} -I${INCS_DIR} -c $< -o $@ +	@echo "Compiled $(subst ${OBJS_DIR},,$@)!"  $(NAME):	${OBJS} -	${AR} ${NAME} ${OBJS} +	@${AR} ${NAME} ${OBJS} +	@echo +	@echo "libft.a linked!"  all:		${NAME} -bonus: 		all ${B_OBJS}  -	${AR} ${NAME} ${B_OBJS} -  clean:  -	${RM} ${OBJS} ${B_OBJS} +	@${RM} ${OBJS}  +	@echo "Removed obj files!"  fclean:		clean -	${RM} ${NAME} +	@${RM} ${OBJS_DIR} +	@${RM} ${NAME} +	@echo "Removed everything!"  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 +.PHONY:	all clean clean fclean re | 
