view cos/Makefile @ 15:de004f808e56

Fixup in multidocument area stuff
author windel
date Tue, 15 Nov 2011 07:35:00 +0100
parents 607898120eb1
children fcdae30b2782
line wrap: on
line source

# vim: set noexpandtab:

all: lcfosc.elf

bootdisk.img: lcfosc.elf grub/menu.lst
	objcopy -O binary lcfosc.elf lcfosc.bin
	cp grub/emptybootdisk.img bootdisk.img
	mcopy -D o -i bootdisk.img lcfosc.bin ::
	mcopy -D o -i bootdisk.img grub/menu.lst ::/grub
	mdir -i bootdisk.img

CRT0 = kernel/goto64.o

CFLAGS = -m64 \
			-nostdinc \
			-nostdlib \
			-nostartfiles \
			-fno-builtin \
			-Iinclude

OBJECTS = \
	kernel/video.o \
	kernel/snprintf.o \
	kernel/kernel.o

lcfosc.elf: $(CRT0) $(OBJECTS) linker.ld
	ld -T linker.ld -o lcfosc.elf $(CRT0) $(OBJECTS)

%.o : %.asm
	nasm -f elf64 -o $@ $<

%.o : %.c
	gcc $(CFLAGS) -o $@ -c $< -Wall -Wextra -Werror

clean:
	rm $(OBJECTS) $(CRT0) lcfosc.bin lcfosc.elf