xref: /openbmc/linux/net/core/Makefile (revision baf2c002)
1# SPDX-License-Identifier: GPL-2.0
2#
3# Makefile for the Linux networking core.
4#
5
6obj-y := sock.o request_sock.o skbuff.o datagram.o stream.o scm.o \
7	 gen_stats.o gen_estimator.o net_namespace.o secure_seq.o \
8	 flow_dissector.o dropreason_str.o
9
10obj-$(CONFIG_SYSCTL) += sysctl_net_core.o
11
12obj-y		     += dev.o dev_addr_lists.o dst.o netevent.o \
13			neighbour.o rtnetlink.o utils.o link_watch.o filter.o \
14			sock_diag.o dev_ioctl.o tso.o sock_reuseport.o \
15			fib_notifier.o xdp.o flow_offload.o gro.o
16
17obj-$(CONFIG_NETDEV_ADDR_LIST_TEST) += dev_addr_lists_test.o
18
19obj-y += net-sysfs.o
20obj-$(CONFIG_PAGE_POOL) += page_pool.o
21obj-$(CONFIG_PROC_FS) += net-procfs.o
22obj-$(CONFIG_NET_PKTGEN) += pktgen.o
23obj-$(CONFIG_NETPOLL) += netpoll.o
24obj-$(CONFIG_FIB_RULES) += fib_rules.o
25obj-$(CONFIG_TRACEPOINTS) += net-traces.o
26obj-$(CONFIG_NET_DROP_MONITOR) += drop_monitor.o
27obj-$(CONFIG_NET_SELFTESTS) += selftests.o
28obj-$(CONFIG_NETWORK_PHY_TIMESTAMPING) += timestamping.o
29obj-$(CONFIG_NET_PTP_CLASSIFY) += ptp_classifier.o
30obj-$(CONFIG_CGROUP_NET_PRIO) += netprio_cgroup.o
31obj-$(CONFIG_CGROUP_NET_CLASSID) += netclassid_cgroup.o
32obj-$(CONFIG_LWTUNNEL) += lwtunnel.o
33obj-$(CONFIG_LWTUNNEL_BPF) += lwt_bpf.o
34obj-$(CONFIG_DST_CACHE) += dst_cache.o
35obj-$(CONFIG_HWBM) += hwbm.o
36obj-$(CONFIG_NET_DEVLINK) += devlink.o
37obj-$(CONFIG_GRO_CELLS) += gro_cells.o
38obj-$(CONFIG_FAILOVER) += failover.o
39obj-$(CONFIG_NET_SOCK_MSG) += skmsg.o
40obj-$(CONFIG_BPF_SYSCALL) += sock_map.o
41obj-$(CONFIG_BPF_SYSCALL) += bpf_sk_storage.o
42obj-$(CONFIG_OF)	+= of_net.o
43
44clean-files := dropreason_str.c
45
46quiet_cmd_dropreason_str = GEN     $@
47cmd_dropreason_str = awk -F ',' 'BEGIN{ print "\#include <net/dropreason.h>\n"; \
48	print "const char * const drop_reasons[] = {" }\
49	/^enum skb_drop/ { dr=1; }\
50	/^\};/ { dr=0; }\
51	/^\tSKB_DROP_REASON_/ {\
52		if (dr) {\
53			sub(/\tSKB_DROP_REASON_/, "", $$1);\
54			printf "\t[SKB_DROP_REASON_%s] = \"%s\",\n", $$1, $$1;\
55		}\
56	}\
57	END{ print "};" }' $< > $@
58
59$(obj)/dropreason_str.c: $(srctree)/include/net/dropreason.h
60	$(call cmd,dropreason_str)
61
62$(obj)/dropreason_str.o: $(obj)/dropreason_str.c
63