-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·34 lines (21 loc) · 990 Bytes
/
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
CC = cc
NAME = push_swap
CCFLAGS = -Wall -Wextra -Werror
SRC_M = mandatory/src/ft_split.c mandatory/src/instructions_of_one_stack.c mandatory/src/instructions_of_two_stacks.c mandatory/src/tools.c mandatory/src/tools2.c mandatory/src/tools3.c mandatory/src/tools4.c mandatory/push_swap.c mandatory/small_amount_of_numbers.c mandatory/sorting_functions.c
SRC_B = bonus/src/ft_split.c bonus/instructions/instructions_of_one_stack_bonus.c bonus/instructions/instructions_of_two_stack_bonus.c bonus/src/tools.c bonus/src/tools2.c bonus/src/tools3.c bonus/src/tools4.c bonus/checker.c bonus/gnl/get_next_line.c bonus/gnl/get_next_line_utils.c bonus/ft_str_cmp.c
OBJ_M = $(SRC_M:.c=.o)
OBJ_B = $(SRC_B:.c=.o)
all : $(NAME)
%.o : %.c
$(CC) $(CCFLAGS) -c $< -o $@
$(NAME) : $(OBJ_M)
$(CC) $(CCFLAGS) $(OBJ_M) -o $(NAME)
clean :
rm -f $(OBJ_M)
rm -f $(OBJ_B)
fclean : clean
rm -f $(NAME)
rm -f checker
re : fclean all
bonus : $(OBJ_B)
$(CC) $(CCFLAGS) $(OBJ_B) -o checker