-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (39 loc) · 894 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
35
36
37
38
39
40
41
42
43
44
45
46
47
NAME = push_swap.a
EXEC = push_swap
LIBFT_A = ./libft/libft.a
SRC = ./src/main.c \
./src/init_structs.c \
./src/print_stack.c \
./src/push.c \
./src/rotate.c \
./src/reverse_rotate.c \
./src/swap.c \
./src/verify_args.c \
./src/panic.c \
./src/algorithm.c \
./src/index.c \
./src/push_swap_init.c \
./src/push_swap_back.c \
./src/sorts.c \
./src/find_specific_numbers.c \
./src/sum_moves.c \
./src/run_utils.c \
./src/func_utils.c
OBJ = $(SRC:.c=.o)
CFLAGS = -Wextra -Werror -Wall -g #-fsanitize=address
CC = cc
AR = ar rc
RM = rm -f
all: $(LIBFT_A) $(NAME)
$(CC) $(NAME) $(LIBFT_A) -o $(EXEC)
$(LIBFT_A):
make -C libft
$(NAME): $(OBJ)
$(AR) $(NAME) $(LIBFT_A) $(OBJ)
clean: $(OBJ)
make clean -C libft
$(RM) $(OBJ)
fclean: clean
make fclean -C libft
$(RM) $(NAME) $(EXEC)
re: clean all