-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
112 lines (94 loc) · 2.38 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
##
## EPITECH PROJECT, 2020
## PSU_minishell1_2019
## File description:
## Makefile
##
SRC = src/shell.c \
src/prompt.c \
src/execute.c \
src/alias.c \
src/redirections/redirection_manager.c \
src/redirections/redirections.c \
src/redirections/redirections_functions.c \
src/redirections/redirection_validator.c \
src/env.c \
src/args.c \
src/builtin/builtin_history.c \
src/builtin/builtin_history_two.c \
src/builtin/builtin_manager.c \
src/builtin/builtin_env.c \
src/builtin/builtin_source.c \
src/builtin/builtin_source_two.c \
src/builtin/builtin_which.c \
src/builtin/builtin_where.c \
src/builtin/builtin_alias.c \
src/builtin/builtin_unalias.c \
src/builtin/builtin_echo.c \
src/builtin/builtin_if.c \
src/builtin/builtin_if_two.c \
src/signal.c \
src/free_env.c \
src/utility/same_var.c \
src/utility/tostr.c \
src/utility/envvar_is_valid.c \
src/utility/to_array.c \
src/utility/catpath.c \
src/utility/split_str.c \
src/utility/envpath.c \
src/utility/fusion.c \
src/utility/split_commands.c \
src/utility/get_return.c \
src/parser/parser.c \
src/parser/quotes.c \
src/parser/double_quotes.c \
src/parser/parser_utilities.c \
src/parser/parser_vars_utilities.c \
src/utility/eof.c \
src/key_bindings/basic_typing_functions.c \
src/key_bindings/default_bindings.c \
src/key_bindings/control_commands.c \
src/key_bindings/move_commands.c \
src/my_ncurses/my_ncurses.c \
src/my_ncurses/string_utils.c \
src/my_ncurses/pause_utils.c \
src/key_bindings/autocompletion.c \
src/builtin/builtin_bindkey.c \
src/key_bindings/other_bindings.c \
src/builtin/builtin_vars.c \
src/key_bindings/signals.c \
src/prompt/prompt_values.c \
src/prompt/prompt_utilities.c
OBJ = $(SRC:%.c=%.o)
OBJ += src/main.o
TESTS = tests/tenv.c \
tests/targc.c \
tests/texecute.c \
tests/tcd.c \
tests/tsource.c \
tests/techo.c
COVERAGE = -lcriterion --coverage
UT = ./unit_tests
NAME = 42sh
CC = gcc
INCLUDE = -I ./include
CFLAGS = $(INCLUDE) -Wall -Wextra -Wshadow -Wno-unused-parameter
LDFLAGS = -lncurses
all: $(NAME)
$(NAME): $(OBJ)
$(CC) -o $(NAME) $(OBJ) $(LDFLAGS)
tests_run: clean
$(CC) -o $(UT) $(TESTS) $(SRC) $(COVERAGE) -g $(CFLAGS) $(LDFLAGS)
$(UT)
func: all
cd tests/tester/ && cp ../../$(NAME) $(NAME) && ./tester.sh
rm tests/tester/$(NAME)
clean:
$(RM) $(OBJ)
$(RM) *.gc*
fclean: clean
$(RM) $(NAME)
$(RM) $(UT)
re: fclean all
dbg: CFLAGS += -g
dbg: re