Push_swap/Makefile
2022-01-18 06:57:33 +01:00

66 lines
1.8 KiB
Makefile

# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: apommier <apommier@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/11/13 13:06:47 by apommier #+# #+# #
# Updated: 2022/01/18 05:51:26 by apommier ### ########.fr #
# #
# **************************************************************************** #
NAME = push_swap
SRCS = Utils/push_swap.c \
Utils/process.c\
main.c\
Utils/sorting.c\
Utils/t_slist.c\
Utils/set_a.c\
Utils/sort_little.c\
Utils/optimise_move.c\
Utils/optimise_move2.c\
Utils/indexing.c
OBJS = ${SRCS:.c=.o}
BONUS_C = checker_folder/main.c\
checker_folder/checker_utils.c\
Utils/push_swap.c \
Utils/process.c\
Utils/sorting.c\
Utils/t_slist.c\
Utils/set_a.c\
Utils/sort_little.c\
Utils/optimise_move.c\
Utils/optimise_move2.c\
Utils/indexing.c
BONUS_O = ${BONUS_C:.c=.o}
CFLAGS = -Wall -Wextra -Werror
RM = rm -rf
LIBFT = ./libft
${NAME}:${OBJS}
make bonus -C ${LIBFT}
gcc -g ${OBJS} ${LIBFT}/libft.a
mv a.out push_swap
bonus:${BONUS_C}
make bonus -C ${LIBFT}
gcc -g ${CFLAGS} ${LIBFT}/libft.a
mv a.out checker
all: ${NAME}
clean:
${RM} ${OBJS}
make clean -C ${LIBFT}
fclean: clean
${RM} ${NAME}
make fclean -C ${LIBFT}
re: fclean all
.PHONY: all clean fclean re bonus