-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (44 loc) · 1.57 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ayarmaya <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/03/01 18:12:20 by ayarmaya #+# #+# #
# Updated: 2024/04/06 04:46:03 by ayarmaya ### ########.fr #
# #
# **************************************************************************** #
NAME = push_swap
PATH_SRC = src/
SRC = ft_push.c \
ft_swap.c \
ft_rotate.c \
ft_reverse.c \
ft_little_sort.c \
ft_big_sort.c \
ft_sort_five.c \
ft_init.c \
ft_move.c \
ft_main.c
SRCS = $(addprefix $(PATH_SRC), $(SRC))
OBJS = $(SRCS:.c=.o)
CC = cc
CFLAGS = -Wall -Wextra -Werror
LIBFT = libft/libft.a
HEADERS = -I./include -I./libft/include
RM = rm -f
all: $(NAME)
$(NAME): $(OBJS)
make -C libft
$(CC) $(CFLAGS) $(OBJS) $(LIBFT) -o $(NAME) $(HEADERS)
%.o: %.c
$(CC) $(CFLAGS) $(HEADERS) -c $< -o $@
clean:
$(RM) $(OBJS)
make -C libft clean
fclean: clean
$(RM) $(NAME)
make -C libft fclean
re: fclean all
.PHONY: all clean fclean re