Linux 2.3.0
[davej-history.git] / net / Makefile
blobd20953259d3ee6400e755e1ce582ba73f93680da
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
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_NETLINK),y)
42 SUB_DIRS += netlink
43 ifeq ($(CONFIG_NETLINK_DEV),m)
44 MOD_SUB_DIRS += netlink
45 endif
46 endif
48 ifeq ($(CONFIG_PACKET),y)
49 SUB_DIRS += packet
50 else
51 ifeq ($(CONFIG_PACKET),m)
52 MOD_SUB_DIRS += packet
53 endif
54 endif
56 ifeq ($(CONFIG_NET_SCHED),y)
57 MOD_SUB_DIRS += sched
58 endif
60 ifeq ($(CONFIG_BRIDGE),y)
61 SUB_DIRS += bridge
62 endif
64 ifeq ($(CONFIG_IPX),y)
65 SUB_DIRS += ipx
66 # SPX can be still a module
67 MOD_SUB_DIRS += ipx
68 else
69 ifeq ($(CONFIG_IPX),m)
70 MOD_SUB_DIRS += ipx
71 endif
72 endif
74 ifeq ($(CONFIG_ATALK),y)
75 SUB_DIRS += appletalk
76 else
77 ifeq ($(CONFIG_ATALK),m)
78 MOD_SUB_DIRS += appletalk
79 endif
80 endif
82 ifeq ($(CONFIG_WAN_ROUTER),y)
83 SUB_DIRS += wanrouter
84 else
85 ifeq ($(CONFIG_WAN_ROUTER),m)
86 MOD_SUB_DIRS += wanrouter
87 endif
88 endif
90 ifeq ($(CONFIG_X25),y)
91 SUB_DIRS += x25
92 else
93 ifeq ($(CONFIG_X25),m)
94 MOD_SUB_DIRS += x25
95 endif
96 endif
98 ifeq ($(CONFIG_LAPB),y)
99 SUB_DIRS += lapb
100 else
101 ifeq ($(CONFIG_LAPB),m)
102 MOD_SUB_DIRS += lapb
103 endif
104 endif
106 ifeq ($(CONFIG_NETROM),y)
107 SUB_DIRS += netrom
108 else
109 ifeq ($(CONFIG_NETROM),m)
110 MOD_SUB_DIRS += netrom
111 endif
112 endif
114 ifeq ($(CONFIG_ROSE),y)
115 SUB_DIRS += rose
116 else
117 ifeq ($(CONFIG_ROSE),m)
118 MOD_SUB_DIRS += rose
119 endif
120 endif
122 ifeq ($(CONFIG_AX25),y)
123 SUB_DIRS += ax25
124 else
125 ifeq ($(CONFIG_AX25),m)
126 MOD_SUB_DIRS += ax25
127 endif
128 endif
130 ifeq ($(CONFIG_IRDA),y)
131 SUB_DIRS += irda
132 # There might be some irda features that are compiled as modules
133 MOD_IN_SUB_DIRS += irda
134 else
135 ifeq ($(CONFIG_IRDA),m)
136 MOD_SUB_DIRS += irda
137 endif
138 endif
140 ifeq ($(CONFIG_SUNRPC),y)
141 SUB_DIRS += sunrpc
142 else
143 ifeq ($(CONFIG_SUNRPC),m)
144 MOD_SUB_DIRS += sunrpc
145 endif
146 endif
148 ifeq ($(CONFIG_DECNET),y)
149 SUB_DIRS += decnet
150 else
151 ifeq ($(CONFIG_DECNET),m)
152 MOD_SUB_DIRS += decnet
153 endif
154 endif
156 ifeq ($(CONFIG_ECONET),y)
157 SUB_DIRS += econet
158 else
159 ifeq ($(CONFIG_ECONET),m)
160 MOD_SUB_DIRS += econet
161 endif
162 endif
164 # We must attach netsyms.o to socket.o, as otherwise there is nothing
165 # to pull the object file from the archive.
167 SOCK := socket.o
168 ifeq ($(CONFIG_NET),y)
169 ifeq ($(CONFIG_MODULES),y)
170 O_TARGET := sock_n_syms.o
171 O_OBJS := socket.o
172 OX_OBJS := netsyms.o
173 SOCK := $(O_TARGET)
174 endif
175 endif
177 L_TARGET := network.a
178 L_OBJS := $(SOCK) protocols.o $(join $(SUB_DIRS),$(SUB_DIRS:%=/%.o))
180 M_OBJS :=
182 ifeq ($(CONFIG_SYSCTL),y)
183 ifeq ($(CONFIG_NET),y)
184 L_OBJS += sysctl_net.o
185 endif
186 endif
188 include $(TOPDIR)/Rules.make