2 CC
= gcc
-nostdinc
-Iinclude
-Wall
-Wno-unused-function
4 LDFLAGS
= --oformat binary
-N
6 KERNEL_OBJS
= boot
/head.o init
/init.o kernel
/kernel.o fs
/ext2_fs.o mm
/mm.o
22 thunix.img
: boot.img kernel.img
23 cat boot.img kernel.img
> thunix.img
39 boot.img
: boot
/bootsect.o
40 ${LD} ${LDFLAGS} -e start
-Ttext
0x7c00 -o
$@
$<
41 kernel.img
: ${KERNEL_OBJS}
42 ${LD} ${LDFLAGS} -e pm_mode
-Ttext
0x0000 -o
$@
${KERNEL_OBJS}
48 (cp thunix.img .
/image
)
50 (cd ..
; tar -cf
/media
/Soft
/thunix
/thunix-0.2
-backup.
tar thunix
)
55 rm -f bochsout.txt boot.img kernel.img
*~
include/*~
58 (cd kernel
; make
clean)