-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
71 lines (42 loc) · 1.62 KB
/
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Desired name of the executable
EXEC = nodes
# Add/Remove any flags to the compiler here..
INCLUDEDIRS = include/
CFLAGS = -Wall -I $(INCLUDEDIRS) -nostdinc -nostdlib -fno-builtin -fno-exceptions \
-Winline
# The architecture we are compiling for..
ARCH = i386
ARCHDIR = arch/$(ARCH)
# List the object files your exectuable depends on here..
# If you add more object files, remember to add a line specifying
# which source files the object file in question depends on.
OBJFILES = $(ARCHDIR)/boot/boot.o \
$(ARCHDIR)/mm/init.o \
mm/page_alloc.o \
kernel/print.o \
kernel/main.o \
$(ARCHDIR)/kernel/i8259.o \
$(ARCHDIR)/kernel/interrupts.o \
$(ARCHDIR)/kernel/irq.o \
$(ARCHDIR)/drivers/keyboard.o
$(EXEC) : $(OBJFILES)
$(LD) -T nodes.ld -o $(EXEC) $(OBJFILES)
i8259.o : $(ARCHDIR)/kernel/i8259.S
$(AS) -o i8259.o $(ARCHDIR)/kernel/i8259.S
$(ARCHDIR)/drivers/keyboard.o : include/sys/types.h include/nodes/keymap.h \
include/io.h include/asm/io.h include/asm/interrupt.h
kernel/main.o : include/asm/interrupt.h include/io.h include/nodes/devices.h \
include/multiboot.h
kernel/print.o : include/io.h
boot.o : $(ARCHDIR)/boot/boot.S
$(AS) -o boot.o $(ARCHDIR)/boot/boot.S
$(ARCHDIR)/kernel/interrupts.o : include/sys/types.h include/asm/interrupt.h \
include/asm/io.h include/io.h
irq.o : $(ARCHDIR)/kernel/irq.S
$(AS) -o irq.o irq.S
mm/page_alloc.o : include/sys/types.h include/mm/mm.h include/io.h
$(ARCHDIR)/mm/init.o : include/sys/types.h include/mm/mm.h include/asm/mm.h include/asm/gdt.h
clean :
rm $(OBJFILES)
cleanall :
rm $(OBJFILES) $(EXEC)