-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (59 loc) · 1.83 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: asarandi <asarandi@student.42.us.org> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2017/11/26 20:09:21 by asarandi #+# #+# #
# Updated: 2017/12/05 03:11:48 by asarandi ### ########.fr #
# #
# **************************************************************************** #
NAME = ft_ls
CC = gcc
CFLAGS = -Wall -Werror -Wextra -O3
SRC = build_list.c \
clear_structs.c \
columns.c \
columns_util.c \
compare_files1.c \
compare_files2.c \
compare_files3.c \
dir_util.c \
display.c \
extattr.c \
list_dir.c \
listdir_norme.c \
main.c \
merge_sort.c \
options.c \
parse_options.c \
print.c \
symbol_type.c \
symlink.c \
time.c \
widths.c
OBJ = $(SRC:%.c=%.o)
LIB = -Llibft -lft -Lft_printf -lftprintf
all: $(NAME)
$(NAME):
@make -C libft
@make -C ft_printf
$(info $(NAME): compiling .o files)
@$(CC) $(CFLAGS) -c $(SRC)
$(info $(NAME): building executable)
@$(CC) $(CFLAGS) $(OBJ) $(LIB) -o $(NAME)
dc:
rm -rf $(OBJ)
rm -rf ft_ls debug
clean:
@make clean -C libft
@make clean -C ft_printf
$(info $(NAME): removing .o files)
@rm -rf $(OBJ)
fclean: clean
@make fclean -C libft
@make fclean -C ft_printf
$(info $(NAME): removing $(NAME))
@rm -rf $(NAME) debug
re: fclean all