selfmade-os
diff makefile @ 1:42ba76f77035
the kernel with output and mem alloc
author | meillo@marmaro.de |
---|---|
date | Sun, 01 Nov 2009 23:50:51 +0100 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/makefile Sun Nov 01 23:50:51 2009 +0100 1.3 @@ -0,0 +1,28 @@ 1.4 + 1.5 +CC = i386-elf-gcc 1.6 +CFLAGS = -Wall -Wextra -nostdlib -nostartfiles -nodefaultlibs 1.7 + 1.8 +LD = i386-elf-ld 1.9 +LDFLAGS = -T linker.ld 1.10 + 1.11 +OBJ = loader.o kernel.o io.o mem.o 1.12 + 1.13 +qemu: os.iso 1.14 + qemu -m 16 -boot cd -cdrom os.iso 1.15 + 1.16 +os.iso: kernel 1.17 + cp kernel os-isofiles/boot/kernel 1.18 + genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o os.iso os-isofiles 1.19 + 1.20 +loader.o: loader.s 1.21 + yasm -f elf -o loader.o loader.s 1.22 + 1.23 +kernel: linker.ld $(OBJ) 1.24 + i386-elf-ld -T linker.ld -o kernel $(OBJ) 1.25 + 1.26 +clean: 1.27 + rm -f *.o 1.28 + rm -f kernel 1.29 + 1.30 +distclean: clean 1.31 + rm -f os.iso