-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (26 loc) · 740 Bytes
/
Makefile
File metadata and controls
31 lines (26 loc) · 740 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
# Copiler for NASM
NASM = nasm -f elf32
ASM = io_char.asm
ASM2 = Sum_of_two_numbers.asm
# Link object file
LINK = ld -m elf_i386
ENTRY_POINT = -e _main
######################################################
all: io_char linker1 run1 Sum linker2 run2
######################################################
io_char: $(ASM)
$(NASM) $(ASM) -o myApp.o
linker1: myApp.o
$(LINK) $(ENTRY_POINT) myApp.o -o myApp.out
######################################################
Sum: $(ASM2)
$(NASM) $(ASM2) -o Sum.o
linker2: Sum.o
$(LINK) $(ENTRY_POINT) Sum.o -o Sum.out
######################################################
run1: linker1
./myApp.out
run2: linker2
./Sum.out
######################################################
.PHONY: all