-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
33 lines (22 loc) · 818 Bytes
/
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
CFLAGS = -g -Wall
my_shell: turtle.o parse.o run_cmd.o redirection.o signal_handling.o cd.o pipe.o string_functions.o
gcc -o my_shell $(CFLAGS) turtle.o parse.o run_cmd.o redirection.o signal_handling.o cd.o pipe.o string_functions.o
clean:
rm -f *.o my_shell
# DONOT USE THESE RULES DIRECTLY
turtle.o: turtle.c turtle.h
gcc $(CFLAGS) -c turtle.c
parse.o: parse.c parse.h
gcc $(CFLAGS) -c parse.c
run_cmd.o: run_cmd.c run_cmd.h
gcc $(CFLAGS) -c run_cmd.c
redirection.o: redirection.c redirection.h
gcc $(CFLAGS) -c redirection.c
signal_handling.o: signal_handling.c signal_handling.h
gcc $(CFLAGS) -c signal_handling.c
cd.o: cd.c cd.h
gcc $(CFLAGS) -c cd.c
pipe.o: pipe.c pipe.h
gcc $(CFLAGS) -c pipe.c
string_functions.o: string_functions.c string_functions.h
gcc $(CFLAGS) -c string_functions.c