-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
56 lines (41 loc) · 866 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
CFLAGS = -Wall
CC = gcc
AS = nasm -f elf64
GAS = as
all:
#Do stuff
clean:
rm *.out *.o
tiny0: tiny.c
$(CC) $(CFLAGS) -o [email protected] $^
tiny1: tiny.c
$(CC) $(CFLAGS) -s -o [email protected] $^
tiny2: tiny.c
$(CC) $(CFLAGS) -s -O3 -o [email protected] $^
tiny3: tiny3.asm
$(AS) $^
$(CC) $(CFLAGS) -s -o [email protected] $^
tiny4: tiny4.asm
$(AS) $^
$(CC) $(CFLAGS) -s -nostartfiles -o [email protected] [email protected]
tiny5: tiny5.asm
$(AS) $^
$(CC) $(CFLAGS) -s -nostartfiles -o [email protected] [email protected]
tiny6: tiny6.asm
$(AS) $^
$(CC) $(CFLAGS) -s -nostdlib -o [email protected] [email protected]
tiny7: tiny7.asm
$(AS) $^
$(CC) $(CFLAGS) -s -nostdlib -o [email protected] [email protected]
tiny8: tiny8.s
$(GAS) $^ -o [email protected]
$(CC) $(CFLAGS) -s -nostdlib -o [email protected] [email protected]
tiny9: tiny9.asm
nasm -f bin -o [email protected] $^
chmod +x [email protected]
tiny10: tiny10.asm
nasm -f bin -o [email protected] $^
chmod +x [email protected]
tiny11: tiny11.asm
nasm -f bin -o [email protected] $^
chmod +x [email protected]