From 22ef6a507a308f2fe495b60bef78ac2ca00fb6d2 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 2 Jan 2018 13:37:06 +0100 Subject: build: refine the NETWORKMANAGER_COMPILATION define Note that: - we compile some source files multiple times. Most notably those under "shared/". - we include a default header "shared/nm-default.h" in every source file. This header is supposed to setup a common environment by defining and including parts that are commonly used. As we always include the same header, the header must behave differently depending one whether the compilation is for libnm-core, NetworkManager or libnm-glib. E.g. it must include or depending on whether we compile a library or an application. For that, the source files need the NETWORKMANAGER_COMPILATION #define to behave accordingly. Extend the define to be composed of flags. These flags are all named NM_NETWORKMANAGER_COMPILATION_WITH_*, they indicate which part of the build are available. E.g. when building libnm-core.la itself, then WITH_LIBNM_CORE, WITH_LIBNM_CORE_INTERNAL, and WITH_LIBNM_CORE_PRIVATE are available. When building NetworkManager, WITH_LIBNM_CORE_PRIVATE is not available but the internal parts are still accessible. When building nmcli, only WITH_LIBNM_CORE (the public part) is available. This granularily controls the build. --- clients/tui/meson.build | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'clients/tui') diff --git a/clients/tui/meson.build b/clients/tui/meson.build index 2bff05359a..1b0702ad81 100644 --- a/clients/tui/meson.build +++ b/clients/tui/meson.build @@ -1,7 +1,8 @@ incs = [ top_inc, shared_inc, - libnm_core_inc + libnm_core_inc, + libnm_inc, ] deps = [ @@ -9,7 +10,10 @@ deps = [ newt_dep ] -cflags = ['-DG_LOG_DOMAIN="nmtui"'] +cflags = clients_cflags + [ + '-DG_LOG_DOMAIN="nmtui"', + '-DLOCALEDIR="@0@"'.format(nm_localedir), +] subdir('newt') @@ -62,8 +66,6 @@ deps += [ libnmt_newt_dep ] -cflags += '-DLOCALEDIR="@0@"'.format(nm_localedir) - ldflags = [] if have_version_script ldflags += '-Wl,--version-script,@0@'.format(linker_script_binary) -- cgit v1.2.1