| 1 |
# |
| 2 |
# target: subdirs |
| 3 |
# |
| 4 |
|
| 5 |
if use_launcher |
| 6 |
subdir('catalog') |
| 7 |
subdir('units/system') |
| 8 |
subdir('units/user') |
| 9 |
endif |
| 10 |
|
| 11 |
# |
| 12 |
# target: libbus.so |
| 13 |
# |
| 14 |
|
| 15 |
sources_bus = [ |
| 16 |
'broker/broker.c', |
| 17 |
'broker/controller.c', |
| 18 |
'broker/controller-dbus.c', |
| 19 |
'bus/activation.c', |
| 20 |
'bus/bus.c', |
| 21 |
'bus/driver.c', |
| 22 |
'bus/listener.c', |
| 23 |
'bus/match.c', |
| 24 |
'bus/name.c', |
| 25 |
'bus/peer.c', |
| 26 |
'bus/policy.c', |
| 27 |
'bus/reply.c', |
| 28 |
'dbus/address.c', |
| 29 |
'dbus/connection.c', |
| 30 |
'dbus/message.c', |
| 31 |
'dbus/protocol.c', |
| 32 |
'dbus/queue.c', |
| 33 |
'dbus/sasl.c', |
| 34 |
'dbus/socket.c', |
| 35 |
'util/error.c', |
| 36 |
'util/dirwatch.c', |
| 37 |
'util/dispatch.c', |
| 38 |
'util/fdlist.c', |
| 39 |
'util/fs.c', |
| 40 |
'util/log.c', |
| 41 |
'util/metrics.c', |
| 42 |
'util/misc.c', |
| 43 |
'util/nsec.c', |
| 44 |
'util/proc.c', |
| 45 |
'util/sockopt.c', |
| 46 |
'util/string.c', |
| 47 |
'util/systemd.c', |
| 48 |
'util/user.c', |
| 49 |
] |
| 50 |
|
| 51 |
deps_bus = [ |
| 52 |
dep_cdvar, |
| 53 |
dep_clist, |
| 54 |
dep_crbtree, |
| 55 |
dep_cstdaux, |
| 56 |
dep_math, |
| 57 |
] |
| 58 |
|
| 59 |
incs_bus = include_directories('.') |
| 60 |
|
| 61 |
if use_apparmor |
| 62 |
sources_bus += [ |
| 63 |
'util/apparmor.c', |
| 64 |
] |
| 65 |
deps_bus += [ |
| 66 |
dep_libapparmor, |
| 67 |
] |
| 68 |
else |
| 69 |
sources_bus += [ |
| 70 |
'util/apparmor-fallback.c', |
| 71 |
] |
| 72 |
endif |
| 73 |
|
| 74 |
if use_audit |
| 75 |
sources_bus += [ |
| 76 |
'util/audit.c', |
| 77 |
] |
| 78 |
deps_bus += [ |
| 79 |
dep_libaudit, |
| 80 |
dep_libcapng, |
| 81 |
] |
| 82 |
else |
| 83 |
sources_bus += [ |
| 84 |
'util/audit-fallback.c', |
| 85 |
] |
| 86 |
endif |
| 87 |
|
| 88 |
if use_launcher |
| 89 |
sources_bus += [ |
| 90 |
'launch/config.c', |
| 91 |
'launch/nss-cache.c', |
| 92 |
'launch/policy.c', |
| 93 |
] |
| 94 |
deps_bus += [ |
| 95 |
dep_expat, |
| 96 |
dep_libsystemd, |
| 97 |
] |
| 98 |
endif |
| 99 |
|
| 100 |
if use_selinux |
| 101 |
sources_bus += [ |
| 102 |
'util/selinux.c', |
| 103 |
] |
| 104 |
deps_bus += [ |
| 105 |
dep_libselinux, |
| 106 |
] |
| 107 |
else |
| 108 |
sources_bus += [ |
| 109 |
'util/selinux-fallback.c', |
| 110 |
] |
| 111 |
endif |
| 112 |
|
| 113 |
static_bus = static_library( |
| 114 |
'bus-static', |
| 115 |
sources_bus, |
| 116 |
c_args: [ |
| 117 |
'-fvisibility=hidden', |
| 118 |
'-fno-common', |
| 119 |
], |
| 120 |
dependencies: deps_bus, |
| 121 |
pic: true, |
| 122 |
) |
| 123 |
|
| 124 |
dep_bus = declare_dependency( |
| 125 |
include_directories: incs_bus, |
| 126 |
link_with: static_bus, |
| 127 |
dependencies: deps_bus, |
| 128 |
version: meson.project_version(), |
| 129 |
) |
| 130 |
|
| 131 |
# |
| 132 |
# target: dbus-broker |
| 133 |
# |
| 134 |
|
| 135 |
exe_dbus_broker = executable( |
| 136 |
'dbus-broker', |
| 137 |
[ |
| 138 |
'broker/main.c', |
| 139 |
], |
| 140 |
dependencies: [ |
| 141 |
dep_bus, |
| 142 |
dep_cdvar, |
| 143 |
dep_cstdaux, |
| 144 |
], |
| 145 |
install: true, |
| 146 |
) |
| 147 |
|
| 148 |
# |
| 149 |
# target: dbus-broker-launch |
| 150 |
# |
| 151 |
|
| 152 |
if use_launcher |
| 153 |
exe_dbus_broker_launch = executable( |
| 154 |
'dbus-broker-launch', |
| 155 |
[ |
| 156 |
'launch/main.c', |
| 157 |
'launch/launcher.c', |
| 158 |
'launch/service.c', |
| 159 |
], |
| 160 |
dependencies: [ |
| 161 |
dep_bus, |
| 162 |
dep_cini, |
| 163 |
dep_crbtree, |
| 164 |
dep_cshquote, |
| 165 |
dep_cstdaux, |
| 166 |
dep_libsystemd, |
| 167 |
], |
| 168 |
install: true, |
| 169 |
link_depends: [ |
| 170 |
exe_dbus_broker, |
| 171 |
], |
| 172 |
) |
| 173 |
endif |
| 174 |
|
| 175 |
# |
| 176 |
# target: test-* |
| 177 |
# |
| 178 |
|
| 179 |
test_kwargs = { |
| 180 |
'dependencies': dep_bus, |
| 181 |
'install': use_tests, |
| 182 |
'install_dir': conf.get('testdir') / 'unit', |
| 183 |
} |
| 184 |
|
| 185 |
test_address = executable('test-address', sources: ['dbus/test-address.c'], kwargs: test_kwargs) |
| 186 |
test('Address Handling', test_address, suite: 'unit') |
| 187 |
|
| 188 |
test_apparmor = executable('test-apparmor', sources: ['util/test-apparmor.c'], kwargs: test_kwargs) |
| 189 |
test('AppArmor Handling', test_apparmor, suite: 'unit') |
| 190 |
|
| 191 |
if use_launcher |
| 192 |
test_config = executable('test-config', sources: ['launch/test-config.c'], kwargs: test_kwargs) |
| 193 |
test('Configuration Parser', test_config, suite: 'unit') |
| 194 |
endif |
| 195 |
|
| 196 |
test_dirwatch = executable('test-dirwatch', sources: ['util/test-dirwatch.c'], kwargs: test_kwargs) |
| 197 |
test('Directory Watch', test_dirwatch, suite: 'unit') |
| 198 |
|
| 199 |
test_dispatch = executable('test-dispatch', sources: ['util/test-dispatch.c'], kwargs: test_kwargs) |
| 200 |
test('Event Dispatcher', test_dispatch, suite: 'unit') |
| 201 |
|
| 202 |
test_error = executable('test-error', sources: ['util/test-error.c'], kwargs: test_kwargs) |
| 203 |
test('Error Handling', test_error, suite: 'unit') |
| 204 |
|
| 205 |
test_fdlist = executable('test-fdlist', sources: ['util/test-fdlist.c'], kwargs: test_kwargs) |
| 206 |
test('Utility File-Desciptor Lists', test_fdlist, suite: 'unit') |
| 207 |
|
| 208 |
test_fs = executable('test-fs', sources: ['util/test-fs.c'], kwargs: test_kwargs) |
| 209 |
test('File System Helpers', test_fs, suite: 'unit') |
| 210 |
|
| 211 |
test_match = executable('test-match', sources: ['bus/test-match.c'], kwargs: test_kwargs) |
| 212 |
test('D-Bus Match Handling', test_match, suite: 'unit') |
| 213 |
|
| 214 |
test_message = executable('test-message', sources: ['dbus/test-message.c'], kwargs: test_kwargs) |
| 215 |
test('D-Bus Message Abstraction', test_message, suite: 'unit') |
| 216 |
|
| 217 |
test_misc = executable('test-misc', sources: ['util/test-misc.c'], kwargs: test_kwargs) |
| 218 |
test('Miscellaneous Helpers', test_misc, suite: 'unit') |
| 219 |
|
| 220 |
test_name = executable('test-name', sources: ['bus/test-name.c'], kwargs: test_kwargs) |
| 221 |
test('Name Registry', test_name, suite: 'unit') |
| 222 |
|
| 223 |
test_nsec = executable('test-nsec', sources: ['util/test-nsec.c'], kwargs: test_kwargs) |
| 224 |
test('Nanosecond Time', test_nsec, suite: 'unit') |
| 225 |
|
| 226 |
if use_launcher |
| 227 |
test_nss_cache = executable('test-nss-cache', sources: ['launch/test-nss-cache.c'], kwargs: test_kwargs) |
| 228 |
test('NSS Cache', test_nss_cache, suite: 'unit') |
| 229 |
endif |
| 230 |
|
| 231 |
test_peersec = executable('test-peersec', sources: ['util/test-peersec.c'], kwargs: test_kwargs) |
| 232 |
test('SO_PEERSEC Queries', test_peersec, suite: 'unit') |
| 233 |
|
| 234 |
test_proc = executable('test-proc', sources: ['util/test-proc.c'], kwargs: test_kwargs) |
| 235 |
test('Proc Utilities', test_proc, suite: 'unit') |
| 236 |
|
| 237 |
test_queue = executable('test-queue', sources: ['dbus/test-queue.c'], kwargs: test_kwargs) |
| 238 |
test('D-Bus I/O Queues', test_queue, suite: 'unit') |
| 239 |
|
| 240 |
test_reply = executable('test-reply', sources: ['bus/test-reply.c'], kwargs: test_kwargs) |
| 241 |
test('Reply Tracking', test_reply, suite: 'unit') |
| 242 |
|
| 243 |
test_sasl = executable('test-sasl', sources: ['dbus/test-sasl.c'], kwargs: test_kwargs) |
| 244 |
test('D-Bus SASL Parser', test_sasl, suite: 'unit') |
| 245 |
|
| 246 |
test_socket = executable('test-socket', sources: ['dbus/test-socket.c'], kwargs: test_kwargs) |
| 247 |
test('D-Bus Socket Abstraction', test_socket, suite: 'unit') |
| 248 |
|
| 249 |
test_sockopt = executable('test-sockopt', sources: ['util/test-sockopt.c'], kwargs: test_kwargs) |
| 250 |
test('D-Bus Socket Options', test_sockopt, suite: 'unit') |
| 251 |
|
| 252 |
test_stitching = executable('test-stitching', sources: ['dbus/test-stitching.c'], kwargs: test_kwargs) |
| 253 |
test('Message Sender Stitching', test_stitching, suite: 'unit') |
| 254 |
|
| 255 |
test_systemd = executable('test-systemd', sources: ['util/test-systemd.c'], kwargs: test_kwargs) |
| 256 |
test('Systemd Utilities', test_systemd, suite: 'unit') |
| 257 |
|
| 258 |
test_user = executable('test-user', sources: ['util/test-user.c'], kwargs: test_kwargs) |
| 259 |
test('User Accounting', test_user, suite: 'unit') |