@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2010-2014 Intel Corporation
+ * Copyright(c) 2010-2019 Intel Corporation
*/
#ifndef _RTE_COMMON_H_
@@ -24,6 +24,11 @@ extern "C" {
#include <rte_config.h>
+/* windows specific*/
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <rte_windows.h>
+#endif
+
#ifndef typeof
#define typeof __typeof__
#endif
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2010-2014 Intel Corporation
+ * Copyright(c) 2010-2019 Intel Corporation
*/
/**
@@ -18,6 +18,8 @@ extern "C" {
#include <stdio.h>
#include <string.h>
+#include <rte_common.h>
+
/**
* Takes string "string" parameter and splits it at character "delim"
* up to maxtokens-1 times - to give "maxtokens" resulting tokens. Like
new file mode 100644
@@ -0,0 +1,9 @@
+EXPORTS
+ __rte_panic
+ rte_eal_get_configuration
+ rte_eal_init
+ rte_eal_mp_remote_launch
+ rte_eal_mp_wait_lcore
+ rte_eal_remote_launch
+ rte_log
+ rte_vlog
\ No newline at end of file
new file mode 100644
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2019 Intel Corporation
+ */
+
+#ifndef _RTE_WINDOWS_H_
+#define _RTE_WINDOWS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <BaseTsd.h>
+
+/* macro substitution for windows supported strerror_r */
+#define strerror_r(a, b, c) strerror_s(b, c, a)
+
+/* macro substitution for windows supported strdup */
+#define strdup(str) _strdup(str)
+
+/* macro substitution for windows supported ssize_t type */
+typedef SSIZE_T ssize_t;
+
+/* macro substitution for windows supported strtok_r */
+#define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_WINDOWS_H_ */
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2019 Intel Corporation
+eal_inc += include_directories('include')
+
env_objs = []
env_headers = []
env_sources = files('eal.c',
@@ -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
@@ -64,6 +64,11 @@ foreach l:libraries
dir_name = 'librte_' + l
subdir(dir_name)
+ if host_machine.system() == 'windows'
+ # injecting rte_windows.h in every library in windows
+ includes += include_directories('librte_eal/windows/eal/include')
+ endif
+
if build
enabled_libs += name
dpdk_conf.set('RTE_LIBRTE_' + name.to_upper(), 1)
@@ -117,14 +122,22 @@ 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 = '@0@/@1@/rte_@2@_exports.def'.format(
+ meson.current_source_dir(), dir_name, name)
+ implib = dir_name + '.dll.a'
+ if host_machine.system() == 'windows'
+ 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)