38 lines
492 B
Makefile
38 lines
492 B
Makefile
|
NAME = woody_woodpacker
|
||
|
|
||
|
SRCS_PATH = srcs/
|
||
|
|
||
|
SRCS = $(SRCS_PATH)main.c
|
||
|
|
||
|
OBJS = ${SRCS:.c=.o}
|
||
|
|
||
|
CC = gcc
|
||
|
|
||
|
RM = rm -f
|
||
|
|
||
|
LIBFT_FLAGS = ft_printf/libftprintf.a
|
||
|
|
||
|
CFLAGS = -Wall -Wextra -Werror
|
||
|
|
||
|
all: ${NAME}
|
||
|
|
||
|
.c.o:
|
||
|
${CC} ${DEFINES} ${CFLAGS} -c $< -o $@
|
||
|
|
||
|
$(NAME): ${OBJS}
|
||
|
make -C ft_printf
|
||
|
${CC} ${OBJS} ${LIBFT_FLAGS} -o ${NAME}
|
||
|
|
||
|
clean:
|
||
|
make -C ft_printf clean
|
||
|
${RM} ${OBJS}
|
||
|
|
||
|
fclean:
|
||
|
make -C ft_printf fclean
|
||
|
${RM} ${NAME}
|
||
|
|
||
|
re: fclean
|
||
|
make all
|
||
|
|
||
|
.PHONY : all clean fclean re
|