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
22 thunix.img
: boot.img kernel.img
23 cat boot.img kernel.img
> thunix.img
37 boot.img
: boot
/bootsect.o
38 ${LD} ${LDFLAGS} -e start
-Ttext
0x7c00 -o
$@
$<
39 kernel.img
: ${KERNEL_OBJS}
40 ${LD} ${LDFLAGS} -e pm_mode
-Ttext
0x0000 -o
$@
${KERNEL_OBJS}
46 (cp thunix.img .
/image
)
48 (cd ..
; tar -cf
/media
/Soft
/thunix
/thunix-0.2
-backup.
tar thunix
)
53 rm -f bochsout.txt boot.img kernel.img
*~
include/*~
56 (cd kernel
; make
clean)