Projet de l'école 42 : Printf
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

42 lines
842 B

NAME = libftprintf.a
PRINTF = ./lib/libftprintf.a
SPRINTF = ./lib/libftsprintf.a
FPRINTF = ./lib/libftfprintf.a
SRCS = ft_print_chars.c ft_print_hexs.c ft_print_nbrs.c ft_print_opts.c ft_print_ptrs.c ft_printf.c ft_print_strings.c
OBJS = ${SRCS:.c=.o}
RM = rm -rf
CC = gcc
CFLAGS = -Werror -Wall -Wextra
LIBFT = ./libft/libft.a
.c.o:
${CC} ${CFLAGS} -c $< -o ${<:.c=.o} -g -I./includes
all: $(NAME)
bonus: $(NAME)
$(LIBFT):
${MAKE} -C ./libft
cp ./libft/libft.a $(NAME)
cp ./libft/libft.h ./includes/libft.h
$(PRINTF): $(LIBFT) $(addprefix ./srcs/, ${OBJS})
ar -rcs $(NAME) $(addprefix ./srcs/, ${OBJS})
$(NAME): $(LIBFT) $(PRINTF)
clean:
${RM} srcs/*.o
${MAKE} clean -C ./libft
fclean: clean
${RM} ${NAME} $(PRINTF)
${MAKE} fclean -C ./libft
re: fclean all
.PHONY: all clean fclean re