update work libft make

This commit is contained in:
Matthos Denys 2021-01-11 18:03:09 +03:00
parent a908c0bcea
commit ed3949df74
84 changed files with 154 additions and 174 deletions

View File

@ -1,60 +0,0 @@
LIBFT = ./libft/libft.a
NAME = libftprintf.a
srcs =
subsrcs =
SRCS = ft_printf.c \
ft_parser.c \
ft_parser_utils.c \
ft_put_c.c \
ft_put_d.c \
ft_put_d_utilc.c \
ft_put_p.c \
ft_put_s.c \
ft_put_u.c \
ft_put_x.c \
ft_put_u.c \
ft_put_u_utilc.c \
ft_put_x.c\
ft_put_x_utilc.c \
ft_put_p.c\
ft_put_p_utilc.c \
putmaket_utils.c\
ft_put_d_undersize.c \
OBJDIR= ./obj/
# addprefix (OBJDIR, OBJS)
SURPL_O = *.o
CC = gcc
CFLAGS = -c -Wall -Wextra -Werror -I .
OBJS = $(SRCS:.c=.o)
VPATH =
$(NAME): $(OBJS)
mkdir -p $(OBJDIR)
$(CC) $(CFLAGS) $(SRCS)
lib:
make bonus -C ./libft
cp libft/libft.a $(NAME)
all : lib $(NAME)
ar -rcs $(NAME) $(OBJS)
clean :
$(MAKE) clean -C ./libft
rm -f $(SURPL_O)
rm -f $(OBJS)
fclean : clean
$(MAKE) fclean -C ./libft
rm -f $(NAME)
re : fclean all

View File

@ -1,14 +1,4 @@
# **************************************************************************** # .PHONY: all clean fclean re
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/10/28 11:52:03 by mdenys #+# #+# #
# Updated: 2021/01/10 22:56:29 by mdenys ### ########.fr #
# #
# **************************************************************************** #
SRCS = ft_isalnum.c ft_isprint.c ft_memcmp.c ft_putchar_fd.c ft_split.c \ SRCS = ft_isalnum.c ft_isprint.c ft_memcmp.c ft_putchar_fd.c ft_split.c \
ft_strlcat.c ft_strncmp.c ft_substr.c ft_atoi.c ft_isalpha.c \ ft_strlcat.c ft_strncmp.c ft_substr.c ft_atoi.c ft_isalpha.c \
@ -16,34 +6,42 @@ SRCS = ft_isalnum.c ft_isprint.c ft_memcmp.c ft_putchar_fd.c ft_split.c \
ft_strnstr.c ft_tolower.c ft_bzero.c ft_isascii.c ft_memccpy.c \ ft_strnstr.c ft_tolower.c ft_bzero.c ft_isascii.c ft_memccpy.c \
ft_memmove.c ft_putnbr_fd.c ft_strdup.c ft_strlen.c ft_strrchr.c \ ft_memmove.c ft_putnbr_fd.c ft_strdup.c ft_strlen.c ft_strrchr.c \
ft_toupper.c ft_calloc.c ft_isdigit.c ft_memchr.c ft_memset.c \ ft_toupper.c ft_calloc.c ft_isdigit.c ft_memchr.c ft_memset.c \
ft_putstr_fd.c ft_strjoin.c ft_strmapi.c ft_strtrim.c ft_putchar.c ft_putstr_fd.c ft_strjoin.c ft_strmapi.c ft_strtrim.c ft_putchar.c\
OBJS = $(SRCS:.c=.o) ft_lstadd_back.c ft_lstadd_front.c ft_lstclear.c \
BONUS = ft_lstadd_back.c ft_lstadd_front.c ft_lstclear.c \
ft_lstdelone.c ft_lstiter.c ft_lstlast.c \ ft_lstdelone.c ft_lstiter.c ft_lstlast.c \
ft_lstmap.c ft_lstnew.c ft_lstsize.c ft_lstmap.c ft_lstnew.c ft_lstsize.c
BONUS_OBJS = $(BONUS:.c=.o)
SRC_DIR = ./src/
OBJ_DIR = ./obj/
OBJS = $(SRCS:%.c=%.o)
OBJS_FILES = $(addprefix $(OBJ_DIR), $(OBJS))
HEADER = libft.h
vpath %.h includes
vpath %.o $(OBJ_DIR)
vpath %.c $(SRC_DIR)
CC = gcc CC = gcc
RM = rm -f RM = rm -f
CFLAGS = -Wall -Wextra -Werror -I. CFLAGS = -Wall -Wextra -Werror -I ./includes/
NAME = libft.a NAME = libft.a
all: $(NAME) all: $(NAME)
$(NAME): $(OBJS) libft.h $(NAME): $(OBJS_FILES)
ar rcs $@ $? ar rcs $@ $?
clean: clean:
$(RM) $(OBJS) $(BONUS_OBJS) $(RM) $(OBJS_FILES)
$(OBJ_DIR)%.o: %.c $(HEADER)
$(CC) $(CFLAGS) -c $< -o $@
fclean: clean fclean: clean
$(RM) $(NAME) $(RM) $(NAME)
re: fclean $(NAME) re: fclean $(NAME)
bonus: $(OBJS) $(BONUS_OBJS) libft.h
ar rcs $(NAME) $(OBJS) $(BONUS_OBJS)
.PHONY: all clean fclean re bonus

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/29 13:36:13 by mdenys #+# #+# */ /* Created: 2020/10/29 13:36:13 by mdenys #+# #+# */
/* Updated: 2020/11/05 17:22:30 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:03 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
static int ch(char ch) static int ch(char ch)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/29 12:19:35 by mdenys #+# #+# */ /* Created: 2020/10/29 12:19:35 by mdenys #+# #+# */
/* Updated: 2020/10/29 18:24:02 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void ft_bzero(void *s, size_t num) void ft_bzero(void *s, size_t num)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/01 19:59:31 by mdenys #+# #+# */ /* Created: 2020/11/01 19:59:31 by mdenys #+# #+# */
/* Updated: 2020/11/01 20:41:24 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void *ft_calloc(size_t num, size_t size) void *ft_calloc(size_t num, size_t size)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/29 16:43:05 by mdenys #+# #+# */ /* Created: 2020/10/29 16:43:05 by mdenys #+# #+# */
/* Updated: 2020/10/29 19:50:43 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
int ft_isalnum(int c) int ft_isalnum(int c)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/29 14:03:52 by mdenys #+# #+# */ /* Created: 2020/10/29 14:03:52 by mdenys #+# #+# */
/* Updated: 2020/10/30 11:46:57 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
int ft_isalpha(int c) int ft_isalpha(int c)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/29 18:53:32 by mdenys #+# #+# */ /* Created: 2020/10/29 18:53:32 by mdenys #+# #+# */
/* Updated: 2020/10/30 11:54:20 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
int ft_isascii(int c) int ft_isascii(int c)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/29 14:29:08 by mdenys #+# #+# */ /* Created: 2020/10/29 14:29:08 by mdenys #+# #+# */
/* Updated: 2020/10/30 11:52:05 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
int ft_isdigit(int ch) int ft_isdigit(int ch)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/29 18:53:32 by mdenys #+# #+# */ /* Created: 2020/10/29 18:53:32 by mdenys #+# #+# */
/* Updated: 2020/10/30 11:53:10 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
int ft_isprint(int c) int ft_isprint(int c)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/03 20:26:38 by mdenys #+# #+# */ /* Created: 2020/11/03 20:26:38 by mdenys #+# #+# */
/* Updated: 2020/11/04 13:20:27 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
static int nbleng(unsigned int n) static int nbleng(unsigned int n)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/04 18:15:55 by mdenys #+# #+# */ /* Created: 2020/11/04 18:15:55 by mdenys #+# #+# */
/* Updated: 2020/11/04 18:36:49 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void ft_lstadd_back(t_list **lst, t_list *new) void ft_lstadd_back(t_list **lst, t_list *new)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/04 17:29:57 by mdenys #+# #+# */ /* Created: 2020/11/04 17:29:57 by mdenys #+# #+# */
/* Updated: 2020/11/04 17:54:55 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void ft_lstadd_front(t_list **lst, t_list *new) void ft_lstadd_front(t_list **lst, t_list *new)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/04 20:53:46 by mdenys #+# #+# */ /* Created: 2020/11/04 20:53:46 by mdenys #+# #+# */
/* Updated: 2020/11/04 21:34:51 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void ft_lstclear(t_list **lst, void (*del)(void*)) void ft_lstclear(t_list **lst, void (*del)(void*))
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/04 18:37:58 by mdenys #+# #+# */ /* Created: 2020/11/04 18:37:58 by mdenys #+# #+# */
/* Updated: 2020/11/04 20:49:50 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void ft_lstdelone(t_list *lst, void (*del)(void *)) void ft_lstdelone(t_list *lst, void (*del)(void *))
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/04 21:10:38 by mdenys #+# #+# */ /* Created: 2020/11/04 21:10:38 by mdenys #+# #+# */
/* Updated: 2020/11/04 21:24:22 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void ft_lstiter(t_list *lst, void (*f)(void *)) void ft_lstiter(t_list *lst, void (*f)(void *))
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/04 18:07:26 by mdenys #+# #+# */ /* Created: 2020/11/04 18:07:26 by mdenys #+# #+# */
/* Updated: 2020/11/04 18:14:43 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
t_list *ft_lstlast(t_list *lst) t_list *ft_lstlast(t_list *lst)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/04 21:25:01 by mdenys #+# #+# */ /* Created: 2020/11/04 21:25:01 by mdenys #+# #+# */
/* Updated: 2020/11/05 16:46:12 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *)) t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *))
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/04 17:06:10 by mdenys #+# #+# */ /* Created: 2020/11/04 17:06:10 by mdenys #+# #+# */
/* Updated: 2020/11/04 17:29:10 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
t_list *ft_lstnew(void *content) t_list *ft_lstnew(void *content)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/04 17:57:03 by mdenys #+# #+# */ /* Created: 2020/11/04 17:57:03 by mdenys #+# #+# */
/* Updated: 2020/11/04 18:06:42 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
int ft_lstsize(t_list *lst) int ft_lstsize(t_list *lst)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/30 15:35:27 by mdenys #+# #+# */ /* Created: 2020/10/30 15:35:27 by mdenys #+# #+# */
/* Updated: 2020/11/04 17:38:29 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void *ft_memccpy(void *dst, const void *src, int ch, size_t n) void *ft_memccpy(void *dst, const void *src, int ch, size_t n)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/30 19:55:27 by mdenys #+# #+# */ /* Created: 2020/10/30 19:55:27 by mdenys #+# #+# */
/* Updated: 2020/11/04 17:40:00 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void *ft_memchr(const void *arr, int c, size_t n) void *ft_memchr(const void *arr, int c, size_t n)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/31 12:46:41 by mdenys #+# #+# */ /* Created: 2020/10/31 12:46:41 by mdenys #+# #+# */
/* Updated: 2020/11/04 17:41:43 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
int ft_memcmp(const void *buf1, const void *buf2, size_t n) int ft_memcmp(const void *buf1, const void *buf2, size_t n)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/30 14:43:54 by mdenys #+# #+# */ /* Created: 2020/10/30 14:43:54 by mdenys #+# #+# */
/* Updated: 2020/10/31 13:33:48 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void *ft_memcpy(void *destination, const void *source, size_t n) void *ft_memcpy(void *destination, const void *source, size_t n)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/30 17:04:51 by mdenys #+# #+# */ /* Created: 2020/10/30 17:04:51 by mdenys #+# #+# */
/* Updated: 2020/11/04 18:41:12 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void *ft_memmove(void *dst, const void *source, size_t n) void *ft_memmove(void *dst, const void *source, size_t n)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/29 10:24:40 by mdenys #+# #+# */ /* Created: 2020/10/29 10:24:40 by mdenys #+# #+# */
/* Updated: 2020/10/29 17:01:59 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void *ft_memset(void *dest, int val, size_t num) void *ft_memset(void *dest, int val, size_t num)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/12/04 22:44:21 by mdenys #+# #+# */ /* Created: 2020/12/04 22:44:21 by mdenys #+# #+# */
/* Updated: 2020/12/04 22:49:12 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void ft_putchar(char c) void ft_putchar(char c)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/04 13:02:20 by mdenys #+# #+# */ /* Created: 2020/11/04 13:02:20 by mdenys #+# #+# */
/* Updated: 2020/11/04 15:47:39 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void ft_putchar_fd(char c, int fd) void ft_putchar_fd(char c, int fd)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/04 14:53:54 by mdenys #+# #+# */ /* Created: 2020/11/04 14:53:54 by mdenys #+# #+# */
/* Updated: 2020/11/04 14:57:01 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void ft_putendl_fd(char *s, int fd) void ft_putendl_fd(char *s, int fd)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/04 15:04:13 by mdenys #+# #+# */ /* Created: 2020/11/04 15:04:13 by mdenys #+# #+# */
/* Updated: 2020/12/16 05:49:18 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void ft_putnbr_fd(long int n, int fd) void ft_putnbr_fd(long int n, int fd)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/04 13:45:44 by mdenys #+# #+# */ /* Created: 2020/11/04 13:45:44 by mdenys #+# #+# */
/* Updated: 2020/11/04 13:48:29 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
void ft_putstr_fd(char *s, int fd) void ft_putstr_fd(char *s, int fd)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/03 13:48:14 by mdenys #+# #+# */ /* Created: 2020/11/03 13:48:14 by mdenys #+# #+# */
/* Updated: 2020/11/03 20:34:46 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
#include <stdlib.h> #include <stdlib.h>
static int ft_isspace(char c, char b) static int ft_isspace(char c, char b)

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/01 13:44:25 by mdenys #+# #+# */ /* Created: 2020/11/01 13:44:25 by mdenys #+# #+# */
/* Updated: 2020/11/05 18:00:06 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
char *ft_strchr(const char *str, int ch) char *ft_strchr(const char *str, int ch)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/01 20:43:44 by mdenys #+# #+# */ /* Created: 2020/11/01 20:43:44 by mdenys #+# #+# */
/* Updated: 2020/11/01 21:11:41 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
char *ft_strdup(const char *str) char *ft_strdup(const char *str)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/02 17:18:40 by mdenys #+# #+# */ /* Created: 2020/11/02 17:18:40 by mdenys #+# #+# */
/* Updated: 2020/11/02 17:56:57 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
char *ft_strjoin(char const *s1, char const *s2) char *ft_strjoin(char const *s1, char const *s2)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/31 17:10:24 by mdenys #+# #+# */ /* Created: 2020/10/31 17:10:24 by mdenys #+# #+# */
/* Updated: 2020/11/05 16:58:02 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
size_t ft_strlcat(char *dst, const char *src, size_t size) size_t ft_strlcat(char *dst, const char *src, size_t size)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/28 19:26:31 by mdenys #+# #+# */ /* Created: 2020/10/28 19:26:31 by mdenys #+# #+# */
/* Updated: 2020/11/05 16:57:58 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
size_t ft_strlcpy(char *dst, const char *src, size_t size) size_t ft_strlcpy(char *dst, const char *src, size_t size)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/28 19:10:44 by mdenys #+# #+# */ /* Created: 2020/10/28 19:10:44 by mdenys #+# #+# */
/* Updated: 2020/11/23 18:40:34 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
int ft_strlen(char *str) int ft_strlen(char *str)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/04 12:41:12 by mdenys #+# #+# */ /* Created: 2020/11/04 12:41:12 by mdenys #+# #+# */
/* Updated: 2020/11/04 13:01:25 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
char *ft_strmapi(char const *s, char (*f)(unsigned int, char)) char *ft_strmapi(char const *s, char (*f)(unsigned int, char))
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/29 12:22:15 by mdenys #+# #+# */ /* Created: 2020/10/29 12:22:15 by mdenys #+# #+# */
/* Updated: 2020/11/05 17:52:29 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
int ft_strncmp(const char *s1, const char *s2, size_t a) int ft_strncmp(const char *s1, const char *s2, size_t a)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/01 18:43:20 by mdenys #+# #+# */ /* Created: 2020/11/01 18:43:20 by mdenys #+# #+# */
/* Updated: 2020/11/04 18:41:20 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
char *ft_strnstr(const char *hst, const char *ndl, size_t size) char *ft_strnstr(const char *hst, const char *ndl, size_t size)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/01 16:14:36 by mdenys #+# #+# */ /* Created: 2020/11/01 16:14:36 by mdenys #+# #+# */
/* Updated: 2020/11/05 17:56:32 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
char *ft_strrchr(const char *str, int ch) char *ft_strrchr(const char *str, int ch)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/02 17:58:31 by mdenys #+# #+# */ /* Created: 2020/11/02 17:58:31 by mdenys #+# #+# */
/* Updated: 2020/11/03 11:18:41 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
char *ft_strtrim(char const *s1, char const *set) char *ft_strtrim(char const *s1, char const *set)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/02 12:21:46 by mdenys #+# #+# */ /* Created: 2020/11/02 12:21:46 by mdenys #+# #+# */
/* Updated: 2020/11/02 16:58:52 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
char *ft_substr(char const *s, unsigned int start, size_t len) char *ft_substr(char const *s, unsigned int start, size_t len)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/28 14:40:51 by mdenys #+# #+# */ /* Created: 2020/10/28 14:40:51 by mdenys #+# #+# */
/* Updated: 2020/10/29 20:01:38 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
int ft_tolower(int a) int ft_tolower(int a)
{ {

View File

@ -6,11 +6,11 @@
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */ /* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/28 15:04:43 by mdenys #+# #+# */ /* Created: 2020/10/28 15:04:43 by mdenys #+# #+# */
/* Updated: 2020/10/29 20:02:26 by mdenys ### ########.fr */ /* Updated: 2021/01/11 11:13:02 by mdenys ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "../includes/libft.h"
int ft_toupper(int a) int ft_toupper(int a)
{ {

View File

@ -0,0 +1,42 @@
SRCS = ft_isalnum.c ft_isprint.c ft_memcmp.c ft_putchar_fd.c ft_split.c \
ft_strlcat.c ft_strncmp.c ft_substr.c ft_atoi.c ft_isalpha.c \
ft_itoa.c ft_memcpy.c ft_putendl_fd.c ft_strchr.c ft_strlcpy.c \
ft_strnstr.c ft_tolower.c ft_bzero.c ft_isascii.c ft_memccpy.c \
ft_memmove.c ft_putnbr_fd.c ft_strdup.c ft_strlen.c ft_strrchr.c \
ft_toupper.c ft_calloc.c ft_isdigit.c ft_memchr.c ft_memset.c \
ft_putstr_fd.c ft_strjoin.c ft_strmapi.c ft_strtrim.c ft_putchar.c\
ft_lstadd_back.c ft_lstadd_front.c ft_lstclear.c \
ft_lstdelone.c ft_lstiter.c ft_lstlast.c \
ft_lstmap.c ft_lstnew.c ft_lstsize.c
SRC = ./src/
OBJDIR = ./obj/
SRCFILES = $(addprefix $(SRC), $(SRCS))
OBJS = $(SRCFILES:.c=.o)
OBJS_WITH_DIR = $(addprefix $(OBJ_DIR), $(OBJS))
CC = gcc
RM = rm -f
CFLAGS = -Wall -Wextra -Werror -I.
NAME = libft.a
all: $(NAME)
$(NAME): $(OBJS)
ar rcs $@ $?
clean:
$(RM) $(OBJS)
fclean: clean
$(RM) $(NAME)
re: fclean $(NAME)
.PHONY: all clean fclean re bonus