Import 2.3.16
[davej-history.git] / net / Makefile
blobccaed5154d4e39d4edceda9508933f5fad5b3319
2 # Makefile for the linux networking.
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).
8 # Note 2! The CFLAGS definition is now in the main makefile...
10 MOD_SUB_DIRS := ipv4
11 ALL_SUB_DIRS := 802 ax25 bridge core ethernet ipv4 ipv6 ipx unix appletalk \
12 netrom rose lapb x25 wanrouter netlink sched packet sunrpc \
13 econet irda decnet atm khttpd
14 SUB_DIRS := core ethernet sched
15 MOD_LIST_NAME := NET_MISC_MODULES
17 ifeq ($(CONFIG_NET),y)
18 SUB_DIRS += 802
19 endif
21 ifeq ($(CONFIG_INET),y)
22 SUB_DIRS += ipv4
23 endif
25 ifeq ($(CONFIG_UNIX),y)
26 SUB_DIRS += unix
27 else
28 ifeq ($(CONFIG_UNIX),m)
29 MOD_SUB_DIRS += unix
30 endif
31 endif
33 ifeq ($(CONFIG_IPV6),y)
34 SUB_DIRS += ipv6
35 else
36 ifeq ($(CONFIG_IPV6),m)
37 MOD_SUB_DIRS += ipv6
38 endif
39 endif
41 ifeq ($(CONFIG_KHTTPD),y)
42 SUB_DIRS += khttpd
43 else
44 ifeq ($(CONFIG_KHTTPD),m)
45 MOD_SUB_DIRS += khttpd
46 endif
47 endif
49 ifeq ($(CONFIG_NETLINK),y)
50 SUB_DIRS += netlink
51 ifeq ($(CONFIG_NETLINK_DEV),m)
52 MOD_SUB_DIRS += netlink
53 endif
54 endif
56 ifeq ($(CONFIG_PACKET),y)
57 SUB_DIRS += packet
58 else
59 ifeq ($(CONFIG_PACKET),m)
60 MOD_SUB_DIRS += packet
61 endif
62 endif
64 ifeq ($(CONFIG_NET_SCHED),y)
65 MOD_SUB_DIRS += sched
66 endif
68 ifeq ($(CONFIG_BRIDGE),y)
69 SUB_DIRS += bridge
70 endif
72 ifeq ($(CONFIG_IPX),y)
73 SUB_DIRS += ipx
74 # SPX can be still a module
75 MOD_SUB_DIRS += ipx
76 else
77 ifeq ($(CONFIG_IPX),m)
78 MOD_SUB_DIRS += ipx
79 endif
80 endif
82 ifeq ($(CONFIG_ATALK),y)
83 SUB_DIRS += appletalk
84 else
85 ifeq ($(CONFIG_ATALK),m)
86 MOD_SUB_DIRS += appletalk
87 endif
88 endif
90 ifeq ($(CONFIG_WAN_ROUTER),y)
91 SUB_DIRS += wanrouter
92 else
93 ifeq ($(CONFIG_WAN_ROUTER),m)
94 MOD_SUB_DIRS += wanrouter
95 endif
96 endif
98 ifeq ($(CONFIG_X25),y)
99 SUB_DIRS += x25
100 else
101 ifeq ($(CONFIG_X25),m)
102 MOD_SUB_DIRS += x25
103 endif
104 endif
106 ifeq ($(CONFIG_LAPB),y)
107 SUB_DIRS += lapb
108 else
109 ifeq ($(CONFIG_LAPB),m)
110 MOD_SUB_DIRS += lapb
111 endif
112 endif
114 ifeq ($(CONFIG_NETROM),y)
115 SUB_DIRS += netrom
116 else
117 ifeq ($(CONFIG_NETROM),m)
118 MOD_SUB_DIRS += netrom
119 endif
120 endif
122 ifeq ($(CONFIG_ROSE),y)
123 SUB_DIRS += rose
124 else
125 ifeq ($(CONFIG_ROSE),m)
126 MOD_SUB_DIRS += rose
127 endif
128 endif
130 ifeq ($(CONFIG_AX25),y)
131 SUB_DIRS += ax25
132 else
133 ifeq ($(CONFIG_AX25),m)
134 MOD_SUB_DIRS += ax25
135 endif
136 endif
138 ifeq ($(CONFIG_IRDA),y)
139 SUB_DIRS += irda
140 # There might be some irda features that are compiled as modules
141 MOD_IN_SUB_DIRS += irda
142 else
143 ifeq ($(CONFIG_IRDA),m)
144 MOD_SUB_DIRS += irda
145 endif
146 endif
148 ifeq ($(CONFIG_SUNRPC),y)
149 SUB_DIRS += sunrpc
150 else
151 ifeq ($(CONFIG_SUNRPC),m)
152 MOD_SUB_DIRS += sunrpc
153 endif
154 endif
156 ifeq ($(CONFIG_ATM),y)
157 SUB_DIRS += atm
158 ifeq ($(CONFIG_ATM_LANE),m)
159 MOD_ATM = atm
160 endif
161 ifeq ($(CONFIG_ATM_MPOA),m)
162 MOD_ATM = atm
163 endif
164 MOD_SUB_DIRS += $(MOD_ATM)
165 endif
167 ifeq ($(CONFIG_DECNET),y)
168 SUB_DIRS += decnet
169 else
170 ifeq ($(CONFIG_DECNET),m)
171 MOD_SUB_DIRS += decnet
172 endif
173 endif
175 ifeq ($(CONFIG_ECONET),y)
176 SUB_DIRS += econet
177 else
178 ifeq ($(CONFIG_ECONET),m)
179 MOD_SUB_DIRS += econet
180 endif
181 endif
183 # We must attach netsyms.o to socket.o, as otherwise there is nothing
184 # to pull the object file from the archive.
186 SOCK := socket.o
187 ifeq ($(CONFIG_NET),y)
188 ifeq ($(CONFIG_MODULES),y)
189 O_TARGET := sock_n_syms.o
190 O_OBJS := socket.o
191 OX_OBJS := netsyms.o
192 SOCK := $(O_TARGET)
193 endif
194 endif
196 L_TARGET := network.a
197 L_OBJS := $(SOCK) protocols.o $(join $(SUB_DIRS),$(SUB_DIRS:%=/%.o))
199 M_OBJS :=
201 ifeq ($(CONFIG_SYSCTL),y)
202 ifeq ($(CONFIG_NET),y)
203 L_OBJS += sysctl_net.o
204 endif
205 endif
207 include $(TOPDIR)/Rules.make