-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (42 loc) · 1.19 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
NAME = push_swap
CC = cc
CFLAGS = -Wall -Wextra -Werror -pedantic
INCDIR = include
HEADER = $(INCDIR)/push_swap.h
SRCS = push_swap.c \
source/commands/ps_push.c \
source/commands/ps_rotate.c \
source/commands/ps_swap.c \
source/commands/ps_reverse.c \
source/parser/parser_utils.c \
source/parser/ps_atol.c \
source/parser/ps_parser.c \
source/sort_radix/sort_radix.c \
source/sort_radix/sort_small.c \
source/sort_radix/sort_utils.c \
source/stack/stack_check.c \
source/stack/stack_testing.c \
source/stack/stack_utils.c \
source/libft/ft_bzero.c \
source/libft/ft_calloc.c \
source/libft/ft_isalpha.c \
source/libft/ft_isdigit.c \
source/libft/ft_isspace.c \
source/libft/ft_lstsize.c \
source/libft/ft_split.c \
source/libft/ft_strcpy.c \
source/libft/ft_strjoin.c \
source/libft/ft_strlen.c \
source/libft/ft_substr.c
OBJS = $(SRCS:.c=.o)
all: $(NAME)
$(NAME): $(OBJS)
$(CC) $(CFLAGS) -o $(NAME) $(OBJS)
$(OBJDIR)/%.o: %.c $(HEADER)
$(CC) $(CFLAGS) -I $(INCDIR) -c $< -o $@
clean:
rm -rf $(OBJS)
fclean: clean
rm -rf $(NAME)
re: fclean all
.PHONY: all clean fclean re