-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (53 loc) · 1.42 KB
/
Makefile
File metadata and controls
67 lines (53 loc) · 1.42 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
63
64
65
66
67
# Compilation
NAME = ft_ls
CC = gcc
CFLAGS = -Wall -Werror -Wextra -g
LIB_FT = ./lib/libft/libft.a
INCLUDES = -I./includes -I./lib/libft
# Sources
SRC_FILE = src/file/file_new.c \
src/file/file_remove.c \
src/file/file_get_type.c \
src/file/file_get_acr.c \
src/file/file_get_owner.c \
src/file/file_get_group.c \
src/file/file_get_mimedate.c \
src/file/file_get_filename.c \
src/file/file_get_lcount.c \
src/file/file_get_size.c \
src/file/file_get_basename.c \
src/file/file_get_path.c \
src/file/file_get_pathname.c \
src/file/file_is_dir.c \
src/file/file_get_time.c \
src/file/file_is_adir.c \
src/file/new_file_info.c \
src/file/file_info_size_init.c
SRC_OPTIONS = src/options/dirdata/behavior.c \
src/options/dirdata/decorated.c \
src/options/dirdata/filter.c \
src/options/options_by_string.c \
src/options/new_args.c \
src/options/dirdata/decorated_default.c \
src/options/dirdata/decorated_columns.c
SOURCE_FILES = $(SRC_FILE) \
$(SRC_OPTIONS) \
src/ft_ls.c \
src/main.c \
src/read_info.c \
src/error_message.c \
src/illegal_option.c \
src/filter_args.c
OBJ_FILES = $(SOURCE_FILES:.c=.o)
all: $(NAME)
$(NAME): $(OBJ_FILES)
@make -C ./lib/libft
@$(CC) $(OBJ_FILES) $(INCLUDES) $(LIB_FT) $(FLAGS) $(CFLAGS) -o $(NAME)
%.o: %.c
@$(CC) -c $(INCLUDES) $(CFLAGS) $(FLAGS) -o $@ $<
clean:
@make clean -C ./lib/libft
@rm -f $(OBJ_FILES)
fclean: clean
@rm -rf $(NAME) $(LIB_FT) $(LIB_MLX)
re: fclean all