-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
64 lines (49 loc) · 1.14 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
ASSEMBLER = nasm -f macho64
LINKER = gcc -nostdlib
FILES = exit read hello_world io alloc uselibio use_ctime fork args
all: ${FILES}
clean:
rm exit
rm read
rm hello_world
rm io
rm alloc
rm uselibio
rm use_ctime
exit: exit.asm
${ASSEMBLER} -o exit.o exit.asm
${LINKER} -o exit exit.o
@rm exit.o
read: read.asm
${ASSEMBLER} -o read.o read.asm
${LINKER} -o read read.o
@rm read.o
hello_world: hello_world.asm
${ASSEMBLER} -o hello_world.o hello_world.asm
${LINKER} -o hello_world hello_world.o
@rm hello_world.o
io: io.asm
${ASSEMBLER} -o io.o io.asm
${LINKER} -o io io.o
@rm io.o
alloc: alloc.asm
${ASSEMBLER} -o alloc.o alloc.asm
${LINKER} -o alloc alloc.o
@rm alloc.o
uselibio: uselibio.asm libio.asm
${ASSEMBLER} -o libio.o libio.asm
${ASSEMBLE} -o uselibio.o uselibio.asm
${LINKER} -o uselibio uselibio.o libio.o
@rm libio.o uselibio.o
use_ctime: use_ctime.asm
${ASSEMBLER} -o use_ctime.o use_ctime.asm
${LINKER} -o use_ctime use_ctime.o
@rm use_ctime.o
fork: fork.asm
${ASSEMBLER} -o fork.o fork.asm
${LINKER} -o fork fork.o
@rm fork.o
args: args.asm
${ASSEMBLER} -o args.o args.asm
${LINKER} -o args args.o
@rm args.o