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

