NAME		= woody_woodpacker

SRCS_PATH	= srcs/

SRCS  =		$(SRCS_PATH)main.c \
		$(SRCS_PATH)utils.c \
		$(SRCS_PATH)payload.c \
		$(SRCS_PATH)woody32.c \
		$(SRCS_PATH)woody64.c \
		$(SRCS_PATH)encrypt.c \
		$(SRCS_PATH)rsa.c \
		$(SRCS_PATH)primes.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} ${INCLUDES} ${DEFINES} ${CFLAGS} -c $< -o $@

$(NAME): ${OBJS} includes/woody.h
		make -C ft_printf
		${CC} ${OBJS} ${LIBFT_FLAGS} -o ${NAME}

clean:
		make -C ft_printf clean
		${RM} ${OBJS}

fclean: clean
		make -C ft_printf fclean
		make clean
		${RM} ${NAME}

re:		fclean
		make all

.PHONY : all clean fclean re