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.
35 lines
538 B
35 lines
538 B
3 years ago
|
NAME = libftprintf.a
|
||
|
|
||
|
SRCS = ft_printf.c ft_putchars.c ft_putnbrs.c ft_putptr.c ft_putx.c
|
||
|
OBJS = ${SRCS:.c=.o}
|
||
|
MAIN = main.c
|
||
|
MAIN_O = ${MAIN:.c=.o}
|
||
|
|
||
|
RM = rm -rf
|
||
|
CC = gcc
|
||
|
CFLAGS = -Werror -Wall -Wextra
|
||
|
AR = ar -rcs
|
||
|
|
||
|
.c.o:
|
||
|
${CC} ${CFLAGS} -c $< -o ${<:.c=.o}
|
||
|
|
||
|
all: $(NAME)
|
||
|
|
||
|
$(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
|