-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (33 loc) · 1.46 KB
/
Copy pathMakefile
File metadata and controls
44 lines (33 loc) · 1.46 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: codespace <codespace@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2026/03/04 07:39:57 by codespace #+# #+# #
# Updated: 2026/03/04 07:59:15 by codespace ### ########.fr #
# #
# **************************************************************************** #
NAME = push_swap
CC = cc
CFLAGS = -Wall -Wextra -Werror
INCLUDES = -I.
SRCS = main.c parsing.c indexing.c position.c target_position.c \
cost_model.c cost_execute.c \
stack_utils.c stack_utils2.c \
operations_swap.c operations_push.c operations_rotate.c operations_reverse_rotate.c \
sort_small.c sort_big.c \
utils.c
OBJS = $(SRCS:.c=.o)
all: $(NAME)
$(NAME): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $(NAME)
%.o: %.c push_swap.h
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
clean:
rm -f $(OBJS)
fclean: clean
rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re