-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (26 loc) · 956 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
# Default target creates non debug versions
all: receiver sender
# Debug target creates debugable versions of the normal targets
debug: receiver-debug sender-debug
### Normal Compilation stuff...
receiver : receiver.o
gcc -m32 -lpthread -o receiver receiver.o
receiver.o : receiver.asm
nasm -f elf32 receiver.asm
sender : sender.o
gcc -m32 -lpthread -o sender sender.o
sender.o : sender.asm
nasm -f elf32 sender.asm
### Debug Targets
receiver-debug : receiver-debug.o
gcc -m32 -lpthread -g -o receiver-debug receiver-debug.o
receiver-debug.o : receiver.asm
nasm -f elf32 -gdwarf -o receiver-debug.o receiver.asm
sender-debug : sender-debug.o
gcc -m32 -lpthread -g -o sender-debug sender-debug.o
sender-debug.o : sender.asm
nasm -f elf32 -gdwarf -o sender-debug.o sender.asm
# Proper(?) clean target
.PHONY : clean
clean :
-rm sender receiver sender.o receiver.o receiver-debug receiver-debug.o sender-debug sender-debug.o