2 CC
= gcc
-g
-nostdinc
-I..
/include -Wall
-Wno-unused
4 LDFLAGS
= --oformat binary
-N
5 CPP
=gcc
-g
-E
-nostdinc
-I..
/include
9 OBJS
= asm.o sys.o console.o kb.o mktime.o panic.o printk.o \
10 timer.o traps.o fd.o
shell.o reboot.o halt.o hexdump.o
11 #user_progs = user-test
13 all: kernel.o
${user_progs}
16 @printf
'%8s %s\n' 'LD' ${DIRNAME}/$@
17 ${LD} -r
-o
$@
${OBJS}
19 @printf
'%8s %s\n' 'AS' ${DIRNAME}/$@
22 @printf
'%8s %s\n' 'CC' ${DIRNAME}/$@
26 @
rm -f
*.o
*.map
*~ tmp_make
29 sed
'/\#\#\# Dependencies/q' < Makefile
> tmp_make
30 (for i in
*.c
;do echo
-n
`echo $$i | sed 's,\.c,\.s,'`" "; \
31 $(CPP
) -M
$$i;done
) >> tmp_make
35 console.s console.o
: console.c ..
/include/console.h ..
/include/asm
/io.h \
36 ..
/include/asm
/system.h
37 fd2.s fd2.o
: fd2.c ..
/include/fd.h ..
/include/timer.h ..
/include/thunix.h \
38 ..
/include/asm
/io.h ..
/include/asm
/system.h
39 fd.s fd.o
: fd.c ..
/include/fd.h ..
/include/timer.h ..
/include/thunix.h \
40 ..
/include/asm
/io.h ..
/include/asm
/system.h
41 fork.s fork.o
: fork.c ..
/include/sched.h ..
/include/head.h ..
/include/mm.h \
42 ..
/include/asm
/system.h
43 kb.s kb.o
: kb.c ..
/include/asm
/io.h ..
/include/asm
/system.h \
45 kb
(copy
).s keyboard.s keyboard.o
: keyboard.c ..
/include/keyboard.h ..
/include/asm
/io.h \
46 ..
/include/asm
/system.h
47 mktime.s mktime.o
: mktime.c ..
/include/time.h
48 panic.s panic.o
: panic.c ..
/include/kernel.h ..
/include/types.h
49 printk.s printk.o
: printk.c ..
/include/stdarg.h ..
/include/stddef.h \
51 ramdisk.s sched.s sched.o
: sched.c ..
/include/sched.h ..
/include/head.h ..
/include/mm.h \
52 ..
/include/asm
/system.h ..
/include/asm
/io.h
53 timer.s timer.o
: timer.c ..
/include/asm
/io.h ..
/include/asm
/system.h \
54 ..
/include/timer.h ..
/include/types.h
55 traps.s traps.o
: traps.c ..
/include/asm
/system.h ..
/include/asm
/io.h