-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (59 loc) · 2.23 KB
/
Makefile
File metadata and controls
70 lines (59 loc) · 2.23 KB
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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ymassiou <ymassiou@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/01/26 16:55:49 by ymassiou #+# #+# #
# Updated: 2024/01/29 16:09:59 by ymassiou ### ########.fr #
# #
# **************************************************************************** #
CC = cc
CFLAGS = -Wall -Werror -Wextra
NAME = push_swap
NAME_BONUS = checker
SRC = srcs/mandatory/cost.c \
srcs/mandatory/reverse_rotation.c \
srcs/mandatory/utils.c \
srcs/mandatory/ft_parse.c \
srcs/mandatory/rotation.c \
srcs/mandatory/utils_2.c \
srcs/mandatory/utils_3.c \
srcs/mandatory/place.c \
srcs/mandatory/sort_n.c \
srcs/mandatory/push.c \
srcs/mandatory/stack_manu.c \
srcs/mandatory/push_swap_main.c \
srcs/mandatory/swap.c
SRC_BONUS = srcs/bonus/checker_bonus.c \
srcs/bonus/gnl_utils_bonus.c \
srcs/bonus/rotation_bonus.c \
srcs/bonus/utils_2_bonus.c \
srcs/bonus/ft_parse_bonus.c \
srcs/bonus/push_bonus.c \
srcs/bonus/stack_manu_bonus.c \
srcs/bonus/utils_3_bonus.c \
srcs/bonus/gnl_bonus.c \
srcs/bonus/reverse_rotation_bonus.c \
srcs/bonus/swap_bonus.c \
srcs/bonus/utils_bonus.c
OBJ = $(SRC:.c=.o)
OBJ_BONUS = $(SRC_BONUS:.c=.o)
INCS = -I ./includes/
HEADER = ./includes/push_swap.h
HEADER_BONUS = ./includes/push_swap_bonus.h
all: $(NAME)
%.o: %.c $(HEADER) $(HEADER_BONUS)
$(CC) $(CFLAGS) -c $< -o $@ $(INCS)
$(NAME): $(OBJ)
$(CC) $(CFLAGS) $(OBJ) -o $(NAME)
bonus: $(NAME_BONUS)
$(NAME_BONUS): $(OBJ_BONUS)
$(CC) $(CFLAGS) $(OBJ_BONUS) -o $(NAME_BONUS)
clean:
rm -rf $(OBJ) $(OBJ_BONUS)
fclean: clean
rm -f $(NAME) $(NAME_BONUS)
re: fclean all
.PHONY: all clean fclean re bonus