-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
56 lines (38 loc) · 1.64 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mcerchi <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/02/26 14:47:54 by mcerchi #+# #+# #
# Updated: 2022/02/26 14:49:31 by mcerchi ### ########.fr #
# #
# **************************************************************************** #
NAME = push_swap
NAME_BONUS = checker
SRC = push_swap.c utils.c operations_one.c operations_two.c\
operations_three.c order.c order_two.c order_three.c\
lis.c sort.c\
SRC_BONUS = checker.c check_write.c check_op_one.c check_op_two.c\
check_op_three.c\
LIBFT = libft/libft.a
OBJ = $(SRC:.c=.o)
OBJ_BONUS = $(SRC_BONUS:.c=.o)
CC = gcc
RM = rm -f
CFLAGS = -Wall -Wextra -Werror
$(NAME): $(OBJ)
make -C ./libft
$(CC) $(CFLAGS) -o $(NAME) $(OBJ) $(LIBFT)
all: $(NAME)
clean:
make clean -C libft
${RM} $(OBJ) $(OBJ_BONUS)
fclean: clean
make fclean -C libft
${RM} $(NAME) $(NAME_BONUS) ${OBJ} $(OBJ_BONUS)
re: fclean bonus
bonus: all $(OBJ_BONUS)
$(CC) $(CFLAGS) -o $(NAME_BONUS) $(OBJ_BONUS) $(LIBFT)
.PHONY: all clean fclean re