Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (53 loc) · 1.69 KB
/
Copy pathMakefile
File metadata and controls
62 lines (53 loc) · 1.69 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: bbaelor- <bbaelor-@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/12/09 20:53:51 by bwerewol #+# #+# #
# Updated: 2019/02/20 20:46:23 by bbaelor- ### ########.fr #
# #
# **************************************************************************** #
NAME = ft_ls
SRCS = main.c\
ft_ls.c\
ft_ls_func.c\
ft_setflags.c\
ft_sorts_1.c\
ft_sorts_2.c\
ft_print_long.c\
ft_func_array.c\
ft_align_attr.c\
ft_err_msg.c\
ft_put_name.c\
ft_print_lines.c\
ft_print_newline.c\
ft_print_column.c\
ft_put_mode.c\
ft_put_usrgrp.c\
ft_put_size.c\
ft_param_len.c\
ft_print_attr.c
OBJS = $(SRCS:.c=.o)
INCS = -I . -I libft/includes/
INCSFS = ft_ls.h
LIBS = -L libft/ -lft
FLAGS = -Wall -Wextra -Werror
FLAGS += -O3
# FLAGS += -g
.PHONY: all clean fclean re
all: $(NAME)
$(NAME): $(OBJS)
make -C libft
gcc $(OBJS) $(LIBS) $(INCS) $(FLAGS) -o $(NAME)
$(OBJS): $(INCSFS)
%.o: %.c
gcc $(INCS) $(FLAGS) -o $@ -c $<
clean:
make clean -C libft
rm -rf $(OBJS)
fclean: clean
make fclean -C libft
rm -rf $(NAME)
re: fclean all