net: add rte prefix to ICMP defines
[dpdk.git] / lib / meson.build
index 99957ba..e067ce5 100644 (file)
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017 Intel Corporation
+# Copyright(c) 2017-2019 Intel Corporation
 
 
 # process all libraries equally, as far as possible
@@ -22,7 +22,7 @@ libraries = [
        'gro', 'gso', 'ip_frag', 'jobstats',
        'kni', 'latencystats', 'lpm', 'member',
        'power', 'pdump', 'rawdev',
-       'reorder', 'sched', 'security', 'vhost',
+       'rcu', 'reorder', 'sched', 'security', 'stack', 'vhost',
        #ipsec lib depends on crypto and security
        'ipsec',
        # add pkt framework libs which use other libs from above
@@ -30,6 +30,10 @@ libraries = [
        # flow_classify lib depends on pkt framework table lib
        'flow_classify', 'bpf', 'telemetry']
 
+if is_windows
+       libraries = ['kvargs','eal'] # only supported libraries for windows
+endif
+
 default_cflags = machine_args
 if cc.has_argument('-Wno-format-truncation')
        default_cflags += '-Wno-format-truncation'
@@ -117,14 +121,23 @@ foreach l:libraries
                        objs += static_lib.extract_all_objects(recursive: false)
                        version_map = '@0@/@1@/rte_@2@_version.map'.format(
                                        meson.current_source_dir(), dir_name, name)
+                       exports = []
+                       implib = dir_name + '.dll.a'
+                       if is_windows
+                               exports = '@0@/@1@/rte_@2@_exports.def'.format(
+                                       meson.current_source_dir(), dir_name, name)
+                               lk_args = ['-Wl,/def:' + exports, '-Wl,/implib:lib\\' + implib]
+                       else
+                               lk_args = ['-Wl,--version-script=' + version_map]
+                       endif
                        shared_lib = shared_library(libname,
                                        sources,
                                        objects: objs,
                                        c_args: cflags,
                                        dependencies: shared_deps,
                                        include_directories: includes,
-                                       link_args: '-Wl,--version-script=' + version_map,
-                                       link_depends: version_map,
+                                       link_args: lk_args,
+                                       link_depends: [version_map, exports],
                                        version: lib_version,
                                        soversion: so_version,
                                        install: true)