| 1 |
# SPDX-License-Identifier: LGPL-2.1-or-later |
| 2 |
|
| 3 |
systemctl_sources = files( |
| 4 |
'systemctl-add-dependency.c', |
| 5 |
'systemctl-cancel-job.c', |
| 6 |
'systemctl-clean-or-freeze.c', |
| 7 |
'systemctl-edit.c', |
| 8 |
'systemctl-enable.c', |
| 9 |
'systemctl-is-active.c', |
| 10 |
'systemctl-is-enabled.c', |
| 11 |
'systemctl-is-system-running.c', |
| 12 |
'systemctl-kill.c', |
| 13 |
'systemctl-list-dependencies.c', |
| 14 |
'systemctl-list-jobs.c', |
| 15 |
'systemctl-list-machines.c', |
| 16 |
'systemctl-list-unit-files.c', |
| 17 |
'systemctl-list-units.c', |
| 18 |
'systemctl-log-setting.c', |
| 19 |
'systemctl-main.c', |
| 20 |
'systemctl-mount.c', |
| 21 |
'systemctl-preset-all.c', |
| 22 |
'systemctl-reset-failed.c', |
| 23 |
'systemctl-service-watchdogs.c', |
| 24 |
'systemctl-set-default.c', |
| 25 |
'systemctl-set-environment.c', |
| 26 |
'systemctl-set-property.c', |
| 27 |
'systemctl-show.c', |
| 28 |
'systemctl-start-special.c', |
| 29 |
'systemctl-switch-root.c', |
| 30 |
'systemctl-trivial-method.c', |
| 31 |
'systemctl-whoami.c', |
| 32 |
) |
| 33 |
systemctl_extract_sources = files( |
| 34 |
'systemctl-compat-halt.c', |
| 35 |
'systemctl-compat-shutdown.c', |
| 36 |
'systemctl-daemon-reload.c', |
| 37 |
'systemctl-logind.c', |
| 38 |
'systemctl-start-unit.c', |
| 39 |
'systemctl-util.c', |
| 40 |
'systemctl.c', |
| 41 |
) |
| 42 |
|
| 43 |
if get_option('link-systemctl-shared') |
| 44 |
systemctl_link_with = [libshared] |
| 45 |
else |
| 46 |
systemctl_link_with = [libsystemd_static, |
| 47 |
libshared_static] |
| 48 |
endif |
| 49 |
|
| 50 |
executables += [ |
| 51 |
executable_template + { |
| 52 |
'name' : 'systemctl', |
| 53 |
'public' : true, |
| 54 |
'sources' : systemctl_sources, |
| 55 |
'extract' : systemctl_extract_sources, |
| 56 |
'link_with' : systemctl_link_with, |
| 57 |
'dependencies' : [ |
| 58 |
liblz4_cflags, |
| 59 |
libxz_cflags, |
| 60 |
libzstd_cflags, |
| 61 |
], |
| 62 |
'install_tag' : 'systemctl', |
| 63 |
}, |
| 64 |
fuzz_template + { |
| 65 |
'sources' : files('fuzz-systemctl-parse-argv.c'), |
| 66 |
'objects' : ['systemctl'], |
| 67 |
'link_with' : systemctl_link_with, |
| 68 |
}, |
| 69 |
] |
| 70 |
|
| 71 |
foreach alias : ['halt', 'poweroff', 'reboot', 'shutdown'] |
| 72 |
install_symlink(alias, |
| 73 |
pointing_to : sbin_to_bin + 'systemctl', |
| 74 |
install_dir : sbindir) |
| 75 |
endforeach |