1AM_CFLAGS = -Wall -Wextra -D_POSIX_C_SOURCE=200809L 2AM_CPPFLAGS = -I$(top_srcdir)/uapi 3LDADD = -lm 4 5man_MANS = ethtool.8 6EXTRA_DIST = LICENSE ethtool.8 ethtool.spec.in aclocal.m4 ChangeLog autogen.sh 7 8sbin_PROGRAMS = ethtool 9ethtool_SOURCES = ethtool.c uapi/linux/const.h uapi/linux/ethtool.h internal.h \ 10 uapi/linux/net_tstamp.h uapi/linux/if.h uapi/linux/hdlc/ioctl.h \ 11 uapi/linux/if_addr.h uapi/linux/if_ether.h uapi/linux/if_link.h \ 12 uapi/linux/libc-compat.h uapi/linux/net_tstamp.h uapi/linux/neighbour.h \ 13 uapi/linux/posix_types.h uapi/linux/rtnetlink.h uapi/linux/socket.h \ 14 uapi/linux/stddef.h uapi/linux/types.h \ 15 rxclass.c common.c common.h \ 16 json_writer.c json_writer.h json_print.c json_print.h \ 17 list.h 18if ETHTOOL_ENABLE_PRETTY_DUMP 19ethtool_SOURCES += \ 20 amd8111e.c de2104x.c dsa.c e100.c e1000.c et131x.c igb.c \ 21 fec.c fec_8xx.c fsl_enetc.c ibm_emac.c ixgb.c ixgbe.c \ 22 natsemi.c pcnet32.c realtek.c tg3.c marvell.c vioc.c \ 23 smsc911x.c at76c50x-usb.c sfc.c stmmac.c \ 24 sff-common.c sff-common.h sfpid.c sfpdiag.c \ 25 ixgbevf.c tse.c vmxnet3.c qsfp.c qsfp.h fjes.c lan78xx.c \ 26 igc.c cmis.c cmis.h bnxt.c cpsw.c lan743x.c hns3.c 27endif 28 29if ENABLE_BASH_COMPLETION 30bashcompletiondir = $(BASH_COMPLETION_DIR) 31dist_bashcompletion_DATA = shell-completion/bash/ethtool 32endif 33 34if ETHTOOL_ENABLE_NETLINK 35ethtool_SOURCES += \ 36 netlink/netlink.c netlink/netlink.h netlink/extapi.h \ 37 netlink/msgbuff.c netlink/msgbuff.h netlink/nlsock.c \ 38 netlink/nlsock.h netlink/strset.c netlink/strset.h \ 39 netlink/monitor.c netlink/bitset.c netlink/bitset.h \ 40 netlink/settings.c netlink/parser.c netlink/parser.h \ 41 netlink/permaddr.c netlink/prettymsg.c netlink/prettymsg.h \ 42 netlink/features.c netlink/privflags.c netlink/rings.c \ 43 netlink/channels.c netlink/coalesce.c netlink/pause.c \ 44 netlink/eee.c netlink/tsinfo.c netlink/fec.c \ 45 netlink/stats.c netlink/mm.c \ 46 netlink/desc-ethtool.c netlink/desc-genlctrl.c \ 47 netlink/module-eeprom.c netlink/module.c netlink/rss.c \ 48 netlink/desc-rtnl.c netlink/cable_test.c netlink/tunnels.c \ 49 netlink/plca.c \ 50 netlink/pse-pd.c \ 51 netlink/phy.c \ 52 uapi/linux/ethtool_netlink.h \ 53 uapi/linux/netlink.h uapi/linux/genetlink.h \ 54 uapi/linux/rtnetlink.h uapi/linux/if_link.h \ 55 uapi/linux/if.h uapi/linux/hdlc/ioctl.h 56AM_CPPFLAGS += @MNL_CFLAGS@ 57LDADD += @MNL_LIBS@ 58endif 59 60TESTS = test-cmdline 61check_PROGRAMS = test-cmdline 62test_cmdline_SOURCES = test-cmdline.c test-common.c $(ethtool_SOURCES) 63test_cmdline_CFLAGS = -D_POSIX_C_SOURCE=200809L -DTEST_ETHTOOL 64if !ETHTOOL_ENABLE_NETLINK 65TESTS += test-features 66check_PROGRAMS += test-features 67test_features_SOURCES = test-features.c test-common.c $(ethtool_SOURCES) 68test_features_CFLAGS = -D_POSIX_C_SOURCE=200809L -DTEST_ETHTOOL 69endif 70 71dist-hook: 72 cp $(top_srcdir)/ethtool.spec $(distdir) 73 74