-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (49 loc) · 1.92 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mskeleto <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/10/07 17:53:35 by mskeleto #+# #+# #
# Updated: 2021/10/07 21:17:11 by mskeleto ### ########.fr #
# #
# **************************************************************************** #
NAME = push_swap
BONUS_NAME = checker
INC = ps.h
DEFS = main.c \
parser.c \
preparser.c \
push.c \
push_swap.c \
push_swap_utils.c \
radix_sort.c \
reverse_rotate.c \
rotate.c \
small_sort.c \
swap.c
BONUS_DEFS = bonus/get_next_line.c \
bonus/get_next_line_utils.c \
bonus/main_bonus.c \
bonus/parser_bonus.c \
bonus/preparser_bonus.c \
bonus/push_bonus.c \
bonus/push_swap_bonus.c \
bonus/reverse_rotate_bonus.c \
bonus/rotate_bonus.c \
bonus/swap_bonus.c \
OBJS = $(DEFS:.c=.o)
BONUS_OBJ = $(BONUS_DEFS:.c=.o)
all: $(NAME)
%.o: %.c $(INC)
gcc -Wall -Werror -Wextra -c $< -o $@
$(NAME): $(OBJS) $(INC)
gcc -Wall -Werror -Wextra $(OBJS) -o $(NAME)
clean:
rm -f $(OBJS) $(BONUS_OBJ)
fclean: clean
rm -f $(NAME) $(BONUS_NAME)
bonus: $(BONUS_OBJ) $(INC)
gcc -Wall -Werror -Wextra $(BONUS_OBJ) -o $(BONUS_NAME)
re: fclean all