mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-05 23:18:08 +01:00
instead use the one provided by the system, which allows easier integration of tools such as distcc and ccache jguelen: you probably don't have to worry about anything here
41 lines
1.1 KiB
Makefile
41 lines
1.1 KiB
Makefile
AR = ar
|
|
ARFLAGS = rcs
|
|
ifeq ($(CFLAGS),)
|
|
CFLAGS = -Wall -Wextra -Werror -g
|
|
endif
|
|
NAME = libft.a
|
|
SOURCES = ft_atoi.c ft_itoa.c ft_putendl_fd.c ft_strlcat.c ft_substr.c \
|
|
ft_bzero.c ft_putnbr_fd.c ft_strlcpy.c ft_tolower.c ft_calloc.c \
|
|
ft_memchr.c ft_putstr_fd.c ft_strlen.c ft_toupper.c ft_isalnum.c \
|
|
ft_memcmp.c ft_split.c ft_strmapi.c ft_isalpha.c ft_memcpy.c ft_strchr.c \
|
|
ft_strncmp.c ft_isascii.c ft_memmove.c ft_strdup.c ft_strnstr.c \
|
|
ft_isdigit.c ft_memset.c ft_striteri.c ft_strrchr.c ft_isprint.c \
|
|
ft_putchar_fd.c ft_strjoin.c ft_strtrim.c ft_min_max.c
|
|
BONUSSOURCES = ft_lstnew_bonus.c ft_lstadd_back_bonus.c ft_lstsize_bonus.c \
|
|
ft_lstadd_front_bonus.c ft_lstclear_bonus.c ft_lstdelone_bonus.c \
|
|
ft_lstiter_bonus.c ft_lstlast_bonus.c ft_lstmap_bonus.c
|
|
BONUSOBJ = $(BONUSSOURCES:.c=.o)
|
|
OBJECTS = $(SOURCES:.c=.o)
|
|
|
|
all: $(NAME)
|
|
|
|
$(NAME): bonus
|
|
|
|
#$(NAME): $(OBJECTS)
|
|
# $(AR) $(ARFLAGS) $@ $^
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
clean:
|
|
rm -f $(OBJECTS) $(BONUSOBJ)
|
|
|
|
fclean: clean
|
|
rm -f $(NAME)
|
|
|
|
re: fclean all
|
|
|
|
bonus: $(OBJECTS) $(BONUSOBJ)
|
|
$(AR) $(ARFLAGS) $(NAME) $^
|
|
|
|
.PHONY: all clean fclean re bonus
|