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 sunrpc #decnet 13SUB_DIRS := core ethernet unix 14MOD_LIST_NAME := NET_MISC_MODULES 15 16ifeq ($(CONFIG_NET),y) 17SUB_DIRS += 802 18endif 19 20ifeq ($(CONFIG_INET),y) 21SUB_DIRS += ipv4 22endif 23 24ifeq ($(CONFIG_IPV6),y) 25SUB_DIRS += ipv6 26else 27 ifeq ($(CONFIG_IPV6),m) 28 MOD_SUB_DIRS += ipv6 29 endif 30endif 31 32ifeq ($(CONFIG_BRIDGE),y) 33SUB_DIRS += bridge 34endif 35 36ifeq ($(CONFIG_IPX),y) 37SUB_DIRS += ipx 38else 39 ifeq ($(CONFIG_IPX),m) 40 MOD_SUB_DIRS += ipx 41 endif 42endif 43 44ifeq ($(CONFIG_ATALK),y) 45SUB_DIRS += appletalk 46else 47 ifeq ($(CONFIG_ATALK),m) 48 MOD_SUB_DIRS += appletalk 49 endif 50endif 51 52ifeq ($(CONFIG_WAN_ROUTER),y) 53SUB_DIRS += wanrouter 54else 55 ifeq ($(CONFIG_WAN_ROUTER),m) 56 MOD_SUB_DIRS += wanrouter 57 endif 58endif 59 60ifeq ($(CONFIG_X25),y) 61SUB_DIRS += x25 62else 63 ifeq ($(CONFIG_X25),m) 64 MOD_SUB_DIRS += x25 65 endif 66endif 67 68ifeq ($(CONFIG_LAPB),y) 69SUB_DIRS += lapb 70else 71 ifeq ($(CONFIG_LAPB),m) 72 MOD_SUB_DIRS += lapb 73 endif 74endif 75 76ifeq ($(CONFIG_NETROM),y) 77SUB_DIRS += netrom 78else 79 ifeq ($(CONFIG_NETROM),m) 80 MOD_SUB_DIRS += netrom 81 endif 82endif 83 84ifeq ($(CONFIG_ROSE),y) 85SUB_DIRS += rose 86else 87 ifeq ($(CONFIG_ROSE),m) 88 MOD_SUB_DIRS += rose 89 endif 90endif 91 92ifeq ($(CONFIG_AX25),y) 93SUB_DIRS += ax25 94else 95 ifeq ($(CONFIG_AX25),m) 96 MOD_SUB_DIRS += ax25 97 endif 98endif 99 100ifeq ($(CONFIG_SUNRPC),y) 101SUB_DIRS += sunrpc 102else 103 ifeq ($(CONFIG_SUNRPC),m) 104 MOD_SUB_DIRS += sunrpc 105 endif 106endif 107 108ifeq ($(CONFIG_DECNET),y) 109SUB_DIRS += decnet 110else 111 ifeq ($(CONFIG_DECNET),m) 112 MOD_SUB_DIRS += decnet 113 endif 114endif 115 116# We must attach netsyms.o to socket.o, as otherwise there is nothing 117# to pull the object file from the archive. 118 119SOCK := socket.o 120ifeq ($(CONFIG_NET),y) 121ifeq ($(CONFIG_MODULES),y) 122O_TARGET := sock_n_syms.o 123O_OBJS := socket.o 124OX_OBJS := netsyms.o 125SOCK := $(O_TARGET) 126endif 127endif 128 129L_TARGET := network.a 130L_OBJS := $(SOCK) protocols.o $(join $(SUB_DIRS),$(SUB_DIRS:%=/%.o)) 131 132M_OBJS := 133 134ifeq ($(CONFIG_SYSCTL),y) 135L_OBJS += sysctl_net.o 136endif 137 138CONFIG_NETLINK_BUILTIN := 139CONFIG_NETLINK_MODULE := 140 141ifeq ($(CONFIG_NETLINK), y) 142 CONFIG_NETLINK_BUILTIN = y 143endif 144 145ifeq ($(CONFIG_IPV6), y) 146 CONFIG_NETLINK_BUILTIN = y 147endif 148 149ifeq ($(CONFIG_NETLINK), m) 150 CONFIG_NETLINK_MODULE = y 151endif 152 153ifeq ($(CONFIG_IPV6), m) 154 CONFIG_NETLINK_MODULE = y 155endif 156 157ifdef CONFIG_NETLINK_BUILTIN 158L_OBJS += netlink.o 159else 160 ifdef CONFIG_NETLINK_MODULE 161 M_OBJS += netlink.o 162 endif 163endif 164 165include $(TOPDIR)/Rules.make 166

