-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
69 lines (48 loc) · 1.78 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
CFLAGS = -nostdlib -nodefaultlibs --no-builtin -Wall -I./include
#CFLAGS = -nostdlib -nodefaultlibs --no-builtin -I./include
CXXFLAGS = $(CFLAGS)
LDFLAGS = -nostdlib -nodefaultlibs -Ttext 100000
LDFLAGS_EXT = --oformat binary --static -nostdlib -Ttext 0
LIBS =
CC = gcc
LD = ld
all: kernel
entry:
$(CC) $(CFLAGS) -o ./src/entry.o -c ./src/entry.S
isr_wrapper:
$(CC) $(CFLAGS) -o ./src/isr_wrapper.o -c ./src/isr_wrapper.S
memory:
$(CC) $(CFLAGS) -o ./src/memory.o -c ./src/memory.c
cpu:
$(CC) $(CFLAGS) -o ./src/cpu.o -c ./src/cpu.c
interrupts:
$(CC) $(CFLAGS) -o ./src/interrupts.o -c ./src/interrupts.c
pci:
$(CC) $(CFLAGS) -o ./src/pci.o -c ./src/pci.c
screen:
$(CC) $(CFLAGS) -o ./src/screen.o -c ./src/screen.c
keyboard:
$(CC) $(CFLAGS) -o ./src/keyboard.o -c ./src/keyboard.c
cli:
$(CC) $(CFLAGS) -o ./src/cli.o -c ./src/cli.c
fifo:
$(CC) $(CFLAGS) -o ./src/fifo.o -c ./src/fifo.c
string:
$(CC) $(CFLAGS) -o ./src/string.o -c ./src/string.c
main:
$(CC) $(CFLAGS) -o ./src/main.o -c ./src/main.c
ext_proc_compile:
$(CC) $(CFLAGS) -o ./src/ext_proc.o -c ./src/ext_proc.c
ext_entry:
$(CC) $(CFLAGS) -o ./src/ext_entry.o -c ./src/ext_entry.S
ext_proc: ext_proc_compile ext_entry
$(LD) $(LDFLAGS_EXT) -o ./ext_proc ./src/ext_entry.o ./src/ext_proc.o
compile: entry isr_wrapper memory cpu keyboard interrupts pci main screen cli fifo string
kernel: compile
# $(LD) $(LDFLAGS) -o ./kernel ./src/entry.o ./src/cpu.o ./src/main.o ./src/memory.o ./src/interrupts.o ./src/isr_wrapper.o ./src/pci.o ./src/screen.o
$(LD) $(LDFLAGS) -o ./kernel ./src/entry.o ./src/cpu.o ./src/memory.o ./src/interrupts.o ./src/isr_wrapper.o ./src/pci.o ./src/screen.o ./src/keyboard.o ./src/cli.o ./src/fifo.o ./src/string.o ./src/main.o
clean:
-rm -f ./src/*.o
# -rm -f ./ext_proc
-rm -f ./kernel
install: