|
|
120141 |
From 378d4707c26acf05e551219d8b09ddf440bdba2a Mon Sep 17 00:00:00 2001
|
|
|
120141 |
From: Rosen Penev <rosenp@gmail.com>
|
|
|
120141 |
Date: Fri, 10 Jun 2022 23:14:27 -0700
|
|
|
120141 |
Subject: [PATCH 03/14] add meson
|
|
|
120141 |
|
|
|
120141 |
Simpler build system. Placing in contrib for now.
|
|
|
120141 |
|
|
|
120141 |
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
120141 |
---
|
|
|
120141 |
contrib/README | 2 ++
|
|
|
120141 |
contrib/meson.build | 45 +++++++++++++++++++++++++++++++++++++++
|
|
|
120141 |
contrib/meson_options.txt | 11 ++++++++++
|
|
|
120141 |
3 files changed, 58 insertions(+)
|
|
|
120141 |
create mode 100644 contrib/README
|
|
|
120141 |
create mode 100644 contrib/meson.build
|
|
|
120141 |
create mode 100644 contrib/meson_options.txt
|
|
|
120141 |
|
|
|
120141 |
diff --git a/contrib/README b/contrib/README
|
|
|
120141 |
new file mode 100644
|
|
|
120141 |
index 0000000..2158dac
|
|
|
120141 |
--- /dev/null
|
|
|
120141 |
+++ b/contrib/README
|
|
|
120141 |
@@ -0,0 +1,2 @@
|
|
|
120141 |
+This directory contains meson build instructions for irqbalance. This is here to see if there is any interest from
|
|
|
120141 |
+the general community.
|
|
|
120141 |
diff --git a/contrib/meson.build b/contrib/meson.build
|
|
|
120141 |
new file mode 100644
|
|
|
120141 |
index 0000000..d813233
|
|
|
120141 |
--- /dev/null
|
|
|
120141 |
+++ b/contrib/meson.build
|
|
|
120141 |
@@ -0,0 +1,45 @@
|
|
|
120141 |
+project('irqbalance', 'c', version: '1.9.0', default_options: ['warning_level=1'])
|
|
|
120141 |
+cc = meson.get_compiler('c')
|
|
|
120141 |
+
|
|
|
120141 |
+glib_dep = dependency('glib-2.0')
|
|
|
120141 |
+m_dep = cc.find_library('m', required: false)
|
|
|
120141 |
+capng_dep = dependency('libcap-ng', required: get_option('capng'))
|
|
|
120141 |
+ncurses_dep = dependency('curses', required: get_option('ui'))
|
|
|
120141 |
+systemd_dep = dependency('libsystemd', required: get_option('systemd'))
|
|
|
120141 |
+
|
|
|
120141 |
+cdata = configuration_data()
|
|
|
120141 |
+cdata.set('HAVE_GETOPT_LONG', cc.has_function('getopt_long'))
|
|
|
120141 |
+cdata.set('HAVE_IRQBALANCEUI', ncurses_dep.found())
|
|
|
120141 |
+cdata.set('HAVE_NUMA_H', cc.has_header('numa.h'))
|
|
|
120141 |
+cdata.set('HAVE_LIBCAP_NG', capng_dep.found())
|
|
|
120141 |
+cdata.set('HAVE_LIBSYSTEMD', systemd_dep.found())
|
|
|
120141 |
+cdata.set_quoted('VERSION', meson.project_version())
|
|
|
120141 |
+cfile = configure_file(output: 'config.h', configuration: cdata)
|
|
|
120141 |
+
|
|
|
120141 |
+if cdata.get('HAVE_IRQBALANCEUI')
|
|
|
120141 |
+ add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
|
|
120141 |
+
|
|
|
120141 |
+ executable(
|
|
|
120141 |
+ 'irqbalance-ui',
|
|
|
120141 |
+ '../ui/helpers.c',
|
|
|
120141 |
+ '../ui/irqbalance-ui.c',
|
|
|
120141 |
+ '../ui/ui.c',
|
|
|
120141 |
+ dependencies: [glib_dep, ncurses_dep],
|
|
|
120141 |
+ install: true,
|
|
|
120141 |
+ )
|
|
|
120141 |
+endif
|
|
|
120141 |
+
|
|
|
120141 |
+executable(
|
|
|
120141 |
+ 'irqbalance',
|
|
|
120141 |
+ '../activate.c',
|
|
|
120141 |
+ '../bitmap.c',
|
|
|
120141 |
+ '../classify.c',
|
|
|
120141 |
+ '../cputree.c',
|
|
|
120141 |
+ '../irqbalance.c',
|
|
|
120141 |
+ '../irqlist.c',
|
|
|
120141 |
+ '../numa.c',
|
|
|
120141 |
+ '../placement.c',
|
|
|
120141 |
+ '../procinterrupts.c',
|
|
|
120141 |
+ dependencies: [glib_dep, m_dep, capng_dep, systemd_dep],
|
|
|
120141 |
+ install: true,
|
|
|
120141 |
+)
|
|
|
120141 |
diff --git a/contrib/meson_options.txt b/contrib/meson_options.txt
|
|
|
120141 |
new file mode 100644
|
|
|
120141 |
index 0000000..3515dc3
|
|
|
120141 |
--- /dev/null
|
|
|
120141 |
+++ b/contrib/meson_options.txt
|
|
|
120141 |
@@ -0,0 +1,11 @@
|
|
|
120141 |
+option('capng', type : 'feature',
|
|
|
120141 |
+ description : 'Build with libcap-ng support',
|
|
|
120141 |
+)
|
|
|
120141 |
+
|
|
|
120141 |
+option('systemd', type : 'feature',
|
|
|
120141 |
+ description : 'Build with systemd support',
|
|
|
120141 |
+)
|
|
|
120141 |
+
|
|
|
120141 |
+option('ui', type : 'feature',
|
|
|
120141 |
+ description : 'Build the UI component',
|
|
|
120141 |
+)
|
|
|
120141 |
--
|
|
|
120141 |
2.33.1
|
|
|
120141 |
|