-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (43 loc) · 1.49 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: kblack <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/02/02 11:59:37 by kblack #+# #+# #
# Updated: 2019/02/02 11:59:41 by kblack ### ########.fr #
# #
# **************************************************************************** #
NAME = ft_ls
CC = gcc
CFLAGS = -Wall -Wextra -Werror
SRC = file_utilities.c \
get_flag_options.c \
format_and_print.c \
free_memory.c \
get_info.c \
handle_flags.c \
main.c \
permissions.c \
sorting_functions.c \
utilities.c
INC_FT = -I libft
LINK_FT = -L libft -l ft
FT = $(INC_FT) $(LINK_FT)
HDR = ft_ls.h
OFL = $(SRC:.c=.o)
all: $(NAME)
$(NAME): $(OFL)
make -C libft
$(CC) -o $@ $(CFLAGS) $(FT) $(OFL) -I .
$(OFL): $(SRC)
@$(CC) $(CFLAGS) $(INC_FT) -I . -c $(SRC)
clean:
rm -rf $(OFL)
make -C libft clean
fclean: clean
rm -rf $(NAME)
make -C libft fclean
re: fclean all
make -C libft re