-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
143 lines (112 loc) · 2.86 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
131
132
133
134
135
136
137
138
139
140
141
142
143
##
## Makefile for 42sh in /home/heitzl_s/42
##
## Made by heitzl_s
## Login <[email protected]>
##
## Started on Sat May 24 01:02:56 2014 heitzl_s
## Last update Wed May 28 12:02:31 2014 garcia antoine
##
CC = gcc
RM = rm -f
TERM = ./termcaps
LEXER = ./lexer
PARSER = ./parser
XLIB = ./xlib
PIPE = ./pipe
EXEC = ./execution
ENV = ./env
PIPE = ./pipe
BUILTINS= ./builtins
CFLAGS += -Wextra -Wall -W -Werror
CFLAGS += -Wbad-function-cast -Wcast-align
LMY = -L $(ENV)/libsources/ -lmy
LIBTERM = -lncurses
NAME = 42sh
SRCS = $(TERM)/termcaps.c \
$(LEXER)/lexer.c \
$(LEXER)/check1.c \
$(LEXER)/check2.c \
$(LEXER)/epur_str.c \
$(ENV)/dlist.c \
$(ENV)/init.c \
$(ENV)/check.c \
$(ENV)/list.c \
$(ENV)/main.c \
$(ENV)/prompt.c \
$(ENV)/start_shell.c \
$(ENV)/util_env.c \
$(ENV)/strtotab.c \
$(PARSER)/parser.c \
$(PARSER)/struct_fill.c \
$(PARSER)/pars.c \
$(EXEC)/global_exec.c \
$(EXEC)/exec_simple_cmd.c \
$(EXEC)/redirections.c \
$(EXEC)/signal.c \
$(EXEC)/close_functions.c \
$(EXEC)/execution.c \
$(EXEC)/execution_next.c \
$(EXEC)/double_redir_left.c \
$(EXEC)/open_for_redir.c \
$(PIPE)/pipes.c \
$(PIPE)/prepa_pipes.c \
$(XLIB)/xclose.c \
$(XLIB)/xdup2.c \
$(XLIB)/xmalloc.c \
$(XLIB)/xopen.c \
$(XLIB)/xpipe.c \
$(XLIB)/xread.c \
$(BUILTINS)/check_builtins.c \
$(BUILTINS)/my_cd.c \
$(BUILTINS)/my_echo.c \
$(BUILTINS)/my_env.c \
$(BUILTINS)/modif_pwd.c \
$(BUILTINS)/modif_pwd2.c \
$(BUILTINS)/func_my_cd.c \
$(BUILTINS)/my_exit.c \
$(BUILTINS)/set_env.c \
$(BUILTINS)/check_access.c
OBJS = $(SRCS:.c=.o)
CLEAR = $(shell clear)
all: $(NAME)
$(NAME): $(OBJS)
$(CC) $(OBJS) -o $(NAME) $(LMY) $(LIBTERM) $(LDFLAGS)
@(cat txt/42sh.txt)
clean:
$(RM) $(OBJS) .hist42sh
fclean: clean
$(RM) $(NAME)
re: fclean all
charvo_a:
@(cat txt/charvo_a.txt)
heitzl_s:
@(cat txt/heitzl_s.txt)
girard_s:
@(cat txt/girard_s.txt)
audibe_l:
@(cat txt/audibe_l.txt)
garcia_t:
@(cat txt/garcia_t.txt)
group: charvo_a heitzl_s girard_s audibe_l garcia_t
.PHONY: all clean fclean re charvo_a heitzl_s girard_s audibe_l garcia_t group
.PRECIOUS: $(TERM)/termcaps.c \
$(LEXER)/lexer.c \
$(LEXER)/check1.c \
$(LEXER)/check2.c \
$(LEXER)/epur_str.c \
$(ENV)/dlist.c \
$(ENV)/init.c \
$(ENV)/list.c \
$(ENV)/main.c \
$(ENV)/prompt.c \
$(ENV)/start_shell.c \
$(ENV)/util_env.c \
$(ENV)/strtotab.c \
$(PARSER)/parser.c \
$(PARSER)/struct_fill.c \
$(PARSER)/pars.c \
$(EXEC)/global_exec.c \
$(EXEC)/exec_simple_cmd.c \
$(EXEC)/redirections.c \
$(PIPE)/pipes.c