-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (54 loc) · 1.04 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
61
62
63
VPATH = ./src:\
./src/error_checks:\
./src/mini_strtoi:\
./src/setup_stacks:\
./src/gets:\
./src/is:\
./src/utilities_algorithms:\
./src/algorithms:\
./src/operations
NAME = push_swap
OBJ_FILES = push_swap.o \
setup_stacks.o \
mini_strtoi.o \
error_checks.o \
reverse_rotate.o \
is.o \
gets.o \
swap.o \
push.o \
rotate.o \
utilities_algorithms.o \
sort_three.o \
sort_five.o \
bubble_sort.o \
radix_sort.o \
sort_large.o
HEADER_FILES = push_swap.h \
struct.h \
algorithms.h \
error_checks.h \
gets.h \
is.h \
mini_strtoi.h \
operations.h \
setup_stacks.h \
utilities_algorithms.h
CFLAGS = -Wall -Wextra -Werror
LIBFT = libft/libft.a
all: $(NAME)
debug: CFLAGS += -D DEBUG
debug: $(NAME)
$(NAME): $(OBJ_FILES) $(LIBFT)
$(CC) -o $(NAME) $(OBJ_FILES) $(LIBFT)
%.o: %.c $(HEADER_FILES)
$(CC) -c $(CFLAGS) -o $@ $<
$(LIBFT):
make -C libft
clean:
rm -f $(OBJ_FILES)
make fclean -C libft
fclean: clean
rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re