annotate makefile @ 1:42ba76f77035 default tip

the kernel with output and mem alloc
author meillo@marmaro.de
date Sun, 01 Nov 2009 23:50:51 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
1
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
2 CC = i386-elf-gcc
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
3 CFLAGS = -Wall -Wextra -nostdlib -nostartfiles -nodefaultlibs
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
4
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
5 LD = i386-elf-ld
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
6 LDFLAGS = -T linker.ld
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
7
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
8 OBJ = loader.o kernel.o io.o mem.o
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
9
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
10 qemu: os.iso
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
11 qemu -m 16 -boot cd -cdrom os.iso
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
12
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
13 os.iso: kernel
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
14 cp kernel os-isofiles/boot/kernel
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
15 genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o os.iso os-isofiles
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
16
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
17 loader.o: loader.s
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
18 yasm -f elf -o loader.o loader.s
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
19
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
20 kernel: linker.ld $(OBJ)
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
21 i386-elf-ld -T linker.ld -o kernel $(OBJ)
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
22
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
23 clean:
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
24 rm -f *.o
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
25 rm -f kernel
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
26
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
27 distclean: clean
42ba76f77035 the kernel with output and mem alloc
meillo@marmaro.de
parents:
diff changeset
28 rm -f os.iso