-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (46 loc) · 1.79 KB
/
Makefile
File metadata and controls
61 lines (46 loc) · 1.79 KB
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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: simarcha <simarcha@student.42barcel> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/03/12 20:04:24 by simarcha #+# #+# #
# Updated: 2024/03/28 16:16:32 by simarcha ### ########.fr #
# #
# **************************************************************************** #
CC = gcc
EXEC = push_swap
CFLAGS = -Wall -Wextra -Werror
SRCS_DIR = srcs
SRCS = $(SRCS_DIR)/main.c \
$(SRCS_DIR)/list_utils.c \
$(SRCS_DIR)/manage_errors.c \
$(SRCS_DIR)/manage_errors2.c \
$(SRCS_DIR)/push_swap_utils.c \
$(SRCS_DIR)/movement_swap.c \
$(SRCS_DIR)/movement_rotate.c \
$(SRCS_DIR)/movement_reverse_rotate.c \
$(SRCS_DIR)/movement_push.c \
$(SRCS_DIR)/min_max.c \
$(SRCS_DIR)/algorithm_utils.c \
$(SRCS_DIR)/algorithm_utils2.c \
$(SRCS_DIR)/algorithm.c \
$(SRCS_DIR)/find_the_median.c \
$(SRCS_DIR)/manage_errors_argc_is_2.c \
$(SRCS_DIR)/ft_split.c \
$(SRCS_DIR)/sort.c
INCLUDE = ./inc/push_swap.h
RM = rm -rf
OBJ = $(SRCS:.c=.o)
all: $(EXEC)
%.o: %.c Makefile $(INCLUDE)
$(CC) $(CFLAGS) -c $< -o $@
$(EXEC): $(OBJ)
$(CC) $(CFLAGS) $(OBJ) -o $@
clean:
$(RM) $(OBJ)
fclean: clean
$(RM) $(EXEC)
re: fclean all
.PHONY: all clean fclean re