chiark / gitweb /
tree-wide: beautify remaining copyright statements
[elogind.git] / src / shared / meson.build
index 172f55ba70c147310ea2a9214513e2a7c18dad42..e6b2d513747c2ce91754cf77e880e43c2c444bf3 100644 (file)
@@ -1,5 +1,9 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# Copyright © 2017 Zbigniew Jędrzejewski-Szmek
+
 #if 0 /// elogind has a much shorter list
-# shared_sources = '''
+# shared_sources = files('''
 #         acl-util.h
 #         acpi-fpdt.c
 #         acpi-fpdt.h
@@ -11,6 +15,8 @@
 #         base-filesystem.h
 #         boot-timestamps.c
 #         boot-timestamps.h
+#         bootspec.c
+#         bootspec.h
 #         bus-unit-util.c
 #         bus-unit-util.h
 #         bus-util.c
@@ -38,8 +44,6 @@
 #         firewall-util.h
 #         fstab-util.c
 #         fstab-util.h
-#         gcrypt-util.c
-#         gcrypt-util.h
 #         generator.c
 #         generator.h
 #         gpt.h
@@ -66,8 +70,6 @@
 #         nsflags.h
 #         output-mode.c
 #         output-mode.h
-#         pager.c
-#         pager.h
 #         path-lookup.c
 #         path-lookup.h
 #         ptyfwd.c
@@ -89,6 +91,8 @@
 #         sysctl-util.h
 #         tests.c
 #         tests.h
+#         tomoyo-util.c
+#         tomoyo-util.h
 #         udev-util.h
 #         udev-util.c
 #         uid-range.c
 #         volatile-util.h
 #         watchdog.c
 #         watchdog.h
-# '''.split()
+#         wireguard-netlink.h
+# '''.split())
 #else
 shared_sources = '''
         bus-util.c
@@ -113,6 +118,8 @@ shared_sources = '''
         musl_missing.h
         nsflags.c
         nsflags.h
+        output-mode.c
+        output-mode.h
         pager.c
         pager.h
         sleep-config.c
@@ -128,20 +135,20 @@ test_tables_h = files('test-tables.h')
 shared_sources += [test_tables_h]
 
 if conf.get('HAVE_ACL') == 1
-        shared_sources += ['acl-util.c']
+        shared_sources += files('acl-util.c')
 endif
 
-if conf.get('HAVE_UTMP') == 1
-        shared_sources += ['utmp-wtmp.c']
+if conf.get('ENABLE_UTMP') == 1
+        shared_sources += files('utmp-wtmp.c')
 endif
 
 #if 0 /// UNNEEDED by elogind
 # if conf.get('HAVE_SECCOMP') == 1
-#         shared_sources += ['seccomp-util.c']
+#         shared_sources += files('seccomp-util.c')
 # endif
-#
+# 
 # if conf.get('HAVE_LIBIPTC') == 1
-#         shared_sources += ['firewall-util.c']
+#         shared_sources += files('firewall-util.c')
 # endif
 #endif // 0
 
@@ -161,7 +168,7 @@ libshared_name = 'elogind-shared-@0@'.format(meson.project_version())
 #                   libxz,
 #                   liblz4,
 #                   libblkid]
-# #else
+#else
 libshared_deps = [threads,
                   libacl,
                   libcap,
@@ -170,31 +177,31 @@ libshared_deps = [threads,
 
 libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
 
-libshared = shared_library(
+libshared_static = static_library(
         libshared_name,
         shared_sources,
-        basic_sources,
+        include_directories : includes,
+        dependencies : libshared_deps,
+        c_args : ['-fvisibility=default'])
+
+libshared = shared_library(
+        libshared_name,
 #if 0 /// UNNEEDED by elogind
-#         journal_internal_sources,
-#         libsystemd_internal_sources,
 #         libudev_sources,
-#else
-        libelogind_internal_sources,
 #endif // 0
         include_directories : includes,
         link_args : ['-shared',
-                    '-Wl,--version-script=' + libshared_sym_path],
+                     '-Wl,--version-script=' + libshared_sym_path],
+        link_whole : [libshared_static,
+                      libbasic,
+#if 0 /// UNNEEDED by elogind
+#                       libbasic_gcrypt,
+#                       libsystemd_static,
+#                       libjournal_client],
+#else
+                      libelogind_static],
+#endif // 0
         c_args : ['-fvisibility=default'],
         dependencies : libshared_deps,
         install : true,
         install_dir : rootlibexecdir)
-
-libshared_static = static_library(
-        libshared_name,
-        shared_sources,
-        basic_sources,
-#if 1 /// need elogind internal library sources
-        libelogind_internal_sources,
-#endif // 1
-        include_directories : includes,
-        dependencies : libshared_deps)