dev: add Libft and Minilibx
This commit is contained in:
parent
c598ad59cc
commit
f89c74cd68
108 changed files with 10079 additions and 2 deletions
47
Libft/Makefile
Normal file
47
Libft/Makefile
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
# 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
|
||||
FUNCTIONS_BONUS = \
|
||||
lstnew lstadd_front lstsize lstlast lstadd_back \
|
||||
lstdelone lstclear lstiter lstmap
|
||||
CODE = $(addprefix ft_, $(FUNCTIONS))
|
||||
CODE_BONUS = $(addprefix ft_, $(FUNCTIONS_BONUS))
|
||||
|
||||
# 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)))
|
||||
C_FILES_BONUS = $(addsuffix .c,$(addprefix $(SRCS),$(CODE_BONUS)))
|
||||
O_FILES_BONUS = $(addsuffix .o,$(addprefix $(SRCS),$(CODE_BONUS)))
|
||||
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) $(O_FILES_BONUS)
|
||||
|
||||
fclean : clean
|
||||
rm -f $(NAME)
|
||||
|
||||
re : fclean all
|
||||
|
||||
bonus : $(O_FILES_BONUS)
|
||||
$(AR) $(NAME) $(O_FILES_BONUS)
|
||||
|
||||
.PHONY : all clean fclean re bonus
|
||||
Loading…
Add table
Add a link
Reference in a new issue