Cleanup the warning messages
[thunix.git] / Makefile
blobfe5cb52e0ecd2769bc1f271b4efefc9103ca500e
1 AS = as -Iinclude
2 CC = gcc -nostdinc -Iinclude -Wall -Wno-unused-function
3 LD = ld
4 LDFLAGS = --oformat binary -N
6 KERNEL_OBJS = boot/head.o init/init.o kernel/kernel.o fs/ext2_fs.o
8 .PHONY :clean backup
12 .c.s:
13 ${CC} -S -o $*.s $<
14 .s.o:
15 ${AS} -o $*.o $<
16 .c.o:
17 ${CC} -c -o $*.o $<
20 all: thunix.img doc
22 thunix.img: boot.img kernel.img
23 cat boot.img kernel.img > thunix.img
24 @wc -c thunix.img
28 boot/boot.o:
29 (cd boot; make)
30 init/init.o:
31 (cd init; make)
32 kernel/kernel.o:
33 (cd kernel; make)
34 fs/ext2_fs.o:
35 (cd fs; make)
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}
42 doc:
43 (cd doc; make)
45 backup: clean
46 (cp thunix.img ./image)
47 (rm -f thunix.img)
48 (cd ..; tar -cf /media/Soft/thunix/thunix-0.2-backup.tar thunix)
50 bochs:
51 bochs -qf bochsrc
52 clean:
53 rm -f bochsout.txt boot.img kernel.img *~ include/*~
54 (cd boot; make clean)
55 (cd init; make clean)
56 (cd kernel; make clean)
57 (cd fs; make clean)
58 (cd doc; make clean)
60 dep:
61 (cd kernel; make dep)
62 (cd fs; make dep)