-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (49 loc) · 1.88 KB
/
Makefile
File metadata and controls
72 lines (49 loc) · 1.88 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
62
63
64
65
66
67
68
69
70
71
72
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tarchimb <tarchimb@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/12/10 08:55:58 by tarchimb #+# #+# #
# Updated: 2021/12/23 12:07:27 by tarchimb ### ########.fr #
# #
# **************************************************************************** #
SRCS = srcs/operations/ft_push.c \
srcs/operations/ft_swap.c \
srcs/operations/ft_rotate.c \
srcs/operations/ft_rev_rotate.c \
srcs/parsing/ft_create_stack.c \
srcs/parsing/ft_get_index.c \
srcs/algo/little.c \
srcs/algo/medium.c \
srcs/algo/big.c \
srcs/algo/ft_control.c \
push_swap.c \
OBJS = ${SRCS:.c=.o}
INCLUDES = includes/push_swap.h \
libft/includes/libft.h \
CC = gcc
CFLAGS = -Wall -Wextra -Werror
EXEC = push_swap
NAME = libpush_swap.a
LIBS = libft/libft.a \
libpush_swap.a \
RM = rm -f
all: libft ${EXEC}
%.o: %.c ${INCLUDES}
${CC} ${CFLAGS} -I ./includes -c $< -o $@
libft: ${INCLUDES}
make -C ./libft
$(EXEC): push_swap.c ${LIBS}
${CC} ${CFLAGS} ${LIBS} push_swap.c -o ${EXEC}
${NAME}: ${OBJS} ${INCLUDES}
ar rcs ${NAME} ${OBJS}
clean:
${RM} ${OBJS}
make clean -C ./libft
fclean: clean
make fclean -C ./libft
${RM} ${NAME}
re: fclean all
.PHONY: all clean fclean re libft