Convert the pcap driver to use the PMD_REGISTER_DRIVER macro and fix up the
Makefile so that its linkage is only done if we are building static libraries.
This means that the test applications now have no reference to the pcap library
when building DSO's and must specify its use on the command line with the -d
option. Static linking will still initalize the driver automatically.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
.init = rte_pmd_pcap_devinit,
};
-__attribute__((constructor))
-static void
-rte_pmd_pcap_init(void)
-{
- rte_eal_vdev_driver_register(&pmd_pcap_drv);
-}
+PMD_REGISTER_DRIVER(pmd_pcap_drv, PMD_VDEV);
LDLIBS += -lrte_cmdline
endif
+ifeq ($(RTE_BUILD_SHARED_LIB),n)
ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
LDLIBS += -lrte_pmd_pcap -lpcap
endif
+endif
LDLIBS += $(EXECENV_LDLIBS)