-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (43 loc) · 2.12 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: aandom <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/03/22 14:53:44 by aandom #+# #+# #
# Updated: 2024/11/09 14:46:27 by aandom ### ########.fr #
# #
# **************************************************************************** #
NAME = push_swap
NAME_B = checker
FT_PRINTF = ./ft_printf
LIBFT = libft/check.c libft/ft_atoi.c libft/ft_free.c libft/ft_isdigit.c libft/ft_lstadd_back.c libft/ft_lstadd_front.c libft/ft_lstlast.c \
libft/ft_lstnew.c libft/ft_lstsize.c libft/ft_split.c libft/operations.c
# SRCS = $(wildcard libft/*.c) $(wildcard m_push_swap/*.c)
SRCS = $(LIBFT) m_push_swap/action.c m_push_swap/big_sort.c m_push_swap/main.c m_push_swap/position.c m_push_swap/shift.c m_push_swap/small_sort.c \
m_push_swap/take_action.c m_push_swap/utils.c
# SRCS_B = $(wildcard libft/*.c) $(wildcard p_checker/*.c)
SRCS_B = $(LIBFT) p_checker/get_next_line.c p_checker/get_next_line_utils.c p_checker/push_swap_checker.c p_checker/validate.c
OBJS = $(SRCS:.c=.o)
OBJS_B = $(SRCS_B:.c=.o)
CFLAGS = -Wextra -Werror -Wall
CC = cc
$(NAME): $(OBJS)
$(MAKE) -C $(FT_PRINTF)
$(CC) $(CFLAGS) $(OBJS) ft_printf/libftprintf.a -o $(NAME)
$(NAME_B): $(OBJS_B)
$(MAKE) -C $(FT_PRINTF)
$(CC) $(CFLAGS) $(OBJS_B) ft_printf/libftprintf.a -o $(NAME_B)
all: $(NAME)
bonus: $(NAME_B)
clean:
$(MAKE) clean -C $(FT_PRINTF)
rm -f $(OBJS_B)
rm -f $(OBJS)
fclean: clean
rm -f ft_printf/libftprintf.a
rm -f $(NAME)
rm -f $(NAME_B)
re: fclean $(NAME)
.PHONY: all clean fclean re