qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 for-3.2 v2 30/30] build-sys: add a basic meson bu


From: Marc-André Lureau
Subject: [Qemu-devel] [PATCH v2 for-3.2 v2 30/30] build-sys: add a basic meson build
Date: Thu, 22 Nov 2018 02:06:47 +0400

This is a minimal file to build a libslirp shared library.

It has been tested to build on Linux and with mingw64 cross-compilation.

Signed-off-by: Marc-André Lureau <address@hidden>
---
 slirp/meson.build | 48 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 slirp/meson.build

diff --git a/slirp/meson.build b/slirp/meson.build
new file mode 100644
index 0000000000..aa6f1b39e2
--- /dev/null
+++ b/slirp/meson.build
@@ -0,0 +1,48 @@
+project('slirp', 'c', version : '3.1')
+
+add_global_arguments('-std=gnu99', language : 'c')
+
+host_system = host_machine.system()
+
+glib_dep = dependency('glib-2.0')
+
+cc = meson.get_compiler('c')
+
+platform_deps = []
+
+if host_system == 'windows'
+  platform_deps += [
+    cc.find_library('ws2_32'),
+    cc.find_library('iphlpapi')
+  ]
+endif
+
+shared_library('slirp',
+               'arp_table.c',
+               'bootp.c',
+               'cksum.c',
+               'dhcpv6.c',
+               'dnssearch.c',
+               'if.c',
+               'ip6_icmp.c',
+               'ip6_input.c',
+               'ip6_output.c',
+               'ip_icmp.c',
+               'ip_input.c',
+               'ip_output.c',
+               'mbuf.c',
+               'misc.c',
+               'ncsi.c',
+               'ndp_table.c',
+               'sbuf.c',
+               'slirp.c',
+               'socket.c',
+               'tcp_input.c',
+               'tcp_output.c',
+               'tcp_subr.c',
+               'tcp_timer.c',
+               'tftp.c',
+               'udp.c',
+               'udp6.c',
+               'util.c',
+               dependencies : [glib_dep, platform_deps])
-- 
2.20.0.rc1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]