-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
73 lines (58 loc) · 2.05 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
64
65
66
67
68
69
70
71
72
73
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tcherret <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/02/07 12:35:44 by tcherret #+# #+# #
# Updated: 2019/02/22 12:09:06 by tcherret ### ########.fr #
# #
# **************************************************************************** #
NAME = ft_ls
NAMELIB = ./libft/libftprintf.a
CC = @gcc
CFLAGS =-Wall -Wextra -Werror
SRCS = srcs/ft_inspect.c\
srcs/get_option.c\
srcs/ft_ls.c\
srcs/ft_ls_recur.c\
srcs/managerror.c\
srcs/check_error.c\
srcs/check_error_param.c\
srcs/get_padding.c\
srcs/ft_sort.c\
srcs/ft_reverse_sort.c\
srcs/ft_time_sort.c\
srcs/ft_time_sort_param.c\
srcs/display_list.c\
srcs/get_num_elem.c\
srcs/create_list.c\
srcs/inspect_get_mode.c\
srcs/inspect_get_time.c\
srcs/ft_rtime_sort_param.c\
srcs/ft_rtime_sort.c\
srcs/get_new_name.c\
INCS = push_swap.h
LIBDIR = ./libft/
INCDIR = ./includes/
OBJ = $(addprefix objs/, $(notdir $(SRCS:.c=.o)))
all : $(NAME)
$(NAME) : $(OBJ)
@echo "\033[33mCompiling...\033[0m"
@make -C $(LIBDIR)
@$(CC) $(CFLAGS) -o $(NAME) $(OBJ) $(NAMELIB)
@echo "\033[32m$(NAME) compiled ✔ ✔ ✔ ✔\033[0m"
objs/%.o : srcs/%.c
@mkdir -p $(@D)
@$(CC) -c $(CFLAGS) $< -I./includes -o $@
clean :
@rm -rf $(OBJ) objs
@make -C $(LIBDIR) clean
@echo "\033[31mObjects deleted ✕\033[0m"
fclean : clean
@rm -f $(NAME)
@make -C $(LIBDIR) fclean
@echo "\033[31m$(NAME) deleted ✕\033[0m"
re : fclean all
.PHONY : all clean fclean re