-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (18 loc) · 947 Bytes
/
Makefile
File metadata and controls
27 lines (18 loc) · 947 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
include ../Makefile.config
KERNEL_OBJECTS=kernelcore.o main.o console.o page.o keyboard.o mouse.o event_queue.o clock.o interrupt.o kmalloc.o pic.o ata.o cdromfs.o string.o bitmap.o graphics.o font.o syscall_handler.o process.o mutex.o list.o pagetable.o rtc.o kshell.o fs.o hash_set.o diskfs.o serial.o loader.o device.o kobject.o pipe.o bcache.o printf.o is_valid.o window.o
basekernel.img: bootblock kernel
cat bootblock kernel /dev/zero | head -c 1474560 > basekernel.img
kernel: kernel.elf
${OBJCOPY} -O binary $< $@
bootblock: bootblock.elf
${OBJCOPY} -O binary $< $@
kernel.elf: ${KERNEL_OBJECTS}
${KERNEL_LD} ${KERNEL_LDFLAGS} -Ttext 0x10000 ${KERNEL_OBJECTS} -o $@
bootblock.elf: bootblock.o
${KERNEL_LD} ${KERNEL_LDFLAGS} -Ttext 0 $< -o $@
%.o: %.c
${CC} ${KERNEL_CCFLAGS} -I ../include $< -o $@
%.o: %.S
${CC} ${KERNEL_CCFLAGS} -I ../include $< -o $@
clean:
rm -rf basekernel.img *.o *.elf kernel bootblock bootblock.o