1f0ec58d5SJakub Kicinski# SPDX-License-Identifier: GPL-2.0 2f0ec58d5SJakub Kicinski 3f0ec58d5SJakub Kicinski# Try to include uAPI headers from the kernel uapi/ path. 4f0ec58d5SJakub Kicinski# Most code under tools/ requires the respective kernel uAPI headers 5f0ec58d5SJakub Kicinski# to be copied to tools/include. The duplication is annoying. 6f0ec58d5SJakub Kicinski# All the family headers should be self-contained. We avoid the copying 7f0ec58d5SJakub Kicinski# by selectively including just the uAPI header of the family directly 8f0ec58d5SJakub Kicinski# from the kernel sources. 9f0ec58d5SJakub Kicinski 10f0ec58d5SJakub KicinskiUAPI_PATH:=../../../../include/uapi/ 11f0ec58d5SJakub Kicinski 120c3d6fd4SJakub Kicinski# scripts/headers_install.sh strips "_UAPI" from header guards so we 130c3d6fd4SJakub Kicinski# need the explicit -D matching what's in /usr, to avoid multiple definitions. 14f0ec58d5SJakub Kicinski 150c3d6fd4SJakub Kicinskiget_hdr_inc=-D$(1) -include $(UAPI_PATH)/linux/$(2) 16f0ec58d5SJakub Kicinski 170c3d6fd4SJakub KicinskiCFLAGS_devlink:=$(call get_hdr_inc,_LINUX_DEVLINK_H_,devlink.h) 18d662c5b3SJakub KicinskiCFLAGS_dpll:=$(call get_hdr_inc,_LINUX_DPLL_H,dpll.h) 1946fb3ba9SDanielle RatsonCFLAGS_ethtool:=$(call get_hdr_inc,_LINUX_ETHTOOL_H,ethtool.h) \ 2046fb3ba9SDanielle Ratson $(call get_hdr_inc,_LINUX_ETHTOOL_NETLINK_H_,ethtool_netlink.h) 210c3d6fd4SJakub KicinskiCFLAGS_handshake:=$(call get_hdr_inc,_LINUX_HANDSHAKE_H,handshake.h) 22d662c5b3SJakub KicinskiCFLAGS_mptcp_pm:=$(call get_hdr_inc,_LINUX_MPTCP_PM_H,mptcp_pm.h) 230c3d6fd4SJakub KicinskiCFLAGS_netdev:=$(call get_hdr_inc,_LINUX_NETDEV_H,netdev.h) 249966e329SJakub KicinskiCFLAGS_nlctrl:=$(call get_hdr_inc,__LINUX_GENERIC_NETLINK_H,genetlink.h) 252be35a61SJakub KicinskiCFLAGS_nfsd:=$(call get_hdr_inc,_LINUX_NFSD_NETLINK_H,nfsd_netlink.h) 263bfe9052SJakub KicinskiCFLAGS_ovs_datapath:=$(call get_hdr_inc,__LINUX_OPENVSWITCH_H,openvswitch.h) 273bfe9052SJakub KicinskiCFLAGS_ovs_flow:=$(call get_hdr_inc,__LINUX_OPENVSWITCH_H,openvswitch.h) 283bfe9052SJakub KicinskiCFLAGS_ovs_vport:=$(call get_hdr_inc,__LINUX_OPENVSWITCH_H,openvswitch.h) 29*85674625SJakub KicinskiCFLAGS_tcp_metrics:=$(call get_hdr_inc,_LINUX_TCP_METRICS_H,tcp_metrics.h) 30