-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
80 lines (60 loc) · 1.95 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
70
71
72
73
74
75
76
77
78
79
80
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: imoro-sa <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/04/28 16:00:43 by imoro-sa #+# #+# #
# Updated: 2023/04/28 16:00:46 by imoro-sa ### ########.fr #
# #
# **************************************************************************** #
NAME = push_swap
BONUS = checker
SRC = main.c \
push_swap_init.c \
push_swap_check.c \
push_swap_movs.c \
push_swap_movs_ab.c \
push_swap_target.c \
push_swap_cost.c \
push_swap_make_moves.c \
push_swap.c \
push_swap_utils.c \
SRCBONUS = checker.c \
push_swap_init.c \
push_swap_check.c \
push_swap_movs.c \
push_swap_movs_ab.c \
push_swap_target.c \
push_swap_cost.c \
push_swap_make_moves.c \
push_swap.c \
push_swap_utils.c \
checker_movs.c \
checker_movs_ab.c \
OBJT = $(SRC:.c=.o)
OBJTBONUS = $(SRCBONUS:.c=.o)
LIBFT = libft/libft.a
CC = gcc
CFLAGS = -Wall -Wextra -Werror
RM = rm -f
MAKEFLAGS += --quiet
all: $(LIBFT) $(NAME)
$(LIBFT):
make -C ./libft
$(NAME): $(LIBFT) $(OBJT)
${CC} $(CFLAGS) $(SRC) $(LIBFT) -o ${NAME}
$(BONUS): $(LIBFT) $(OBJTBONUS)
${CC} $(CFLAGS) $(SRCBONUS) $(LIBFT) -o ${BONUS}
bonus: $(BONUS)
clean:
$(RM) $(OBJT)
$(RM) $(OBJTBONUS)
make -C ./libft clean
fclean: clean
$(RM) $(NAME)
$(RM) $(BONUS)
make -C ./libft fclean
re: fclean all
.PHONY : all clean fclean re