-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
130 lines (109 loc) · 3.44 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
##
## EPITECH PROJECT, 2022
## makefile
## File description:
## makefile
##
CC = gcc
SOURCE = src/
EXECUTE = src/execute_cmd/complex_execution/
PERSONNAL_CMD = src/personnal_cmd/
SPECIAL_VARIABLES = src/special_variable/
SRC = $(SOURCE)main.c \
$(SOURCE)find_path/concat.c \
$(SOURCE)find_path/get_path.c \
$(SOURCE)utils/get_pwd.c \
$(SOURCE)execute_cmd/execute_command.c \
$(SOURCE)execute_cmd/status_handler.c \
$(SOURCE)execute_cmd/classic_execution.c \
$(SOURCE)execute_cmd/child_error.c \
$(SOURCE)utils/copy_of_env.c \
$(SOURCE)utils/error.c \
$(SOURCE)utils/initialise_value.c \
$(SOURCE)utils/add_tab_line.c \
$(SOURCE)utils/copying.c \
$(SOURCE)utils/my_tabdup.c \
$(SOURCE)find_path/find_the_correct_path.c \
$(SOURCE)find_path/format_path.c \
$(SOURCE)termios/stdin_events.c \
$(SOURCE)termios/end_command.c \
$(SPECIAL_VARIABLES)special_variable_set.c \
$(SPECIAL_VARIABLES)unix_setenv.c \
$(SPECIAL_VARIABLES)term_type.c \
$(SPECIAL_VARIABLES)precmd.c \
$(PERSONNAL_CMD)unsetenv/my_unsetenv.c \
$(PERSONNAL_CMD)exit/my_exit.c \
$(PERSONNAL_CMD)print_env/my_env.c \
$(PERSONNAL_CMD)getenv/my_getenv.c \
$(PERSONNAL_CMD)cd/my_cd.c \
$(PERSONNAL_CMD)cd/choose_cd.c \
$(PERSONNAL_CMD)cd/free_new_path.c \
$(PERSONNAL_CMD)setenv/my_setenv.c \
$(PERSONNAL_CMD)setenv/verif_setenv.c \
$(PERSONNAL_CMD)setenv/my_isupper.c \
$(PERSONNAL_CMD)setenv/already_exist.c \
$(PERSONNAL_CMD)cmd_detector_main.c \
$(PERSONNAL_CMD)pipes/pipes.c \
$(PERSONNAL_CMD)pipes/wait_and_errno.c \
$(PERSONNAL_CMD)pipes/destroy_pipes.c \
$(PERSONNAL_CMD)pipes/free_pipes.c \
$(PERSONNAL_CMD)pipes/create_pipes.c \
$(PERSONNAL_CMD)pipes/close_pipes.c \
$(PERSONNAL_CMD)pipes/redirection_std.c \
$(PERSONNAL_CMD)pipes/close_read_and_write.c \
$(PERSONNAL_CMD)pipes/create_pipes_array.c \
$(PERSONNAL_CMD)pipes/allocate_commands.c \
$(PERSONNAL_CMD)pipes/nbr_piped.c \
$(PERSONNAL_CMD)pipes/pipe_file.c \
$(PERSONNAL_CMD)pipes/free_array_of_array.c \
$(PERSONNAL_CMD)pipes/error_with_cmd.c \
$(PERSONNAL_CMD)pipes/get_raw_cmd.c \
$(PERSONNAL_CMD)pipes/verif_pipe.c \
$(PERSONNAL_CMD)pipes/set_path.c \
$(PERSONNAL_CMD)history/my_history.c \
$(PERSONNAL_CMD)history/create_history.c \
$(PERSONNAL_CMD)history/free_history.c \
$(PERSONNAL_CMD)history/push_history.c \
$(PERSONNAL_CMD)history/display_history.c \
$(PERSONNAL_CMD)echo/echo.c \
$(EXECUTE)complex_main.c \
$(EXECUTE)set_data.c \
$(EXECUTE)set_info.c \
$(EXECUTE)execute_handler.c \
$(EXECUTE)simple_execution.c \
$(EXECUTE)complex_execution.c \
$(EXECUTE)complex_path.c \
$(EXECUTE)redirect_output_save.c \
$(EXECUTE)double_in.c \
$(EXECUTE)double_in_execution.c \
$(EXECUTE)save_or_clear.c \
$(EXECUTE)pipe_detect.c \
$(EXECUTE)semicolon_execute.c \
$(EXECUTE)and_execute.c \
$(EXECUTE)double_pipe_execute.c \
$(EXECUTE)redirect_detect.c \
$(SOURCE)utils/free_utils.c \
$(SOURCE)utils/signal_handler.c \
$(SOURCE)utils/get_command.c
OBJ = $(SRC:.c=.o)
NAME = 42sh
CPPFLAGS = -iquote./include/
CFLAGS = -Wall -Wextra -Werror -lncurses
LDFLAGS = -L./lib/my
LDLIBS = -lmy
all: $(NAME)
debug: CFLAGS += -g3
debug: clean $(NAME)
valgrind: debug
valgrind ./$(NAME)
$(NAME): $(OBJ)
make -C lib/my/
$(CC) -o $(NAME) $(SRC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(LDLIBS)
clean :
make -C lib/my/ clean
rm -f $(OBJ)
fclean: clean
make -C lib/my/ fclean
rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re debug