Make thunix can be run on a old bochs
[thunix.git] / kernel / Makefile
blob40b7c3a98cdff3078ce4cb2d3df84b67a294b29f
1 AS = as -I../include
2 CC = gcc -nostdinc -I../include -Wall
3 LD = ld
4 LDFLAGS = --oformat binary -N
5 CPP =gcc -E -nostdinc -I../include
7 OBJS = asm.o console.o kb.o mktime.o panic.o printk.o \
8 timer.o traps.o vsprintf.o fd.o shell.o reboot.o halt.o
11 kernel.o: ${OBJS}
12 ${LD} -r -o $@ ${OBJS}
13 .c.s:
14 ${CC} -S -o $*.s $<
15 .s.o:
16 ${AS} -o $*.o $<
17 .c.o:
18 ${CC} -c -o $*.o $<
22 clean:
23 rm -f *.o *.map *~ tmp_make
25 dep:
26 sed '/\#\#\# Dependencies/q' < Makefile > tmp_make
27 (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \
28 $(CPP) -M $$i;done) >> tmp_make
29 cp tmp_make Makefile
31 ### Dependencies:
32 console.s console.o: console.c ../include/console.h ../include/asm/io.h \
33 ../include/asm/system.h
34 fd2.s fd2.o: fd2.c ../include/fd.h ../include/timer.h ../include/thunix.h \
35 ../include/asm/io.h ../include/asm/system.h
36 fd.s fd.o: fd.c ../include/fd.h ../include/timer.h ../include/thunix.h \
37 ../include/asm/io.h ../include/asm/system.h
38 fork.s fork.o: fork.c ../include/sched.h ../include/head.h ../include/mm.h \
39 ../include/asm/system.h
40 kb.s kb.o: kb.c ../include/asm/io.h ../include/asm/system.h \
41 ../include/keyboard.h
42 kb (copy).s keyboard.s keyboard.o: keyboard.c ../include/keyboard.h ../include/asm/io.h \
43 ../include/asm/system.h
44 mktime.s mktime.o: mktime.c ../include/time.h
45 panic.s panic.o: panic.c ../include/kernel.h ../include/types.h
46 printk.s printk.o: printk.c ../include/stdarg.h ../include/stddef.h \
47 ../include/console.h
48 ramdisk.s sched.s sched.o: sched.c ../include/sched.h ../include/head.h ../include/mm.h \
49 ../include/asm/system.h ../include/asm/io.h
50 timer.s timer.o: timer.c ../include/asm/io.h ../include/asm/system.h \
51 ../include/timer.h ../include/types.h
52 traps.s traps.o: traps.c ../include/asm/system.h ../include/asm/io.h
53 vsprintf.s vsprintf.o: vsprintf.c ../include/stdarg.h ../include/string.h \
54 ../include/types.h