summaryrefslogtreecommitdiffstats
path: root/drivers/char/Makefile
blob: 217907a85aefb37111b3ff262e2818bbc3c763c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#
# Makefile for the kernel character device drivers.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now inherited from the
# parent makes..
#

.c.s:
	$(CC) $(CFLAGS) -S $<
.s.o:
	$(AS) $(ASFLAGS) -c -o $*.o $<
.c.o:
	$(CC) $(CFLAGS) -c $<

OBJS  = tty_io.o n_tty.o console.o keyboard.o serial.o \
	tty_ioctl.o pty.o vt.o mem.o vc_screen.o \
	defkeymap.o consolemap.o vesa_blank.o selection.o

SRCS  = tty_io.c n_tty.c console.c keyboard.c serial.c \
	tty_ioctl.c pty.c vt.c mem.c vc_screen.c \
	defkeymap.c consolemap.c vesa_blank.c selection.c


ifdef CONFIG_MIPS_MAGNUM_4000
OBJS := $(OBJS) fnt8x16.o
SRCS := $(SRCS) fnt8x16.c
endif

ifdef CONFIG_CYCLADES
OBJS := $(OBJS) cyclades.o
SRCS := $(SRCS) cyclades.c
endif

ifdef CONFIG_ATIXL_BUSMOUSE
M = y
OBJS := $(OBJS) atixlmouse.o
SRCS := $(SRCS) atixlmouse.c
endif

ifdef CONFIG_BUSMOUSE
M = y
OBJS := $(OBJS) busmouse.o
SRCS := $(SRCS) busmouse.c
endif

ifdef CONFIG_PRINTER
OBJS := $(OBJS) lp.o
SRCS := $(SRCS) lp.c
else
MODULES := $(MODULES) lp.o
endif

ifdef CONFIG_MS_BUSMOUSE
M = y
OBJS := $(OBJS) msbusmouse.o
SRCS := $(SRCS) msbusmouse.c
endif

ifdef CONFIG_82C710_MOUSE
CONFIG_PSMOUSE = CONFIG_PSMOUSE
endif

ifdef CONFIG_PSMOUSE
M = y
OBJS := $(OBJS) psaux.o
SRCS := $(SRCS) psaux.c
endif

ifdef CONFIG_QIC02_TAPE
OBJS := $(OBJS) tpqic02.o 
SRCS := $(SRCS) tpqic02.c
endif

ifdef M
OBJS := $(OBJS) mouse.o
SRCS := $(SRCS) mouse.c
endif
  
ifdef CONFIG_SCC
OBJS := $(OBJS) scc.o
SRCS := $(SRCS) scc.c
endif
 

all: char.a

char.a: $(OBJS)
	$(AR) rcs char.a $(OBJS)
	sync	

ifdef MODULES

modules: $(MODULES)
	(cd ../../modules;for i in $(MODULES); do ln -sf ../drivers/char/$$i .; done)

else

modules:

endif

dep:
	$(CPP) -M $(SRCS) > .depend
ifdef MODULES
	$(CPP) -M -DMODULE $(MODULES:.o=.c) >> .depend
endif

dummy:

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif