-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (61 loc) · 1.54 KB
/
Makefile
File metadata and controls
76 lines (61 loc) · 1.54 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
68
69
70
71
72
73
74
75
76
CC=gcc
FLAGS=-Wall -Wextra -Werror
NAME=ft_minishell3
LIBS_DIR=./libs
DIR_LIBFT=$(LIBS_DIR)/libft
DIR_PRINTF=$(LIBS_DIR)/ft_printf
DIR_LIST=$(LIBS_DIR)/list
DIR_CAPS=$(LIBS_DIR)/caps
LIBS=-L $(DIR_CAPS) -lcaps -L $(DIR_PRINTF) -lprintf -L $(DIR_LIBFT) -lft -L $(DIR_LIST) -llist
SRC_DIR=srcs
INCLUDES=-I ./includes
BUILD_DIR= __build
SRC=main.c\
list_head.c\
minishell__string_to_command_line.c\
minishell__character_to_command_line.c\
minishell__display_command_line.c\
get_character_bytes_count.c\
key__backspace.c\
key__copy.c\
key__cursor_to_begin_of_line.c\
key__cursor_to_end_of_line.c\
key__cursor_to_next_character.c\
key__cursor_to_next_command.c\
key__cursor_to_next_line.c\
key__cursor_to_next_word.c\
key__cursor_to_prev_character.c\
key__cursor_to_prev_command.c\
key__cursor_to_prev_line.c\
key__cursor_to_prev_word.c\
key__cut.c\
key__cut_to_end_of_line.c\
key__delete_command_line.c\
key__delete_under_cursor.c\
key__paste.c\
key__select.c\
key__send.c\
key__share.c\
OBJ=$(addprefix $(BUILD_DIR)/,$(SRC:.c=.o))
all:$(BUILD_DIR) $(NAME)
$(BUILD_DIR):
@mkdir -p $@
exec:
@make -C $(DIR_LIBFT)
@make -C $(DIR_PRINTF)
@make -C $(DIR_LIST)
@make -C $(DIR_CAPS)
$(BUILD_DIR)/%.o:$(SRC_DIR)/%.c
@$(CC) $(FLAGS) -c $< -o $@ $(INCLUDES)
$(NAME):exec $(OBJ)
@$(CC) $(FLAGS) -o $@ $(OBJ) $(LIBS) $(INCLUDES) -ltermcap
@echo "$@ was created"
clean:
@rm -rf $(BUILD_DIR)
fclean: clean
@rm -f $(NAME)
@make $@ -C $(DIR_LIBFT)
@make $@ -C $(DIR_PRINTF)
@make $@ -C $(DIR_LIST)
@make $@ -C $(DIR_CAPS)
re: fclean all