-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (50 loc) · 2.03 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ycontre <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/11/11 16:12:55 by ycontre #+# #+# #
# Updated: 2023/11/29 13:31:15 by ycontre ### ########.fr #
# #
# **************************************************************************** #
NAME = push_swap
NAME_BONUS = checker
CC = cc
CFLAGS = -g -Wall -Wextra -Werror
INCLUDE = -I.
LIB = -L./libft -lft
SRCS = mandatory/srcs/push_swap.c \
mandatory/srcs/errors_handling.c \
mandatory/srcs/operations.c \
mandatory/srcs/utils_stack.c \
mandatory/srcs/algorithm.c \
mandatory/srcs/algorithm_helper.c \
mandatory/srcs/utils.c
SRCS_BONUS = bonus/srcs/checker.c \
bonus/srcs/utils_stack.c \
bonus/srcs/utils.c \
bonus/srcs/errors_handling.c \
bonus/srcs/solve_stdin.c \
bonus/srcs/operations.c \
bonus/srcs/operations_both.c \
OBJS = ${SRCS:.c=.o}
OBJS_BONUS = ${SRCS_BONUS:.c=.o}
LIBPATH = libft/
all: ${NAME}
${NAME}: ${OBJS}
make -C ${LIBPATH}
${CC} ${CFLAGS} $^ ${INCLUDE} ${LIB} -o $@
bonus: ${NAME_BONUS}
${NAME_BONUS}: ${OBJS_BONUS}
make -C ${LIBPATH}
${CC} ${CFLAGS} $^ ${INCLUDE} ${LIB} -o ${NAME_BONUS}
clean:
make clean -C ${LIBPATH}
rm -f ${OBJS} ${OBJS_BONUS}
fclean: clean
make fclean -C ${LIBPATH}
rm -f ${NAME} ${NAME_BONUS} ${NAME_TEST}
re: fclean all
.PHONY: all clean fclean re