-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
70 lines (58 loc) · 1.9 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: oaoba <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/08/27 00:21:48 by oaoba #+# #+# #
# Updated: 2023/08/28 15:32:43 by oaoba ### ########.fr #
# #
# **************************************************************************** #
NAME = push_swap
CC = cc
CFLAGS = -Wall -Wextra -Werror
srcs = src/main.c\
src/rotate.c\
src/sort_under_5.c\
src/sort_size3.c\
src/sort_size4.c\
src/sort_size5.c\
src/coordinate_compression.c\
src/push.c\
src/list_min_utils.c\
src/free.c\
src/radix.c\
src/swap.c\
src/is_sorted.c\
src/reverse_rotate.c\
src/error_handle.c\
src/error_handle2.c\
src/utils.c\
list/ft_lstadd_back.c\
list/ft_lstlast.c\
list/ft_lstsize.c\
list/ft_lstadd_front.c\
list/ft_lstnew.c
objs = $(srcs:%.c=%.o)
libftflag = -L./libft -lft
ft_printfflag = -L./ft_printf -lftprintf
all: $(NAME)
$(NAME): $(objs)
make -C ./libft
make -C ./ft_printf
$(CC) $(CFLAGS) $(objs) $(libftflag) $(ft_printfflag) -o $(NAME)
libft:
make -C ./libft
ft_printf:
make -C ./ft_printf
clean :
make -C ./libft clean
make -C ./ft_printf clean
$(RM) $(objs)
fclean: clean
make -C ./libft fclean
make -C ./ft_printf fclean
$(RM) $(NAME) $(objs)
re: fclean all
.PHONY : all clean fclean re libft ft_printf