2 LDFLAGS
= --oformat binary
-N
3 MAKEFLAGS
+= --no-print-directory
5 ifeq ("$(origin V)", "command line")
11 KERNEL_OBJS
= boot
/head.o init
/init.o kernel
/kernel.o mm
/mm.o fs
/fs.o
13 .PHONY
:clean backup release
17 thunix.img
: boot.img kernel.img
18 @printf
"%8s %s\n" "MK" $@
19 cat boot.img kernel.img
> thunix.img
20 (.
/gen-test.sh
>/dev
/null
)
22 boot.img
: boot
/bootsect.o
23 @printf
"%8s %s\n" "LD" $@
24 ${LD} ${LDFLAGS} -e start
-Ttext
0x7c00 -o
$@
$<
25 kernel.img
: ${KERNEL_OBJS}
26 @printf
"%8s %s\n" "LD" $@
27 ${LD} ${LDFLAGS} -e pm_mode
-Ttext
0x0000 -o
$@
${KERNEL_OBJS}
49 rm -f bochsout.txt boot.img kernel.img
*~
include/*~
52 (cd kernel
; make
clean)