-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (24 loc) · 826 Bytes
/
Makefile
File metadata and controls
33 lines (24 loc) · 826 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
32
33
.SUFFIXES:
.SUFFIXES: .asm .o .c .o .c .s
SOURCES.c = kernel/kern_base.c kernel/video.c kernel/sys_func.c x86_64/interrupt.c kernel/mp_spec_info.c kernel/mem_manage.c
SOURCES.asm = x86_64/enable64.asm x86_64/interrupt-asm.asm x86_64/isrs.asm
ASSEMBLY = $(SOURCES.c:.c=.s)
OBJCETS.c =
OBJCETS.asm =
OBJECTS = $(SOURCES.asm:.asm=.o) $(SOURCES.c:.c=.o)
all : kern
.asm.o:
yasm -o $@ -f elf64 $<
.c.o:
gcc ${CPPFLAGS} -o $@ -I./include -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -c $<
.c.s:
gcc ${CPPFLAGS} -o $@ -I./include -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -S $<
x86_64/isrs.asm:isrmkr.pl
./isrmkr.pl
kern: $(OBJECTS) link.ld
ld -T link.ld -o kern $(OBJECTS)
asm: $(ASSEMBLY)
clean_asm :
rm -f $(ASSEMBLY)
clean :
rm -f kern $(OBJECTS) $(ASSEMBLY)