NAME = libftprintf.a SRCS = ft_printf.c ft_putchars.c ft_putnbrs.c ft_putptr.c ft_putx.c utils.c opts.c OBJS = ${SRCS:.c=.o} RM = rm -rf CC = gcc CFLAGS = -Werror -Wall -Wextra AR = ar -rcs .c.o: ${CC} ${CFLAGS} -c $< -o ${<:.c=.o} -g all: $(NAME) bonus: $(NAME): $(OBJS) ${MAKE} -C ./libft cp ./libft/libft.a libftprintf.a ${AR} ${NAME} ${OBJS} clean: ${RM} ${OBJS} ${RM} ./libft/*.o fclean: clean ${RM} ${NAME} ${RM} ./libft/libft.a re: fclean all .PHONY: all clean fclean re