comparison cos/kernel/Makefile @ 28:47b7df514243

Moved Makefiles
author windel
date Wed, 28 Dec 2011 13:38:43 +0100
parents cos/Makefile@7f74363f4c82
children 7e3bdcb391dc
comparison
equal deleted inserted replaced
27:7f74363f4c82 28:47b7df514243
1 # vim: set noexpandtab:
2
3 all: bootdisk.img Makefile
4
5 bootdisk.img: lcfosc.bin grub/menu.lst Makefile
6 cp grub/emptybootdisk.img bootdisk.img
7 mcopy -D o -i bootdisk.img lcfosc.bin ::
8 mcopy -D o -i bootdisk.img grub/menu.lst ::/grub
9
10 CRT0 = goto64.o
11
12 CFLAGS = -m64 -nostdinc -nostdlib -nostartfiles -mno-red-zone \
13 -fno-builtin -mcmodel=large -Wall -Wextra -Werror
14
15 OBJECTS = video.o snprintf.o kernel.o asmcode.o handlers.o keyboard.o \
16 klib.o malloc.o task.o mm.o timer.o
17
18 lcfosc.bin: $(CRT0) $(OBJECTS) link.ld
19 ld -T link.ld -s -o lcfosc.bin $(CRT0) $(OBJECTS)
20
21 %.o : %.asm Makefile
22 nasm -f elf64 -o $@ $<
23
24 %.o : %.c Makefile
25 gcc $(CFLAGS) -o $@ -c $<
26
27 clean:
28 rm $(OBJECTS) $(CRT0) lcfosc.bin
29