-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
36 lines (24 loc) · 849 Bytes
/
makefile
File metadata and controls
36 lines (24 loc) · 849 Bytes
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
CCO = gcc -o
CC1 = gcc -c
CFLAGS = -Wall
TARGETS = shell test
default: shell
all: $(TARGETS)
shell: shell.o dirutils.o parsing.o shutility.o hcommand.o
$(CCO) $(CFLAGS) shell.o dirutils.o parsing.o shutility.o hcommand.o -o shell
shell.o: shell.c parsing.c parsing.h shutility.c shutility.h
$(CC1) $(CFLAGS) shell.c
dirutils.o: dirutils.c dirutils.h
$(CC1) $(CFLAGS) dirutils.c
parsing.o: parsing.c parsing.h shutility.c shutility.h hcommand.c hcommand.h
$(CC1) $(CFLAGS) dirutils.c parsing.c shutility.c hcommand.c
shutility.o: shutility.c shutility.h
$(CC1) $(CFLAGS) shutility.c
hcommand.o: hcommand.c hcommand.h dirutils.c dirutils.h shutility.c shutility.h
$(CC1) $(CFLAGS) hcommand.c dirutils.c shutility.c
test: test.o
$(CCO) $(CFLAGS) test.o -o test
clean:
rm -f *.o *~ a.out *.txt $(TARGETS)
.c.o:
$(CC) $(CFLAGS) -c $<