forked from desmonHak/desmon-OS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (23 loc) · 757 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
CC= gcc
CC1=nasm
CFLAGS= -Wall -Wcomment -Wshadow -O -Wwrite-strings -fno-stack-protector -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdlib -nostdinc -fno-builtin -fno-stack-protector -I./_include/ -m32 -c
ASFLAGS= -f elf32
LDFLAGS= -m elf_i386 -T link.ld
SOURCES= *.o
IDIR = ../_include
LDIR = ../_include/include
PRINT=echo
link:
$(PRINT) -e "compilando kernel\n"
$(CC1) $(ASFLAGS) kernel.asm -o kernel.o
$(CC1) $(ASFLAGS) gdt.asm -o gdt.o
$(CC1) $(ASFLAGS) shutdown.asm -o shutdown.o
$(PRINT) -e "compilando modulos\n"
$(CC) $(CFLAGS) kc.c -o kc.o
$(PRINT) -e "linkado completado\n"
ld $(LDFLAGS) -o kernel $(SOURCES)
finally:
echo "\ncompilacion terminada"
rm -rf *.o;
virtual:
qemu-system-x86_64 -cdrom desmonOS.iso