diff options
Diffstat (limited to 'src/kernel/chr_drv/Makefile')
-rw-r--r-- | src/kernel/chr_drv/Makefile | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/kernel/chr_drv/Makefile b/src/kernel/chr_drv/Makefile new file mode 100644 index 0000000..3dd5449 --- /dev/null +++ b/src/kernel/chr_drv/Makefile | |||
@@ -0,0 +1,67 @@ | |||
1 | # | ||
2 | # Makefile for the FREAX-kernel character device drivers. | ||
3 | # | ||
4 | # Note! Dependencies are done automagically by 'make dep', which also | ||
5 | # removes any old dependencies. DON'T put your own dependencies here | ||
6 | # unless it's something special (ie not a .c file). | ||
7 | # | ||
8 | |||
9 | include ../../Makefile.header | ||
10 | |||
11 | CFLAGS += -I../../include | ||
12 | CPP += -I../../include | ||
13 | |||
14 | .c.s: | ||
15 | @$(CC) $(CFLAGS) \ | ||
16 | -S -o $*.s $< | ||
17 | .s.o: | ||
18 | @$(AS) -o $*.o $< | ||
19 | .c.o: | ||
20 | @$(CC) $(CFLAGS) \ | ||
21 | -c -o $*.o $< | ||
22 | |||
23 | OBJS = tty_io.o console.o keyboard.o serial.o rs_io.o \ | ||
24 | tty_ioctl.o | ||
25 | |||
26 | chr_drv.a: $(OBJS) | ||
27 | @$(AR) rcs chr_drv.a $(OBJS) | ||
28 | sync | ||
29 | |||
30 | keyboard.s: kb.S ../../include/linux/config.h | ||
31 | @$(CPP) kb.S -o keyboard.s | ||
32 | |||
33 | clean: | ||
34 | @rm -f core *.o *.a tmp_make keyboard.s | ||
35 | @for i in *.c;do rm -f `basename $$i .c`.s;done | ||
36 | |||
37 | dep: | ||
38 | @sed '/\#\#\# Dependencies/q' < Makefile > tmp_make | ||
39 | @(for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \ | ||
40 | $(CPP) -M $$i;done) >> tmp_make | ||
41 | @cp tmp_make Makefile | ||
42 | |||
43 | ### Dependencies: | ||
44 | console.s console.o: console.c ../../include/linux/sched.h \ | ||
45 | ../../include/linux/head.h ../../include/linux/fs.h \ | ||
46 | ../../include/sys/types.h ../../include/linux/mm.h \ | ||
47 | ../../include/signal.h ../../include/linux/tty.h \ | ||
48 | ../../include/termios.h ../../include/asm/io.h \ | ||
49 | ../../include/asm/system.h | ||
50 | serial.s serial.o: serial.c ../../include/linux/tty.h ../../include/termios.h \ | ||
51 | ../../include/linux/sched.h ../../include/linux/head.h \ | ||
52 | ../../include/linux/fs.h ../../include/sys/types.h \ | ||
53 | ../../include/linux/mm.h ../../include/signal.h \ | ||
54 | ../../include/asm/system.h ../../include/asm/io.h | ||
55 | tty_io.s tty_io.o: tty_io.c ../../include/ctype.h ../../include/errno.h \ | ||
56 | ../../include/signal.h ../../include/sys/types.h \ | ||
57 | ../../include/linux/sched.h ../../include/linux/head.h \ | ||
58 | ../../include/linux/fs.h ../../include/linux/mm.h \ | ||
59 | ../../include/linux/tty.h ../../include/termios.h \ | ||
60 | ../../include/asm/segment.h ../../include/asm/system.h | ||
61 | tty_ioctl.s tty_ioctl.o: tty_ioctl.c ../../include/errno.h ../../include/termios.h \ | ||
62 | ../../include/linux/sched.h ../../include/linux/head.h \ | ||
63 | ../../include/linux/fs.h ../../include/sys/types.h \ | ||
64 | ../../include/linux/mm.h ../../include/signal.h \ | ||
65 | ../../include/linux/kernel.h ../../include/linux/tty.h \ | ||
66 | ../../include/asm/io.h ../../include/asm/segment.h \ | ||
67 | ../../include/asm/system.h | ||