-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (48 loc) · 1.68 KB
/
Makefile
File metadata and controls
59 lines (48 loc) · 1.68 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mmounsif <mmounsif@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/02/22 18:22:10 by mmounsif #+# #+# #
# Updated: 2025/03/08 14:07:48 by mmounsif ### ########.fr #
# #
# **************************************************************************** #
NAME = push_swap
CC = cc
CFLAGS = -Wall -Wextra -Werror
FT_PRINTF_FLAGS = -Lft_printf -lftprintf
SRC = main.c \
libft_functions/ft_atol.c \
libft_functions/ft_calloc.c \
libft_functions/ft_isdigit.c \
libft_functions/ft_split.c \
src/checks.c \
src/list_manipulation.c \
src/free.c \
src/push.c \
src/swap.c \
src/rotate.c \
src/reverse_rotate.c \
src/sort.c \
src/max_min.c \
src/get_position.c \
src/the_algo.c \
OBJ = $(SRC:.c=.o)
all: ft_printf $(NAME)
$(NAME): $(OBJ)
$(CC) $(OBJ) $(FT_PRINTF_FLAGS) -o $(NAME)
%.o: %.c push_swap.h
$(CC) $(CFLAGS) -c $< -o $@
ft_printf: ft_printf/libftprintf.a
ft_printf/libftprintf.a:
make -C ft_printf
clean:
rm -rf $(OBJ)
make -C ft_printf clean
fclean: clean
rm -rf $(NAME)
make -C ft_printf fclean
re: fclean all
.PHONY: all clean fclean re ft_printf