]> git.ipfire.org Git - thirdparty/systemd.git/blob - Makefile.am
networkd: split out vlan and macvlan handling
[thirdparty/systemd.git] / Makefile.am
1 # -*- Mode: makefile; indent-tabs-mode: t -*-
2 #
3 # This file is part of systemd.
4 #
5 # Copyright 2010-2012 Lennart Poettering
6 # Copyright 2010-2012 Kay Sievers
7 # Copyright 2013 Zbigniew Jędrzejewski-Szmek
8 # Copyright 2013 David Strauss
9 #
10 # systemd is free software; you can redistribute it and/or modify it
11 # under the terms of the GNU Lesser General Public License as published by
12 # the Free Software Foundation; either version 2.1 of the License, or
13 # (at your option) any later version.
14 #
15 # systemd is distributed in the hope that it will be useful, but
16 # WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # Lesser General Public License for more details.
19 #
20 # You should have received a copy of the GNU Lesser General Public License
21 # along with systemd; If not, see <http://www.gnu.org/licenses/>.
22
23 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
24 AM_MAKEFLAGS = --no-print-directory
25 AUTOMAKE_OPTIONS = color-tests parallel-tests
26
27 SUBDIRS = . po
28
29 # remove targets if the command fails
30 .DELETE_ON_ERROR:
31
32 # keep intermediate files
33 .SECONDARY:
34
35 # Keep the test-suite.log
36 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
37
38 LIBUDEV_CURRENT=5
39 LIBUDEV_REVISION=1
40 LIBUDEV_AGE=4
41
42 LIBGUDEV_CURRENT=2
43 LIBGUDEV_REVISION=0
44 LIBGUDEV_AGE=2
45
46 LIBSYSTEMD_CURRENT=3
47 LIBSYSTEMD_REVISION=0
48 LIBSYSTEMD_AGE=3
49
50 # The following four libraries only exist for compatibility reasons,
51 # their version info should not be bumped anymore
52 LIBSYSTEMD_LOGIN_CURRENT=9
53 LIBSYSTEMD_LOGIN_REVISION=3
54 LIBSYSTEMD_LOGIN_AGE=9
55
56 LIBSYSTEMD_DAEMON_CURRENT=0
57 LIBSYSTEMD_DAEMON_REVISION=12
58 LIBSYSTEMD_DAEMON_AGE=0
59
60 LIBSYSTEMD_ID128_CURRENT=0
61 LIBSYSTEMD_ID128_REVISION=28
62 LIBSYSTEMD_ID128_AGE=0
63
64 LIBSYSTEMD_JOURNAL_CURRENT=11
65 LIBSYSTEMD_JOURNAL_REVISION=5
66 LIBSYSTEMD_JOURNAL_AGE=11
67
68 # Dirs of external packages
69 dbuspolicydir=@dbuspolicydir@
70 dbussessionservicedir=@dbussessionservicedir@
71 dbussystemservicedir=@dbussystemservicedir@
72 pamlibdir=@pamlibdir@
73 pamconfdir=@pamconfdir@
74 pkgconfigdatadir=$(datadir)/pkgconfig
75 pkgconfiglibdir=$(libdir)/pkgconfig
76 polkitpolicydir=$(datadir)/polkit-1/actions
77 bashcompletiondir=@bashcompletiondir@
78 zshcompletiondir=@zshcompletiondir@
79 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
80 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
81 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
82 varlogdir=$(localstatedir)/log
83 systemdstatedir=$(localstatedir)/lib/systemd
84 catalogstatedir=$(systemdstatedir)/catalog
85
86 # Our own, non-special dirs
87 pkgsysconfdir=$(sysconfdir)/systemd
88 userunitdir=$(prefix)/lib/systemd/user
89 userpresetdir=$(prefix)/lib/systemd/user-preset
90 tmpfilesdir=$(prefix)/lib/tmpfiles.d
91 sysusersdir=$(prefix)/lib/sysusers.d
92 sysctldir=$(prefix)/lib/sysctl.d
93 binfmtdir=$(prefix)/lib/binfmt.d
94 modulesloaddir=$(prefix)/lib/modules-load.d
95 networkdir=$(rootprefix)/lib/systemd/network
96 pkgincludedir=$(includedir)/systemd
97 systemgeneratordir=$(rootlibexecdir)/system-generators
98 usergeneratordir=$(prefix)/lib/systemd/user-generators
99 systemshutdowndir=$(rootlibexecdir)/system-shutdown
100 systemsleepdir=$(rootlibexecdir)/system-sleep
101 systemunitdir=$(rootprefix)/lib/systemd/system
102 systempresetdir=$(rootprefix)/lib/systemd/system-preset
103 udevlibexecdir=$(rootprefix)/lib/udev
104 udevhomedir=$(udevlibexecdir)
105 udevrulesdir=$(udevlibexecdir)/rules.d
106 udevhwdbdir=$(udevlibexecdir)/hwdb.d
107 catalogdir=$(prefix)/lib/systemd/catalog
108 kernelinstalldir = $(prefix)/lib/kernel/install.d
109 ntpunitsdir=$(prefix)/lib/systemd/ntp-units.d
110
111 # And these are the special ones for /
112 rootprefix=@rootprefix@
113 rootbindir=$(rootprefix)/bin
114 rootlibexecdir=$(rootprefix)/lib/systemd
115
116 CLEANFILES = $(BUILT_SOURCES)
117 DISTCLEANFILES =
118 EXTRA_DIST =
119 BUILT_SOURCES =
120 INSTALL_EXEC_HOOKS =
121 UNINSTALL_EXEC_HOOKS =
122 INSTALL_DATA_HOOKS =
123 UNINSTALL_DATA_HOOKS =
124 DISTCLEAN_LOCAL_HOOKS =
125 CLEAN_LOCAL_HOOKS =
126 pkginclude_HEADERS =
127 noinst_LTLIBRARIES =
128 lib_LTLIBRARIES =
129 include_HEADERS =
130 noinst_DATA =
131 pkgconfiglib_DATA =
132 polkitpolicy_in_in_files =
133 polkitpolicy_in_files =
134 polkitpolicy_files =
135 dist_udevrules_DATA =
136 nodist_udevrules_DATA =
137 nodist_pkgsysconf_DATA =
138 dist_pkgsysconf_DATA =
139 dist_pkgdata_DATA =
140 dist_dbuspolicy_DATA =
141 dist_dbussystemservice_DATA =
142 check_PROGRAMS =
143 check_DATA =
144 tests=
145 manual_tests =
146 if ENABLE_TESTS
147 noinst_PROGRAMS = $(manual_tests) $(tests)
148 TESTS = $(tests)
149 else
150 noinst_PROGRAMS =
151 TESTS =
152 endif
153 udevlibexec_PROGRAMS =
154
155 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
156 $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
157 $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
158
159 AM_CPPFLAGS = \
160 -include $(top_builddir)/config.h \
161 -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
162 -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
163 -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
164 -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
165 -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
166 -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
167 -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
168 -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
169 -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
170 -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
171 -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
172 -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
173 -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
174 -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
175 -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
176 -DROOTPREFIX=\"$(rootprefix)\" \
177 -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
178 -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
179 -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
180 -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
181 -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
182 -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
183 -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
184 -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
185 -DX_SERVER=\"$(bindir)/X\" \
186 -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
187 -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
188 -DQUOTACHECK=\"$(QUOTACHECK)\" \
189 -DKEXEC=\"$(KEXEC)\" \
190 -DLIBDIR=\"$(libdir)\" \
191 -DROOTLIBDIR=\"$(rootlibdir)\" \
192 -I $(top_srcdir)/src \
193 -I $(top_builddir)/src/shared \
194 -I $(top_srcdir)/src/shared \
195 -I $(top_srcdir)/src/network \
196 -I $(top_srcdir)/src/login \
197 -I $(top_srcdir)/src/journal \
198 -I $(top_srcdir)/src/timedate \
199 -I $(top_srcdir)/src/timesync \
200 -I $(top_srcdir)/src/resolve \
201 -I $(top_srcdir)/src/systemd \
202 -I $(top_builddir)/src/core \
203 -I $(top_srcdir)/src/core \
204 -I $(top_srcdir)/src/libudev \
205 -I $(top_srcdir)/src/udev \
206 -I $(top_srcdir)/src/udev/net \
207 -I $(top_builddir)/src/udev \
208 -I $(top_srcdir)/src/libsystemd/sd-bus \
209 -I $(top_srcdir)/src/libsystemd/sd-event \
210 -I $(top_srcdir)/src/libsystemd/sd-rtnl \
211 -I $(top_srcdir)/src/libsystemd-network \
212 $(OUR_CPPFLAGS)
213
214 AM_CFLAGS = $(OUR_CFLAGS)
215 AM_LDFLAGS = $(OUR_LDFLAGS)
216
217 # ------------------------------------------------------------------------------
218 define move-to-rootlibdir
219 if test "$(libdir)" != "$(rootlibdir)"; then \
220 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
221 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
222 rm -f $(DESTDIR)$(libdir)/$$libname && \
223 $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
224 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
225 fi
226 endef
227
228 INSTALL_DIRS =
229
230 RUNLEVEL1_TARGET_WANTS =
231 RUNLEVEL2_TARGET_WANTS =
232 RUNLEVEL3_TARGET_WANTS =
233 RUNLEVEL4_TARGET_WANTS =
234 RUNLEVEL5_TARGET_WANTS =
235 SHUTDOWN_TARGET_WANTS =
236 LOCAL_FS_TARGET_WANTS =
237 MULTI_USER_TARGET_WANTS =
238 SYSINIT_TARGET_WANTS =
239 SOCKETS_TARGET_WANTS =
240 BUSNAMES_TARGET_WANTS =
241 TIMERS_TARGET_WANTS =
242 USER_SOCKETS_TARGET_WANTS =
243 USER_BUSNAMES_TARGET_WANTS =
244
245 SYSTEM_UNIT_ALIASES =
246 USER_UNIT_ALIASES =
247 GENERAL_ALIASES =
248
249 install-target-wants-hook:
250 what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && dir=$(systemunitdir) && $(add-wants)
251 what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && dir=$(systemunitdir) && $(add-wants)
252 what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && dir=$(systemunitdir) && $(add-wants)
253 what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && dir=$(systemunitdir) && $(add-wants)
254 what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && dir=$(systemunitdir) && $(add-wants)
255 what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
256 what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
257 what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
258 what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
259 what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
260 what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
261 what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
262 what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
263 what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
264 what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
265
266 define add-wants
267 [ -z "$$what" ] || ( \
268 dir=$(DESTDIR)$$dir/$$wants.wants && \
269 $(MKDIR_P) -m 0755 $$dir && \
270 cd $$dir && \
271 rm -f $$what && \
272 for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
273 endef
274
275 install-directories-hook:
276 $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
277
278 install-aliases-hook:
279 set -- $(SYSTEM_UNIT_ALIASES) && \
280 dir=$(systemunitdir) && $(install-aliases)
281 set -- $(USER_UNIT_ALIASES) && \
282 dir=$(userunitdir) && $(install-relative-aliases)
283 set -- $(GENERAL_ALIASES) && \
284 dir= && $(install-relative-aliases)
285
286 define install-aliases
287 while [ -n "$$1" ]; do \
288 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
289 rm -f $(DESTDIR)$$dir/$$2 && \
290 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
291 shift 2 || exit $$?; \
292 done
293 endef
294
295 define install-relative-aliases
296 while [ -n "$$1" ]; do \
297 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
298 rm -f $(DESTDIR)$$dir/$$2 && \
299 $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
300 shift 2 || exit $$?; \
301 done
302 endef
303
304 install-touch-usr-hook:
305 touch -c $(DESTDIR)/$(prefix)
306
307 INSTALL_EXEC_HOOKS += \
308 install-target-wants-hook \
309 install-directories-hook \
310 install-aliases-hook \
311 install-touch-usr-hook
312
313 # ------------------------------------------------------------------------------
314 AM_V_M4 = $(AM_V_M4_$(V))
315 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
316 AM_V_M4_0 = @echo " M4 " $@;
317
318 AM_V_XSLT = $(AM_V_XSLT_$(V))
319 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
320 AM_V_XSLT_0 = @echo " XSLT " $@;
321
322 AM_V_GPERF = $(AM_V_GPERF_$(V))
323 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
324 AM_V_GPERF_0 = @echo " GPERF " $@;
325
326 AM_V_LN = $(AM_V_LN_$(V))
327 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
328 AM_V_LN_0 = @echo " LN " $@;
329
330 AM_V_RM = $(AM_V_RM_$(V))
331 AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
332 AM_V_RM_0 = @echo " RM " $@;
333
334 # ------------------------------------------------------------------------------
335 rootbin_PROGRAMS = \
336 systemctl \
337 systemd-notify \
338 systemd-ask-password \
339 systemd-tty-ask-password-agent \
340 systemd-machine-id-setup
341
342 bin_PROGRAMS = \
343 systemd-cgls \
344 systemd-cgtop \
345 systemd-nspawn \
346 systemd-detect-virt \
347 systemd-delta \
348 systemd-analyze \
349 systemd-run \
350 systemd-path
351
352 dist_bin_SCRIPTS = \
353 src/kernel-install/kernel-install
354
355 dist_kernelinstall_SCRIPTS = \
356 src/kernel-install/50-depmod.install \
357 src/kernel-install/90-loaderentry.install
358
359 rootlibexec_PROGRAMS = \
360 systemd \
361 systemd-cgroups-agent \
362 systemd-initctl \
363 systemd-update-utmp \
364 systemd-shutdownd \
365 systemd-shutdown \
366 systemd-remount-fs \
367 systemd-reply-password \
368 systemd-fsck \
369 systemd-ac-power \
370 systemd-sysctl \
371 systemd-sleep \
372 systemd-bus-proxyd \
373 systemd-socket-proxyd \
374 systemd-update-done
375
376 systemgenerator_PROGRAMS = \
377 systemd-getty-generator \
378 systemd-fstab-generator \
379 systemd-system-update-generator \
380 systemd-debug-generator
381
382 dist_bashcompletion_DATA = \
383 shell-completion/bash/busctl \
384 shell-completion/bash/journalctl \
385 shell-completion/bash/systemctl \
386 shell-completion/bash/systemd-analyze \
387 shell-completion/bash/systemd-cat \
388 shell-completion/bash/systemd-cgls \
389 shell-completion/bash/systemd-cgtop \
390 shell-completion/bash/systemd-delta \
391 shell-completion/bash/systemd-detect-virt \
392 shell-completion/bash/systemd-nspawn \
393 shell-completion/bash/systemd-run \
394 shell-completion/bash/udevadm \
395 shell-completion/bash/kernel-install
396
397 dist_zshcompletion_DATA = \
398 shell-completion/zsh/_systemctl \
399 shell-completion/zsh/_journalctl \
400 shell-completion/zsh/_udevadm \
401 shell-completion/zsh/_kernel-install \
402 shell-completion/zsh/_systemd-nspawn \
403 shell-completion/zsh/_systemd-analyze \
404 shell-completion/zsh/_systemd-run \
405 shell-completion/zsh/_sd_hosts_or_user_at_host \
406 shell-completion/zsh/_systemd-delta \
407 shell-completion/zsh/_systemd
408
409 dist_sysctl_DATA = \
410 sysctl.d/50-default.conf
411
412 dist_systemunit_DATA = \
413 units/graphical.target \
414 units/multi-user.target \
415 units/emergency.service \
416 units/emergency.target \
417 units/sysinit.target \
418 units/basic.target \
419 units/getty.target \
420 units/halt.target \
421 units/kexec.target \
422 units/local-fs.target \
423 units/local-fs-pre.target \
424 units/initrd.target \
425 units/initrd-fs.target \
426 units/initrd-root-fs.target \
427 units/remote-fs.target \
428 units/remote-fs-pre.target \
429 units/network.target \
430 units/network-pre.target \
431 units/network-online.target \
432 units/nss-lookup.target \
433 units/nss-user-lookup.target \
434 units/hibernate.target \
435 units/hybrid-sleep.target \
436 units/poweroff.target \
437 units/reboot.target \
438 units/rescue.target \
439 units/rpcbind.target \
440 units/time-sync.target \
441 units/shutdown.target \
442 units/final.target \
443 units/umount.target \
444 units/sigpwr.target \
445 units/sleep.target \
446 units/sockets.target \
447 units/busnames.target \
448 units/timers.target \
449 units/paths.target \
450 units/suspend.target \
451 units/swap.target \
452 units/slices.target \
453 units/system.slice \
454 units/x-.slice \
455 units/systemd-initctl.socket \
456 units/systemd-shutdownd.socket \
457 units/syslog.socket \
458 units/dev-hugepages.mount \
459 units/dev-mqueue.mount \
460 units/sys-kernel-config.mount \
461 units/sys-kernel-debug.mount \
462 units/sys-fs-fuse-connections.mount \
463 units/tmp.mount \
464 units/printer.target \
465 units/sound.target \
466 units/bluetooth.target \
467 units/smartcard.target \
468 units/systemd-ask-password-wall.path \
469 units/systemd-ask-password-console.path \
470 units/systemd-udevd-control.socket \
471 units/systemd-udevd-kernel.socket \
472 units/system-update.target \
473 units/initrd-switch-root.target \
474 units/ldconfig.service
475
476 nodist_systemunit_DATA = \
477 units/getty@.service \
478 units/serial-getty@.service \
479 units/console-shell.service \
480 units/console-getty.service \
481 units/container-getty@.service \
482 units/systemd-initctl.service \
483 units/systemd-shutdownd.service \
484 units/systemd-remount-fs.service \
485 units/systemd-update-utmp.service \
486 units/systemd-update-utmp-runlevel.service \
487 units/systemd-ask-password-wall.service \
488 units/systemd-ask-password-console.service \
489 units/systemd-sysctl.service \
490 units/emergency.service \
491 units/rescue.service \
492 units/user@.service \
493 units/systemd-hibernate.service \
494 units/systemd-hybrid-sleep.service \
495 units/systemd-suspend.service \
496 units/systemd-halt.service \
497 units/systemd-poweroff.service \
498 units/systemd-reboot.service \
499 units/systemd-kexec.service \
500 units/systemd-fsck@.service \
501 units/systemd-fsck-root.service \
502 units/systemd-udevd.service \
503 units/systemd-udev-trigger.service \
504 units/systemd-udev-settle.service \
505 units/systemd-udev-hwdb-update.service \
506 units/debug-shell.service \
507 units/initrd-parse-etc.service \
508 units/initrd-cleanup.service \
509 units/initrd-udevadm-cleanup-db.service \
510 units/initrd-switch-root.service \
511 units/systemd-nspawn@.service \
512 units/systemd-update-done.service
513
514 dist_userunit_DATA = \
515 units/user/basic.target \
516 units/user/default.target \
517 units/user/exit.target
518
519 nodist_userunit_DATA = \
520 units/user/systemd-exit.service
521
522 dist_systempreset_DATA = \
523 system-preset/90-systemd.preset
524
525 EXTRA_DIST += \
526 units/getty@.service.m4 \
527 units/serial-getty@.service.m4 \
528 units/console-shell.service.m4.in \
529 units/console-getty.service.m4.in \
530 units/container-getty@.service.m4.in \
531 units/rescue.service.m4.in \
532 units/systemd-initctl.service.in \
533 units/systemd-shutdownd.service.in \
534 units/systemd-remount-fs.service.in \
535 units/systemd-update-utmp.service.in \
536 units/systemd-update-utmp-runlevel.service.in \
537 units/systemd-ask-password-wall.service.in \
538 units/systemd-ask-password-console.service.in \
539 units/systemd-sysctl.service.in \
540 units/emergency.service.in \
541 units/systemd-halt.service.in \
542 units/systemd-poweroff.service.in \
543 units/systemd-reboot.service.in \
544 units/systemd-kexec.service.in \
545 units/user/systemd-exit.service.in \
546 units/systemd-fsck@.service.in \
547 units/systemd-fsck-root.service.in \
548 units/user@.service.in \
549 units/debug-shell.service.in \
550 units/systemd-hibernate.service.in \
551 units/systemd-hybrid-sleep.service.in \
552 units/systemd-suspend.service.in \
553 units/quotaon.service.in \
554 units/initrd-parse-etc.service.in \
555 units/initrd-cleanup.service.in \
556 units/initrd-udevadm-cleanup-db.service.in \
557 units/initrd-switch-root.service.in \
558 units/systemd-nspawn@.service.in \
559 units/systemd-update-done.service.in
560
561 CLEANFILES += \
562 units/console-shell.service.m4 \
563 units/console-getty.service.m4 \
564 units/container-getty@.service.m4 \
565 units/rescue.service.m4 \
566 units/user@.service.m4
567
568 if HAVE_SYSV_COMPAT
569 nodist_systemunit_DATA += \
570 units/rc-local.service \
571 units/halt-local.service
572
573 systemgenerator_PROGRAMS += \
574 systemd-sysv-generator \
575 systemd-rc-local-generator
576 endif
577
578 EXTRA_DIST += \
579 units/rc-local.service.in \
580 units/halt-local.service.in
581
582 # automake is broken and can't handle files with a dash in front
583 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
584 units-install-hook:
585 mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
586
587 units-uninstall-hook:
588 rm -f $(DESTDIR)/$(systemunitdir)/-.slice
589
590 INSTALL_DATA_HOOKS += units-install-hook
591 UNINSTALL_DATA_HOOKS += units-uninstall-hook
592
593 dist_doc_DATA = \
594 README \
595 NEWS \
596 LICENSE.LGPL2.1 \
597 LICENSE.GPL2 \
598 LICENSE.MIT \
599 DISTRO_PORTING \
600 src/libsystemd/sd-bus/PORTING-DBUS1 \
601 src/libsystemd/sd-bus/DIFFERENCES \
602 src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
603
604 @INTLTOOL_POLICY_RULE@
605
606 # ------------------------------------------------------------------------------
607
608 MANPAGES =
609 MANPAGES_ALIAS =
610
611 include Makefile-man.am
612
613 .PHONY: man update-man-list
614 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
615
616 XML_FILES = \
617 ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
618 HTML_FILES = \
619 ${XML_FILES:.xml=.html}
620 HTML_ALIAS = \
621 ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
622
623 if ENABLE_MANPAGES
624 man_MANS = \
625 $(MANPAGES) \
626 $(MANPAGES_ALIAS)
627
628 noinst_DATA += \
629 $(HTML_FILES) \
630 $(HTML_ALIAS)
631
632 CLEANFILES += \
633 $(man_MANS) \
634 $(HTML_FILES) \
635 $(HTML_ALIAS)
636
637 docs/html/man:
638 $(AM_V_at)$(MKDIR_P) $(dir $@)
639 $(AM_V_LN)$(LN_S) -f ../../man $@
640
641 noinst_DATA += \
642 docs/html/man
643
644 CLEANFILES += \
645 docs/html/man
646
647 if HAVE_PYTHON
648 man/index.html: man/systemd.index.html
649 $(AM_V_LN)$(LN_S) -f systemd.index.html $@
650
651 noinst_DATA += \
652 man/index.html
653
654 CLEANFILES += \
655 man/index.html
656
657 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
658 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
659 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
660
661 update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB)
662 $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
663 $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
664 @echo "Makefile-man.am has been regenerated"
665
666 man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
667 $(AM_V_at)$(MKDIR_P) $(dir $@)
668 $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
669
670 man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE_XML_FILES)
671 $(AM_V_at)$(MKDIR_P) $(dir $@)
672 $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
673
674 EXTRA_DIST += \
675 man/systemd.index.xml \
676 man/index.html \
677 man/systemd.directives.xml
678
679 CLEANFILES += \
680 man/systemd.index.xml \
681 man/systemd.directives.xml
682
683 endif
684
685 endif
686
687 EXTRA_DIST += \
688 $(XML_FILES) \
689 $(HTML_FILES) \
690 $(HTML_ALIAS) \
691 $(man_MANS) \
692 tools/make-man-index.py \
693 tools/make-directive-index.py \
694 tools/make-man-rules.py \
695 tools/xml_helper.py
696
697 # ------------------------------------------------------------------------------
698 noinst_LTLIBRARIES += \
699 libsystemd-shared.la
700
701 libsystemd_shared_la_SOURCES = \
702 src/shared/linux/auto_dev-ioctl.h \
703 src/shared/linux/fanotify.h \
704 src/shared/ioprio.h \
705 src/shared/missing.h \
706 src/shared/initreq.h \
707 src/shared/securebits.h \
708 src/shared/special.h \
709 src/shared/list.h \
710 src/shared/macro.h \
711 src/shared/def.h \
712 src/shared/sparse-endian.h \
713 src/shared/refcnt.h \
714 src/shared/udev-util.h \
715 src/shared/bus-errors.h \
716 src/shared/device-nodes.c \
717 src/shared/device-nodes.h \
718 src/shared/util.c \
719 src/shared/util.h \
720 src/shared/virt.c \
721 src/shared/virt.h \
722 src/shared/architecture.c \
723 src/shared/architecture.h \
724 src/shared/efivars.c \
725 src/shared/efivars.h \
726 src/shared/path-util.c \
727 src/shared/path-util.h \
728 src/shared/time-util.c \
729 src/shared/time-util.h \
730 src/shared/hashmap.c \
731 src/shared/hashmap.h \
732 src/shared/siphash24.c \
733 src/shared/siphash24.h \
734 src/shared/set.c \
735 src/shared/set.h \
736 src/shared/fdset.c \
737 src/shared/fdset.h \
738 src/shared/prioq.c \
739 src/shared/prioq.h \
740 src/shared/sleep-config.c \
741 src/shared/sleep-config.h \
742 src/shared/strv.c \
743 src/shared/strv.h \
744 src/shared/env-util.c \
745 src/shared/env-util.h \
746 src/shared/strbuf.c \
747 src/shared/strbuf.h \
748 src/shared/strxcpyx.c \
749 src/shared/strxcpyx.h \
750 src/shared/conf-parser.c \
751 src/shared/conf-parser.h \
752 src/shared/log.c \
753 src/shared/log.h \
754 src/shared/ratelimit.h \
755 src/shared/ratelimit.c \
756 src/shared/exit-status.c \
757 src/shared/exit-status.h \
758 src/shared/utf8.c \
759 src/shared/utf8.h \
760 src/shared/gunicode.c \
761 src/shared/gunicode.h \
762 src/shared/pager.c \
763 src/shared/pager.h \
764 src/shared/socket-util.c \
765 src/shared/socket-util.h \
766 src/shared/conf-files.c \
767 src/shared/conf-files.h \
768 src/shared/cgroup-util.c \
769 src/shared/cgroup-util.h \
770 src/shared/cgroup-show.c \
771 src/shared/cgroup-show.h \
772 src/shared/unit-name.c \
773 src/shared/unit-name.h \
774 src/shared/utmp-wtmp.c \
775 src/shared/utmp-wtmp.h \
776 src/shared/watchdog.c \
777 src/shared/watchdog.h \
778 src/shared/spawn-ask-password-agent.c \
779 src/shared/spawn-ask-password-agent.h \
780 src/shared/replace-var.c \
781 src/shared/replace-var.h \
782 src/shared/spawn-polkit-agent.c \
783 src/shared/spawn-polkit-agent.h \
784 src/shared/clock-util.c \
785 src/shared/clock-util.h \
786 src/shared/time-dst.c \
787 src/shared/time-dst.h \
788 src/shared/calendarspec.c \
789 src/shared/calendarspec.h \
790 src/shared/fileio.c \
791 src/shared/fileio.h \
792 src/shared/output-mode.h \
793 src/shared/MurmurHash2.c \
794 src/shared/MurmurHash2.h \
795 src/shared/acpi-fpdt.h \
796 src/shared/acpi-fpdt.c \
797 src/shared/boot-timestamps.h \
798 src/shared/boot-timestamps.c \
799 src/shared/mkdir.c \
800 src/shared/mkdir.h \
801 src/shared/smack-util.c \
802 src/shared/smack-util.h \
803 src/shared/apparmor-util.c \
804 src/shared/apparmor-util.h \
805 src/shared/ima-util.c \
806 src/shared/ima-util.h \
807 src/shared/ptyfwd.c \
808 src/shared/ptyfwd.h \
809 src/shared/errno-list.c \
810 src/shared/errno-list.h \
811 src/shared/af-list.c \
812 src/shared/af-list.h \
813 src/shared/audit.c \
814 src/shared/audit.h \
815 src/shared/xml.c \
816 src/shared/xml.h \
817 src/shared/condition-util.c \
818 src/shared/condition-util.h \
819 src/shared/bus-label.c \
820 src/shared/bus-label.h \
821 src/shared/gpt.h \
822 src/shared/clean-ipc.h \
823 src/shared/clean-ipc.c \
824 src/shared/login-shared.c \
825 src/shared/login-shared.h \
826 src/shared/ring.c \
827 src/shared/ring.h \
828 src/shared/async.c \
829 src/shared/async.h \
830 src/shared/eventfd-util.c \
831 src/shared/eventfd-util.h \
832 src/shared/copy.c \
833 src/shared/copy.h \
834 src/shared/base-filesystem.c \
835 src/shared/base-filesystem.h
836
837 nodist_libsystemd_shared_la_SOURCES = \
838 src/shared/errno-from-name.h \
839 src/shared/errno-to-name.h \
840 src/shared/af-from-name.h \
841 src/shared/af-to-name.h
842
843 libsystemd_shared_la_CFLAGS = \
844 $(AM_CFLAGS) \
845 $(SECCOMP_CFLAGS) \
846 -pthread
847
848 # ------------------------------------------------------------------------------
849 noinst_LTLIBRARIES += \
850 libsystemd-units.la
851
852 libsystemd_units_la_SOURCES = \
853 src/shared/install.c \
854 src/shared/install.h \
855 src/shared/install-printf.c \
856 src/shared/install-printf.h \
857 src/shared/path-lookup.c \
858 src/shared/path-lookup.h \
859 src/shared/specifier.c \
860 src/shared/specifier.h
861
862 # ------------------------------------------------------------------------------
863 noinst_LTLIBRARIES += \
864 libsystemd-label.la
865
866 libsystemd_label_la_SOURCES = \
867 src/shared/socket-label.c \
868 src/shared/label.c \
869 src/shared/label.h \
870 src/shared/selinux-util.c \
871 src/shared/selinux-util.h \
872 src/shared/mkdir-label.c \
873 src/shared/ask-password-api.c \
874 src/shared/ask-password-api.h \
875 src/shared/fileio-label.c \
876 src/shared/fileio-label.h \
877 src/shared/dev-setup.c \
878 src/shared/dev-setup.h \
879 src/shared/dropin.c \
880 src/shared/dropin.h \
881 src/shared/generator.h \
882 src/shared/generator.c
883
884 libsystemd_label_la_CFLAGS = \
885 $(AM_CFLAGS) \
886 $(SELINUX_CFLAGS)
887
888 libsystemd_label_la_LIBADD = \
889 $(SELINUX_LIBS)
890
891 # ------------------------------------------------------------------------------
892
893 if HAVE_SECCOMP
894 noinst_LTLIBRARIES += \
895 libsystemd-seccomp.la
896
897 libsystemd_seccomp_la_SOURCES = \
898 src/shared/seccomp-util.h \
899 src/shared/seccomp-util.c
900
901 libsystemd_seccomp_la_CFLAGS = \
902 $(AM_CFLAGS) \
903 $(SECCOMP_CFLAGS)
904
905 libsystemd_seccomp_la_LIBADD = \
906 $(SECCOMP_LIBS)
907 endif
908
909 # ------------------------------------------------------------------------------
910 noinst_LTLIBRARIES += \
911 libsystemd-logs.la
912
913 libsystemd_logs_la_SOURCES = \
914 src/shared/logs-show.c \
915 src/shared/logs-show.h
916
917 # ------------------------------------------------------------------------------
918 noinst_LTLIBRARIES += \
919 libsystemd-capability.la
920
921 libsystemd_capability_la_SOURCES = \
922 src/shared/capability.c \
923 src/shared/capability.h
924
925 libsystemd_capability_la_CFLAGS = \
926 $(AM_CFLAGS) \
927 $(CAP_CFLAGS)
928
929 libsystemd_capability_la_LIBADD = \
930 $(CAP_LIBS)
931
932 # ------------------------------------------------------------------------------
933 if HAVE_ACL
934 noinst_LTLIBRARIES += \
935 libsystemd-acl.la
936
937 libsystemd_acl_la_SOURCES = \
938 src/shared/acl-util.c \
939 src/shared/acl-util.h
940
941 libsystemd_acl_la_CFLAGS = \
942 $(AM_CFLAGS) \
943 $(ACL_CFLAGS)
944
945 libsystemd_acl_la_LIBADD = \
946 $(ACL_LIBS)
947 endif
948
949 # ------------------------------------------------------------------------------
950 noinst_LTLIBRARIES += \
951 libsystemd-core.la
952
953 libsystemd_core_la_SOURCES = \
954 src/core/unit.c \
955 src/core/unit.h \
956 src/core/unit-printf.c \
957 src/core/unit-printf.h \
958 src/core/job.c \
959 src/core/job.h \
960 src/core/manager.c \
961 src/core/manager.h \
962 src/core/transaction.c \
963 src/core/transaction.h \
964 src/core/load-fragment.c \
965 src/core/load-fragment.h \
966 src/core/service.c \
967 src/core/service.h \
968 src/core/socket.c \
969 src/core/socket.h \
970 src/core/busname.c \
971 src/core/busname.h \
972 src/core/target.c \
973 src/core/target.h \
974 src/core/snapshot.c \
975 src/core/snapshot.h \
976 src/core/device.c \
977 src/core/device.h \
978 src/core/mount.c \
979 src/core/mount.h \
980 src/core/automount.c \
981 src/core/automount.h \
982 src/core/swap.c \
983 src/core/swap.h \
984 src/core/timer.c \
985 src/core/timer.h \
986 src/core/path.c \
987 src/core/path.h \
988 src/core/slice.c \
989 src/core/slice.h \
990 src/core/scope.c \
991 src/core/scope.h \
992 src/core/load-dropin.c \
993 src/core/load-dropin.h \
994 src/core/execute.c \
995 src/core/execute.h \
996 src/core/kill.c \
997 src/core/kill.h \
998 src/core/dbus.c \
999 src/core/dbus.h \
1000 src/core/dbus-manager.c \
1001 src/core/dbus-manager.h \
1002 src/core/dbus-unit.c \
1003 src/core/dbus-unit.h \
1004 src/core/dbus-job.c \
1005 src/core/dbus-job.h \
1006 src/core/dbus-service.c \
1007 src/core/dbus-service.h \
1008 src/core/dbus-socket.c \
1009 src/core/dbus-socket.h \
1010 src/core/dbus-busname.c \
1011 src/core/dbus-busname.h \
1012 src/core/dbus-target.c \
1013 src/core/dbus-target.h \
1014 src/core/dbus-snapshot.c \
1015 src/core/dbus-snapshot.h \
1016 src/core/dbus-device.c \
1017 src/core/dbus-device.h \
1018 src/core/dbus-mount.c \
1019 src/core/dbus-mount.h \
1020 src/core/dbus-automount.c \
1021 src/core/dbus-automount.h \
1022 src/core/dbus-swap.c \
1023 src/core/dbus-swap.h \
1024 src/core/dbus-timer.c \
1025 src/core/dbus-timer.h \
1026 src/core/dbus-path.c \
1027 src/core/dbus-path.h \
1028 src/core/dbus-slice.c \
1029 src/core/dbus-slice.h \
1030 src/core/dbus-scope.c \
1031 src/core/dbus-scope.h \
1032 src/core/dbus-execute.c \
1033 src/core/dbus-execute.h \
1034 src/core/dbus-kill.c \
1035 src/core/dbus-kill.h \
1036 src/core/dbus-cgroup.c \
1037 src/core/dbus-cgroup.h \
1038 src/core/cgroup.c \
1039 src/core/cgroup.h \
1040 src/core/selinux-access.c \
1041 src/core/selinux-access.h \
1042 src/core/selinux-setup.c \
1043 src/core/selinux-setup.h \
1044 src/core/smack-setup.c \
1045 src/core/smack-setup.h \
1046 src/core/ima-setup.c \
1047 src/core/ima-setup.h \
1048 src/core/locale-setup.h \
1049 src/core/locale-setup.c \
1050 src/core/hostname-setup.c \
1051 src/core/hostname-setup.h \
1052 src/core/machine-id-setup.c \
1053 src/core/machine-id-setup.h \
1054 src/core/mount-setup.c \
1055 src/core/mount-setup.h \
1056 src/core/loopback-setup.h \
1057 src/core/loopback-setup.c \
1058 src/core/condition.c \
1059 src/core/condition.h \
1060 src/core/namespace.c \
1061 src/core/namespace.h \
1062 src/core/build.h \
1063 src/core/sysfs-show.h \
1064 src/core/switch-root.h \
1065 src/core/switch-root.c \
1066 src/core/killall.h \
1067 src/core/killall.c \
1068 src/core/audit-fd.c \
1069 src/core/audit-fd.h \
1070 src/core/show-status.c \
1071 src/core/show-status.h
1072
1073 if HAVE_KMOD
1074 libsystemd_core_la_SOURCES += \
1075 src/core/kmod-setup.c \
1076 src/core/kmod-setup.h
1077 endif
1078
1079 nodist_libsystemd_core_la_SOURCES = \
1080 src/core/load-fragment-gperf.c \
1081 src/core/load-fragment-gperf-nulstr.c
1082
1083 libsystemd_core_la_CFLAGS = \
1084 $(AM_CFLAGS) \
1085 $(PAM_CFLAGS) \
1086 $(AUDIT_CFLAGS) \
1087 $(CAP_CFLAGS) \
1088 $(KMOD_CFLAGS) \
1089 $(APPARMOR_CFLAGS) \
1090 $(SECCOMP_CFLAGS) \
1091 -pthread
1092
1093 libsystemd_core_la_LIBADD = \
1094 libsystemd-capability.la \
1095 libsystemd-units.la \
1096 libsystemd-label.la \
1097 libudev-internal.la \
1098 libsystemd-shared.la \
1099 libsystemd-internal.la \
1100 $(PAM_LIBS) \
1101 $(AUDIT_LIBS) \
1102 $(CAP_LIBS) \
1103 $(KMOD_LIBS) \
1104 $(APPARMOR_LIBS) \
1105 $(SECCOMP_LIBS)
1106
1107 if HAVE_SECCOMP
1108 libsystemd_core_la_LIBADD += \
1109 libsystemd-seccomp.la
1110 endif
1111
1112 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1113 $(AM_V_at)$(MKDIR_P) $(dir $@)
1114 $(AM_V_GEN)$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@
1115
1116 EXTRA_DIST += \
1117 src/core/load-fragment-gperf.gperf.m4
1118
1119 CLEANFILES += \
1120 src/core/load-fragment-gperf.gperf \
1121 src/core/load-fragment-gperf.c \
1122 src/core/load-fragment-gperf-nulstr.c \
1123 src/shared/errno-list.txt \
1124 src/shared/errno-from-name.gperf \
1125 src/shared/af-list.txt \
1126 src/shared/af-from-name.gperf
1127
1128 BUILT_SOURCES += \
1129 src/shared/errno-from-name.h \
1130 src/shared/errno-to-name.h \
1131 src/shared/af-from-name.h \
1132 src/shared/af-to-name.h
1133
1134 src/shared/errno-list.txt:
1135 $(AM_V_at)$(MKDIR_P) $(dir $@)
1136 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' > $@
1137
1138 src/shared/errno-from-name.gperf: src/shared/errno-list.txt
1139 $(AM_V_at)$(MKDIR_P) $(dir $@)
1140 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct errno_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
1141
1142 src/shared/errno-from-name.h: src/shared/errno-from-name.gperf
1143 $(AM_V_at)$(MKDIR_P) $(dir $@)
1144 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_errno -H hash_errno_name -p -C < $< > $@
1145
1146 src/shared/errno-to-name.h: src/shared/errno-list.txt
1147 $(AM_V_at)$(MKDIR_P) $(dir $@)
1148 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1149
1150 src/shared/af-list.txt:
1151 $(AM_V_at)$(MKDIR_P) $(dir $@)
1152 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/socket.h - < /dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }' > $@
1153
1154 src/shared/af-from-name.gperf: src/shared/af-list.txt
1155 $(AM_V_at)$(MKDIR_P) $(dir $@)
1156 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct af_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
1157
1158 src/shared/af-from-name.h: src/shared/af-from-name.gperf
1159 $(AM_V_at)$(MKDIR_P) $(dir $@)
1160 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_af -H hash_af_name -p -C < $< > $@
1161
1162 src/shared/af-to-name.h: src/shared/af-list.txt
1163 $(AM_V_at)$(MKDIR_P) $(dir $@)
1164 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1165
1166 # ------------------------------------------------------------------------------
1167 systemd_SOURCES = \
1168 src/core/main.c
1169
1170 systemd_CFLAGS = \
1171 $(AM_CFLAGS) \
1172 $(SECCOMP_CFLAGS)
1173
1174 systemd_LDADD = \
1175 libsystemd-core.la \
1176 $(RT_LIBS)
1177
1178 dist_pkgsysconf_DATA += \
1179 src/core/system.conf \
1180 src/core/user.conf
1181
1182 dist_dbuspolicy_DATA += \
1183 src/core/org.freedesktop.systemd1.conf
1184
1185 dist_dbussystemservice_DATA += \
1186 src/core/org.freedesktop.systemd1.service
1187
1188 polkitpolicy_in_in_files += \
1189 src/core/org.freedesktop.systemd1.policy.in.in
1190
1191 pkgconfigdata_DATA = \
1192 src/core/systemd.pc
1193
1194 nodist_rpmmacros_DATA = \
1195 src/core/macros.systemd
1196
1197 EXTRA_DIST += \
1198 src/core/systemd.pc.in \
1199 src/core/macros.systemd.in
1200
1201 CLEANFILES += \
1202 src/core/macros.systemd \
1203 src/core/org.freedesktop.systemd1.policy.in
1204
1205 # ------------------------------------------------------------------------------
1206 manual_tests += \
1207 test-engine \
1208 test-ns \
1209 test-loopback \
1210 test-hostname \
1211 test-daemon \
1212 test-cgroup \
1213 test-cgroup-mask \
1214 test-install \
1215 test-watchdog \
1216 test-log \
1217 test-ipcrm
1218
1219 if HAVE_KMOD
1220 manual_tests += \
1221 test-rtnl-manual
1222 endif
1223
1224 tests += \
1225 test-job-type \
1226 test-env-replace \
1227 test-strbuf \
1228 test-strv \
1229 test-path-util \
1230 test-strxcpyx \
1231 test-unit-name \
1232 test-unit-file \
1233 test-utf8 \
1234 test-ellipsize \
1235 test-util \
1236 test-ring \
1237 test-tmpfiles \
1238 test-namespace \
1239 test-date \
1240 test-sleep \
1241 test-replace-var \
1242 test-sched-prio \
1243 test-calendarspec \
1244 test-strip-tab-ansi \
1245 test-cgroup-util \
1246 test-prioq \
1247 test-fileio \
1248 test-time \
1249 test-hashmap \
1250 test-list \
1251 test-tables \
1252 test-device-nodes \
1253 test-xml \
1254 test-architecture \
1255 test-socket-util \
1256 test-fdset \
1257 test-conf-files \
1258 test-capability \
1259 test-async \
1260 test-ratelimit
1261
1262 EXTRA_DIST += \
1263 test/sched_idle_bad.service \
1264 test/sched_idle_ok.service \
1265 test/sched_rr_bad.service \
1266 test/sched_rr_ok.service \
1267 test/sched_rr_change.service \
1268 test/son.service \
1269 test/daughter.service \
1270 test/parent.slice
1271
1272 EXTRA_DIST += \
1273 src/test/test-helper.h
1274
1275 test_device_nodes_SOURCES = \
1276 src/test/test-device-nodes.c
1277
1278 test_device_nodes_LDADD = \
1279 libsystemd-shared.la
1280
1281 test_engine_SOURCES = \
1282 src/test/test-engine.c
1283
1284 test_engine_CFLAGS = \
1285 $(AM_CFLAGS) \
1286 $(SECCOMP_CFLAGS)
1287
1288 test_engine_LDADD = \
1289 libsystemd-core.la \
1290 $(RT_LIBS)
1291
1292 test_job_type_SOURCES = \
1293 src/test/test-job-type.c
1294
1295 test_job_type_CFLAGS = \
1296 $(AM_CFLAGS) \
1297 $(SECCOMP_CFLAGS)
1298
1299 test_job_type_LDADD = \
1300 libsystemd-core.la \
1301 $(RT_LIBS)
1302
1303 test_ns_SOURCES = \
1304 src/test/test-ns.c
1305
1306 test_ns_CFLAGS = \
1307 $(AM_CFLAGS) \
1308 $(SECCOMP_CFLAGS)
1309
1310 test_ns_LDADD = \
1311 libsystemd-core.la
1312
1313 test_loopback_SOURCES = \
1314 src/test/test-loopback.c
1315
1316 test_loopback_LDADD = \
1317 libsystemd-core.la
1318
1319 test_hostname_SOURCES = \
1320 src/test/test-hostname.c
1321
1322 test_hostname_LDADD = \
1323 libsystemd-core.la
1324
1325 if ENABLE_EFI
1326 manual_tests += \
1327 test-boot-timestamp
1328
1329 test_boot_timestamp_SOURCES = \
1330 src/test/test-boot-timestamps.c
1331
1332 test_boot_timestamp_LDADD = \
1333 libsystemd-shared.la
1334 endif
1335
1336 test_unit_name_SOURCES = \
1337 src/test/test-unit-name.c
1338
1339 test_unit_name_CFLAGS = \
1340 $(AM_CFLAGS) \
1341 $(SECCOMP_CFLAGS)
1342
1343 test_unit_name_LDADD = \
1344 libsystemd-core.la \
1345 $(RT_LIBS)
1346
1347 test_unit_file_SOURCES = \
1348 src/test/test-unit-file.c
1349
1350 test_unit_file_CFLAGS = \
1351 $(AM_CFLAGS) \
1352 $(SECCOMP_CFLAGS)
1353
1354 test_unit_file_LDADD = \
1355 libsystemd-core.la \
1356 $(RT_LIBS)
1357
1358 test_utf8_SOURCES = \
1359 src/test/test-utf8.c
1360
1361 test_utf8_LDADD = \
1362 libsystemd-shared.la
1363
1364 test_capability_SOURCES = \
1365 src/test/test-capability.c
1366
1367 test_capability_LDADD = \
1368 libsystemd-shared.la \
1369 libsystemd-capability.la
1370
1371 test_async_SOURCES = \
1372 src/test/test-async.c
1373
1374 test_async_LDADD = \
1375 libsystemd-shared.la
1376
1377 test_fdset_SOURCES = \
1378 src/test/test-fdset.c
1379
1380 test_fdset_LDADD = \
1381 libsystemd-core.la
1382
1383 test_ratelimit_SOURCES = \
1384 src/test/test-ratelimit.c
1385
1386 test_ratelimit_LDADD = \
1387 libsystemd-shared.la
1388
1389 test_util_SOURCES = \
1390 src/test/test-util.c
1391
1392 test_util_LDADD = \
1393 libsystemd-core.la
1394
1395 test_socket_util_SOURCES = \
1396 src/test/test-socket-util.c
1397
1398 test_socket_util_LDADD = \
1399 libsystemd-core.la
1400
1401 test_ring_SOURCES = \
1402 src/test/test-ring.c
1403
1404 test_ring_LDADD = \
1405 libsystemd-core.la
1406
1407 test_tmpfiles_SOURCES = \
1408 src/test/test-tmpfiles.c
1409
1410 test_tmpfiles_LDADD = \
1411 libsystemd-shared.la
1412
1413 test_namespace_SOURCES = \
1414 src/test/test-namespace.c
1415
1416 test_namespace_LDADD = \
1417 libsystemd-core.la
1418
1419 test_hashmap_SOURCES = \
1420 src/test/test-hashmap.c
1421
1422 test_hashmap_LDADD = \
1423 libsystemd-core.la
1424
1425 test_xml_SOURCES = \
1426 src/test/test-xml.c
1427
1428 test_xml_LDADD = \
1429 libsystemd-shared.la
1430
1431 test_list_SOURCES = \
1432 src/test/test-list.c
1433
1434 test_list_LDADD = \
1435 libsystemd-core.la
1436
1437 test_tables_SOURCES = \
1438 src/test/test-tables.c \
1439 src/shared/test-tables.h
1440
1441 test_tables_CFLAGS = \
1442 $(AM_CFLAGS) \
1443 $(SECCOMP_CFLAGS)
1444
1445 test_tables_LDADD = \
1446 libsystemd-logs.la \
1447 libsystemd-journal-internal.la \
1448 libsystemd-core.la \
1449 $(RT_LIBS)
1450
1451 test_prioq_SOURCES = \
1452 src/test/test-prioq.c
1453
1454 test_prioq_LDADD = \
1455 libsystemd-core.la
1456
1457 test_fileio_SOURCES = \
1458 src/test/test-fileio.c
1459
1460 test_fileio_LDADD = \
1461 libsystemd-core.la
1462
1463 test_time_SOURCES = \
1464 src/test/test-time.c
1465
1466 test_time_LDADD = \
1467 libsystemd-core.la
1468
1469 test_architecture_SOURCES = \
1470 src/test/test-architecture.c
1471
1472 test_architecture_LDADD = \
1473 libsystemd-shared.la
1474
1475 test_log_SOURCES = \
1476 src/test/test-log.c
1477
1478 test_log_LDADD = \
1479 libsystemd-core.la
1480
1481 test_ipcrm_SOURCES = \
1482 src/test/test-ipcrm.c
1483
1484 test_ipcrm_LDADD = \
1485 libsystemd-shared.la \
1486 -lrt
1487
1488 test_rtnl_manual_SOURCES = \
1489 src/test/test-rtnl-manual.c
1490
1491 test_rtnl_manual_CFLAGS = \
1492 $(AM_CFLAGS) \
1493 $(KMOD_CFLAGS)
1494
1495 test_rtnl_manual_LDADD = \
1496 libsystemd-internal.la \
1497 libsystemd-shared.la \
1498 $(KMOD_LIBS)
1499
1500 test_ellipsize_SOURCES = \
1501 src/test/test-ellipsize.c
1502
1503 test_ellipsize_LDADD = \
1504 libsystemd-core.la
1505
1506 test_date_SOURCES = \
1507 src/test/test-date.c
1508
1509 test_date_LDADD = \
1510 libsystemd-core.la
1511
1512 test_sleep_SOURCES = \
1513 src/test/test-sleep.c
1514
1515 test_sleep_LDADD = \
1516 libsystemd-core.la
1517
1518 test_replace_var_SOURCES = \
1519 src/test/test-replace-var.c
1520
1521 test_replace_var_LDADD = \
1522 libsystemd-shared.la
1523
1524 test_calendarspec_SOURCES = \
1525 src/test/test-calendarspec.c
1526
1527 test_calendarspec_LDADD = \
1528 libsystemd-shared.la
1529
1530 test_strip_tab_ansi_SOURCES = \
1531 src/test/test-strip-tab-ansi.c
1532
1533 test_strip_tab_ansi_LDADD = \
1534 libsystemd-shared.la
1535
1536 test_daemon_SOURCES = \
1537 src/test/test-daemon.c
1538
1539 test_daemon_LDADD = \
1540 libsystemd-internal.la \
1541 libsystemd-shared.la
1542
1543 test_cgroup_SOURCES = \
1544 src/test/test-cgroup.c
1545
1546 test_cgroup_LDADD = \
1547 libsystemd-label.la \
1548 libsystemd-shared.la \
1549 libsystemd-internal.la
1550
1551 test_cgroup_mask_SOURCES = \
1552 src/test/test-cgroup-mask.c
1553
1554 test_cgroup_mask_CPPFLAGS = \
1555 $(AM_CPPFLAGS) \
1556 -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1557
1558 test_cgroup_mask_CFLAGS = \
1559 $(AM_CFLAGS) \
1560 $(SECCOMP_CFLAGS)
1561
1562 test_cgroup_mask_LDADD = \
1563 libsystemd-core.la \
1564 $(RT_LIBS)
1565
1566 test_cgroup_util_SOURCES = \
1567 src/test/test-cgroup-util.c
1568
1569 test_cgroup_util_LDADD = \
1570 libsystemd-label.la \
1571 libsystemd-internal.la \
1572 libsystemd-shared.la
1573
1574 test_env_replace_SOURCES = \
1575 src/test/test-env-replace.c
1576
1577 test_env_replace_LDADD = \
1578 libsystemd-shared.la
1579
1580 test_strbuf_SOURCES = \
1581 src/test/test-strbuf.c
1582
1583 test_strbuf_LDADD = \
1584 libsystemd-shared.la
1585
1586 test_strv_SOURCES = \
1587 src/test/test-strv.c
1588
1589 test_strv_LDADD = \
1590 libsystemd-units.la \
1591 libsystemd-internal.la \
1592 libsystemd-shared.la
1593
1594 test_path_util_SOURCES = \
1595 src/test/test-path-util.c
1596
1597 test_path_util_LDADD = \
1598 libsystemd-shared.la
1599
1600 test_strxcpyx_SOURCES = \
1601 src/test/test-strxcpyx.c
1602
1603 test_strxcpyx_LDADD = \
1604 libsystemd-shared.la
1605
1606 test_install_SOURCES = \
1607 src/test/test-install.c
1608
1609 test_install_LDADD = \
1610 libsystemd-units.la \
1611 libsystemd-label.la \
1612 libsystemd-shared.la \
1613 libsystemd-internal.la
1614
1615 test_watchdog_SOURCES = \
1616 src/test/test-watchdog.c
1617
1618 test_watchdog_LDADD = \
1619 libsystemd-shared.la
1620
1621 test_sched_prio_SOURCES = \
1622 src/test/test-sched-prio.c
1623
1624 test_sched_prio_CPPFLAGS = \
1625 $(AM_CPPFLAGS) \
1626 -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1627
1628 test_sched_prio_CFLAGS = \
1629 $(AM_CFLAGS) \
1630 $(SECCOMP_CFLAGS)
1631
1632 test_sched_prio_LDADD = \
1633 libsystemd-core.la \
1634 $(RT_LIBS)
1635
1636 test_conf_files_SOURCES = \
1637 src/test/test-conf-files.c
1638
1639 test_conf_files_LDADD = \
1640 libsystemd-shared.la
1641
1642 # ------------------------------------------------------------------------------
1643 ## .PHONY so it always rebuilds it
1644 .PHONY: coverage lcov-run lcov-report coverage-sync
1645
1646 # run lcov from scratch, always
1647 coverage: all
1648 $(MAKE) lcov-run
1649 $(MAKE) lcov-report
1650
1651 coverage_dir = coverage
1652 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
1653
1654 if ENABLE_COVERAGE
1655 # reset run coverage tests
1656 lcov-run:
1657 @rm -rf $(coverage_dir)
1658 lcov $(coverage_opts) --zerocounters
1659 -$(MAKE) check
1660
1661 # generate report based on current coverage data
1662 lcov-report:
1663 $(MKDIR_P) $(coverage_dir)
1664 lcov $(coverage_opts) --compat-libtool --capture --no-external \
1665 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
1666 genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov.info
1667 @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
1668
1669 # lcov doesn't work properly with vpath builds, make sure that bad
1670 # output is not uploaded by mistake.
1671 coverage-sync: coverage
1672 test "$(builddir)" = "$(srcdir)"
1673 rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
1674
1675 else
1676 lcov-run lcov-report:
1677 echo "Need to reconfigure with --enable-coverage"
1678 endif
1679
1680 # ------------------------------------------------------------------------------
1681 systemd_analyze_SOURCES = \
1682 src/analyze/analyze.c
1683
1684 systemd_analyze_LDADD = \
1685 libsystemd-internal.la \
1686 libsystemd-shared.la
1687
1688 # ------------------------------------------------------------------------------
1689 systemd_initctl_SOURCES = \
1690 src/initctl/initctl.c
1691
1692 systemd_initctl_LDADD = \
1693 libsystemd-internal.la \
1694 libsystemd-shared.la
1695
1696 # ------------------------------------------------------------------------------
1697 systemd_update_utmp_SOURCES = \
1698 src/update-utmp/update-utmp.c
1699
1700 systemd_update_utmp_CFLAGS = \
1701 $(AM_CFLAGS) \
1702 $(AUDIT_CFLAGS)
1703
1704 systemd_update_utmp_LDADD = \
1705 libsystemd-internal.la \
1706 libsystemd-shared.la \
1707 $(AUDIT_LIBS)
1708
1709 # ------------------------------------------------------------------------------
1710 systemd_update_done_SOURCES = \
1711 src/update-done/update-done.c
1712
1713 systemd_update_done_LDADD = \
1714 libsystemd-internal.la \
1715 libsystemd-shared.la
1716
1717 # ------------------------------------------------------------------------------
1718 systemd_shutdownd_SOURCES = \
1719 src/shutdownd/shutdownd.c
1720
1721 systemd_shutdownd_LDADD = \
1722 libsystemd-label.la \
1723 libsystemd-internal.la \
1724 libsystemd-shared.la
1725
1726 dist_doc_DATA += \
1727 src/systemd/sd-shutdown.h
1728
1729 # ------------------------------------------------------------------------------
1730 systemd_shutdown_SOURCES = \
1731 src/core/umount.c \
1732 src/core/umount.h \
1733 src/core/shutdown.c \
1734 src/core/mount-setup.c \
1735 src/core/mount-setup.h \
1736 src/core/killall.h \
1737 src/core/killall.c
1738
1739 systemd_shutdown_LDADD = \
1740 libsystemd-label.la \
1741 libudev-internal.la \
1742 libsystemd-shared.la
1743
1744 # ------------------------------------------------------------------------------
1745 if HAVE_KMOD
1746 systemd_modules_load_SOURCES = \
1747 src/modules-load/modules-load.c
1748
1749 systemd_modules_load_CFLAGS = \
1750 $(AM_CFLAGS) \
1751 $(KMOD_CFLAGS)
1752
1753 systemd_modules_load_LDADD = \
1754 libsystemd-shared.la \
1755 $(KMOD_LIBS)
1756
1757 rootlibexec_PROGRAMS += \
1758 systemd-modules-load
1759
1760 nodist_systemunit_DATA += \
1761 units/systemd-modules-load.service
1762
1763 SYSINIT_TARGET_WANTS += \
1764 systemd-modules-load.service
1765
1766 if ENABLE_TMPFILES
1767 nodist_systemunit_DATA += \
1768 units/kmod-static-nodes.service
1769
1770 SYSINIT_TARGET_WANTS += \
1771 kmod-static-nodes.service
1772 endif
1773 endif
1774
1775 EXTRA_DIST += \
1776 units/systemd-modules-load.service.in \
1777 units/kmod-static-nodes.service.in
1778
1779 # ------------------------------------------------------------------------------
1780 if ENABLE_TMPFILES
1781 systemd_tmpfiles_SOURCES = \
1782 src/tmpfiles/tmpfiles.c
1783
1784 systemd_tmpfiles_LDADD = \
1785 libsystemd-units.la \
1786 libsystemd-label.la \
1787 libsystemd-capability.la \
1788 libsystemd-internal.la \
1789 libsystemd-shared.la
1790
1791 rootbin_PROGRAMS += \
1792 systemd-tmpfiles
1793
1794 dist_systemunit_DATA += \
1795 units/systemd-tmpfiles-clean.timer
1796
1797 nodist_systemunit_DATA += \
1798 units/systemd-tmpfiles-setup-dev.service \
1799 units/systemd-tmpfiles-setup.service \
1800 units/systemd-tmpfiles-clean.service
1801
1802 dist_tmpfiles_DATA = \
1803 tmpfiles.d/systemd.conf \
1804 tmpfiles.d/systemd-nologin.conf \
1805 tmpfiles.d/tmp.conf \
1806 tmpfiles.d/x11.conf \
1807 tmpfiles.d/var.conf \
1808 tmpfiles.d/etc.conf
1809
1810 if HAVE_SYSV_COMPAT
1811 dist_tmpfiles_DATA += \
1812 tmpfiles.d/legacy.conf
1813 endif
1814
1815 SYSINIT_TARGET_WANTS += \
1816 systemd-tmpfiles-setup-dev.service \
1817 systemd-tmpfiles-setup.service
1818
1819 dist_zshcompletion_DATA += \
1820 shell-completion/zsh/_systemd-tmpfiles
1821
1822 TIMERS_TARGET_WANTS += \
1823 systemd-tmpfiles-clean.timer
1824
1825 INSTALL_DIRS += \
1826 $(tmpfilesdir) \
1827 $(sysconfdir)/tmpfiles.d
1828 endif
1829
1830 EXTRA_DIST += \
1831 units/systemd-tmpfiles-setup-dev.service.in \
1832 units/systemd-tmpfiles-setup.service.in \
1833 units/systemd-tmpfiles-clean.service.in
1834
1835 # ------------------------------------------------------------------------------
1836 if ENABLE_SYSUSERS
1837 systemd_sysusers_SOURCES = \
1838 src/sysusers/sysusers.c
1839
1840 systemd_sysusers_LDADD = \
1841 libsystemd-units.la \
1842 libsystemd-label.la \
1843 libsystemd-capability.la \
1844 libsystemd-internal.la \
1845 libsystemd-shared.la
1846
1847 rootbin_PROGRAMS += \
1848 systemd-sysusers
1849
1850 nodist_systemunit_DATA += \
1851 units/systemd-sysusers.service
1852
1853 SYSINIT_TARGET_WANTS += \
1854 systemd-sysusers.service
1855
1856 dist_sysusers_DATA = \
1857 sysusers.d/systemd.conf
1858
1859 nodist_sysusers_DATA = \
1860 sysusers.d/basic.conf
1861
1862 EXTRA_DIST += \
1863 units/systemd-sysusers.service.in \
1864 sysusers.d/basic.conf.in
1865
1866 CLEANFILES += \
1867 sysusers.d/basic.conf
1868
1869 INSTALL_DIRS += \
1870 $(sysusersdir)
1871 endif
1872
1873 # ------------------------------------------------------------------------------
1874 systemd_machine_id_setup_SOURCES = \
1875 src/machine-id-setup/machine-id-setup-main.c \
1876 src/core/machine-id-setup.c \
1877 src/core/machine-id-setup.h
1878
1879 systemd_machine_id_setup_LDADD = \
1880 libsystemd-label.la \
1881 libsystemd-internal.la \
1882 libsystemd-shared.la
1883
1884 # ------------------------------------------------------------------------------
1885 systemd_sysctl_SOURCES = \
1886 src/sysctl/sysctl.c
1887
1888 systemd_sysctl_LDADD = \
1889 libsystemd-shared.la
1890
1891 # ------------------------------------------------------------------------------
1892 systemd_sleep_SOURCES = \
1893 src/sleep/sleep.c
1894
1895 systemd_sleep_LDADD = \
1896 libsystemd-shared.la
1897
1898 # ------------------------------------------------------------------------------
1899 systemd_fsck_SOURCES = \
1900 src/fsck/fsck.c
1901
1902 systemd_fsck_LDADD = \
1903 libsystemd-internal.la \
1904 libudev-internal.la \
1905 libsystemd-shared.la
1906
1907 # ------------------------------------------------------------------------------
1908 systemd_ac_power_SOURCES = \
1909 src/ac-power/ac-power.c
1910
1911 systemd_ac_power_LDADD = \
1912 libudev-internal.la \
1913 libsystemd-shared.la
1914
1915 # ------------------------------------------------------------------------------
1916 systemd_detect_virt_SOURCES = \
1917 src/detect-virt/detect-virt.c
1918
1919 systemd_detect_virt_LDADD = \
1920 libsystemd-shared.la
1921
1922 INSTALL_EXEC_HOOKS += \
1923 systemd-detect-virt-install-hook
1924
1925 # ------------------------------------------------------------------------------
1926 systemd_delta_SOURCES = \
1927 src/delta/delta.c
1928
1929 systemd_delta_LDADD = \
1930 libsystemd-shared.la
1931
1932 # ------------------------------------------------------------------------------
1933 systemd_getty_generator_SOURCES = \
1934 src/getty-generator/getty-generator.c
1935
1936 systemd_getty_generator_LDADD = \
1937 libsystemd-label.la \
1938 libsystemd-shared.la
1939
1940 # ------------------------------------------------------------------------------
1941 systemd_debug_generator_SOURCES = \
1942 src/debug-generator/debug-generator.c
1943
1944 systemd_debug_generator_LDADD = \
1945 libsystemd-label.la \
1946 libsystemd-shared.la
1947
1948 # ------------------------------------------------------------------------------
1949 systemd_fstab_generator_SOURCES = \
1950 src/fstab-generator/fstab-generator.c \
1951 src/core/mount-setup.c
1952
1953 systemd_fstab_generator_LDADD = \
1954 libsystemd-label.la \
1955 libsystemd-shared.la
1956
1957 # ------------------------------------------------------------------------------
1958 systemd_system_update_generator_SOURCES = \
1959 src/system-update-generator/system-update-generator.c
1960
1961 systemd_system_update_generator_LDADD = \
1962 libsystemd-label.la \
1963 libsystemd-shared.la
1964
1965 if ENABLE_EFI
1966 # ------------------------------------------------------------------------------
1967 systemgenerator_PROGRAMS += \
1968 systemd-efi-boot-generator
1969
1970 systemd_efi_boot_generator_SOURCES = \
1971 src/efi-boot-generator/efi-boot-generator.c
1972
1973 systemd_efi_boot_generator_LDADD = \
1974 libsystemd-label.la \
1975 libsystemd-shared.la
1976
1977 # ------------------------------------------------------------------------------
1978 bootctl_SOURCES = \
1979 src/boot/boot.h \
1980 src/boot/boot-loader.h \
1981 src/boot/bootctl.c \
1982 src/boot/boot-loader.c \
1983 src/boot/boot-efi.c
1984
1985 bootctl_LDADD = \
1986 libsystemd-shared.la \
1987 libsystemd-internal.la
1988
1989 bin_PROGRAMS += \
1990 bootctl
1991
1992 dist_bashcompletion_DATA += \
1993 shell-completion/bash/bootctl
1994
1995 dist_zshcompletion_DATA += \
1996 shell-completion/zsh/_bootctl
1997
1998 endif
1999
2000 # ------------------------------------------------------------------------------
2001 if HAVE_BLKID
2002 systemgenerator_PROGRAMS += \
2003 systemd-gpt-auto-generator
2004
2005 systemd_gpt_auto_generator_SOURCES = \
2006 src/gpt-auto-generator/gpt-auto-generator.c \
2007 src/shared/blkid-util.h
2008
2009 systemd_gpt_auto_generator_LDADD = \
2010 libsystemd-label.la \
2011 libsystemd-internal.la \
2012 libudev-internal.la \
2013 libsystemd-shared.la \
2014 $(BLKID_LIBS)
2015
2016 systemd_gpt_auto_generator_CFLAGS = \
2017 $(AM_CFLAGS) \
2018 $(BLKID_CFLAGS)
2019 endif
2020
2021 # ------------------------------------------------------------------------------
2022 if ENABLE_KDBUS
2023 systemgenerator_PROGRAMS += \
2024 systemd-dbus1-generator
2025
2026 systemd_dbus1_generator_SOURCES = \
2027 src/dbus1-generator/dbus1-generator.c
2028
2029 systemd_dbus1_generator_LDADD = \
2030 libsystemd-label.la \
2031 libsystemd-shared.la \
2032 libsystemd-internal.la
2033
2034 dbus1-generator-install-hook:
2035 $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
2036 $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2037 $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2038
2039 dbus1-generator-uninstall-hook:
2040 rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2041
2042 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
2043 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
2044 endif
2045
2046 # ------------------------------------------------------------------------------
2047 systemd_sysv_generator_SOURCES = \
2048 src/sysv-generator/sysv-generator.c
2049
2050 systemd_sysv_generator_LDADD = \
2051 libsystemd-core.la \
2052 libsystemd-label.la \
2053 libsystemd-shared.la
2054
2055 # ------------------------------------------------------------------------------
2056 systemd_rc_local_generator_SOURCES = \
2057 src/rc-local-generator/rc-local-generator.c
2058
2059 systemd_rc_local_generator_LDADD = \
2060 libsystemd-label.la \
2061 libsystemd-shared.la
2062
2063 # ------------------------------------------------------------------------------
2064 systemd_remount_fs_SOURCES = \
2065 src/remount-fs/remount-fs.c \
2066 src/core/mount-setup.c \
2067 src/core/mount-setup.h
2068
2069 systemd_remount_fs_LDADD = \
2070 libsystemd-label.la \
2071 libsystemd-shared.la
2072
2073 # ------------------------------------------------------------------------------
2074 systemd_cgroups_agent_SOURCES = \
2075 src/cgroups-agent/cgroups-agent.c
2076
2077 systemd_cgroups_agent_LDADD = \
2078 libsystemd-internal.la \
2079 libsystemd-shared.la
2080
2081 # ------------------------------------------------------------------------------
2082 systemctl_SOURCES = \
2083 src/systemctl/systemctl.c
2084
2085 systemctl_LDADD = \
2086 libsystemd-units.la \
2087 libsystemd-label.la \
2088 libsystemd-internal.la \
2089 libsystemd-logs.la \
2090 libsystemd-journal-internal.la \
2091 libsystemd-shared.la
2092
2093 # ------------------------------------------------------------------------------
2094 systemd_notify_SOURCES = \
2095 src/notify/notify.c \
2096 src/readahead/sd-readahead.c
2097
2098 systemd_notify_LDADD = \
2099 libsystemd-internal.la \
2100 libsystemd-shared.la
2101
2102 # ------------------------------------------------------------------------------
2103 systemd_path_SOURCES = \
2104 src/path/path.c
2105
2106 systemd_path_LDADD = \
2107 libsystemd-internal.la \
2108 libsystemd-shared.la
2109
2110 # ------------------------------------------------------------------------------
2111 systemd_ask_password_SOURCES = \
2112 src/ask-password/ask-password.c
2113
2114 systemd_ask_password_LDADD = \
2115 libsystemd-label.la \
2116 libsystemd-shared.la
2117
2118 # ------------------------------------------------------------------------------
2119 systemd_reply_password_SOURCES = \
2120 src/reply-password/reply-password.c
2121
2122 systemd_reply_password_LDADD = \
2123 libsystemd-shared.la
2124
2125 # ------------------------------------------------------------------------------
2126 systemd_cgls_SOURCES = \
2127 src/cgls/cgls.c
2128
2129 systemd_cgls_LDADD = \
2130 libsystemd-internal.la \
2131 libsystemd-shared.la
2132
2133 # ------------------------------------------------------------------------------
2134 systemd_cgtop_SOURCES = \
2135 src/cgtop/cgtop.c
2136
2137 systemd_cgtop_LDADD = \
2138 libsystemd-shared.la
2139
2140 # ------------------------------------------------------------------------------
2141 systemd_nspawn_SOURCES = \
2142 src/nspawn/nspawn.c \
2143 src/core/mount-setup.c \
2144 src/core/mount-setup.h \
2145 src/core/loopback-setup.c \
2146 src/core/loopback-setup.h
2147
2148 systemd_nspawn_CFLAGS = \
2149 $(AM_CFLAGS) \
2150 $(SECCOMP_CFLAGS) \
2151 $(BLKID_CFLAGS)
2152
2153 systemd_nspawn_LDADD = \
2154 libsystemd-label.la \
2155 libsystemd-capability.la \
2156 libsystemd-internal.la \
2157 libudev-internal.la \
2158 libsystemd-shared.la \
2159 $(BLKID_LIBS)
2160
2161 if HAVE_SECCOMP
2162 systemd_nspawn_LDADD += \
2163 libsystemd-seccomp.la \
2164 $(SECCOMP_LIBS)
2165 endif
2166
2167 # ------------------------------------------------------------------------------
2168 systemd_run_SOURCES = \
2169 src/run/run.c
2170
2171 systemd_run_LDADD = \
2172 libsystemd-label.la \
2173 libsystemd-capability.la \
2174 libsystemd-internal.la \
2175 libsystemd-shared.la
2176
2177 # ------------------------------------------------------------------------------
2178 systemd_bus_proxyd_SOURCES = \
2179 src/bus-proxyd/bus-proxyd.c \
2180 src/bus-proxyd/bus-policy.c \
2181 src/bus-proxyd/bus-policy.h
2182
2183 systemd_bus_proxyd_LDADD = \
2184 libsystemd-capability.la \
2185 libsystemd-internal.la \
2186 libsystemd-shared.la
2187
2188 bus-proxyd-install-hook:
2189 $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
2190 $(AM_V_RM)rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2191 $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
2192
2193 bus-proxyd-uninstall-hook:
2194 rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2195
2196 INSTALL_EXEC_HOOKS += bus-proxyd-install-hook
2197 UNINSTALL_EXEC_HOOKS += bus-proxyd-uninstall-hook
2198
2199 if ENABLE_KDBUS
2200 nodist_systemunit_DATA += \
2201 units/systemd-bus-proxyd@.service
2202
2203 dist_systemunit_DATA += \
2204 units/systemd-bus-proxyd.socket
2205
2206 dist_userunit_DATA += \
2207 units/user/systemd-bus-proxyd.socket \
2208 units/user/systemd-bus-proxyd@.service
2209 endif
2210
2211 EXTRA_DIST += \
2212 units/systemd-bus-proxyd@.service.in
2213
2214 # ------------------------------------------------------------------------------
2215 systemd_tty_ask_password_agent_SOURCES = \
2216 src/tty-ask-password-agent/tty-ask-password-agent.c
2217
2218 systemd_tty_ask_password_agent_LDADD = \
2219 libsystemd-label.la \
2220 libsystemd-shared.la
2221
2222 # ------------------------------------------------------------------------------
2223 libsystemd_internal_la_SOURCES = \
2224 src/systemd/sd-bus.h \
2225 src/systemd/sd-bus-protocol.h \
2226 src/systemd/sd-bus-vtable.h \
2227 src/systemd/sd-memfd.h \
2228 src/systemd/sd-utf8.h \
2229 src/systemd/sd-event.h \
2230 src/systemd/sd-rtnl.h \
2231 src/systemd/sd-resolve.h \
2232 src/systemd/sd-login.h \
2233 src/systemd/sd-id128.h \
2234 src/systemd/sd-daemon.h \
2235 src/systemd/sd-path.h \
2236 src/libsystemd/sd-bus/sd-bus.c \
2237 src/libsystemd/sd-bus/bus-control.c \
2238 src/libsystemd/sd-bus/bus-control.h \
2239 src/libsystemd/sd-bus/bus-error.c \
2240 src/libsystemd/sd-bus/bus-error.h \
2241 src/libsystemd/sd-bus/bus-internal.c \
2242 src/libsystemd/sd-bus/bus-internal.h \
2243 src/libsystemd/sd-bus/bus-socket.c \
2244 src/libsystemd/sd-bus/bus-socket.h \
2245 src/libsystemd/sd-bus/bus-kernel.c \
2246 src/libsystemd/sd-bus/bus-kernel.h \
2247 src/libsystemd/sd-bus/bus-container.c \
2248 src/libsystemd/sd-bus/bus-container.h \
2249 src/libsystemd/sd-bus/bus-message.c \
2250 src/libsystemd/sd-bus/bus-message.h \
2251 src/libsystemd/sd-bus/bus-creds.c \
2252 src/libsystemd/sd-bus/bus-creds.h \
2253 src/libsystemd/sd-bus/bus-signature.c \
2254 src/libsystemd/sd-bus/bus-signature.h \
2255 src/libsystemd/sd-bus/bus-type.c \
2256 src/libsystemd/sd-bus/bus-type.h \
2257 src/libsystemd/sd-bus/bus-match.c \
2258 src/libsystemd/sd-bus/bus-match.h \
2259 src/libsystemd/sd-bus/bus-bloom.c \
2260 src/libsystemd/sd-bus/bus-bloom.h \
2261 src/libsystemd/sd-bus/bus-introspect.c \
2262 src/libsystemd/sd-bus/bus-introspect.h \
2263 src/libsystemd/sd-bus/bus-objects.c \
2264 src/libsystemd/sd-bus/bus-objects.h \
2265 src/libsystemd/sd-bus/bus-gvariant.c \
2266 src/libsystemd/sd-bus/bus-gvariant.h \
2267 src/libsystemd/sd-bus/bus-convenience.c \
2268 src/libsystemd/sd-bus/bus-track.c \
2269 src/libsystemd/sd-bus/bus-track.h \
2270 src/libsystemd/sd-bus/bus-util.c \
2271 src/libsystemd/sd-bus/bus-util.h \
2272 src/libsystemd/sd-bus/bus-slot.c \
2273 src/libsystemd/sd-bus/bus-slot.h \
2274 src/libsystemd/sd-bus/bus-protocol.h \
2275 src/libsystemd/sd-bus/kdbus.h \
2276 src/libsystemd/sd-bus/sd-memfd.c \
2277 src/libsystemd/sd-utf8/sd-utf8.c \
2278 src/libsystemd/sd-event/sd-event.c \
2279 src/libsystemd/sd-event/event-util.h \
2280 src/libsystemd/sd-rtnl/sd-rtnl.c \
2281 src/libsystemd/sd-rtnl/rtnl-internal.h \
2282 src/libsystemd/sd-rtnl/rtnl-message.c \
2283 src/libsystemd/sd-rtnl/rtnl-types.h \
2284 src/libsystemd/sd-rtnl/rtnl-types.c \
2285 src/libsystemd/sd-rtnl/rtnl-util.h \
2286 src/libsystemd/sd-rtnl/rtnl-util.c \
2287 src/libsystemd/sd-id128/sd-id128.c \
2288 src/libsystemd/sd-daemon/sd-daemon.c \
2289 src/libsystemd/sd-login/sd-login.c \
2290 src/libsystemd/sd-path/sd-path.c
2291
2292 nodist_libsystemd_internal_la_SOURCES = \
2293 src/libsystemd/libsystemd.sym \
2294 src/libsystemd/sd-bus/bus-error-mapping.c
2295
2296 libsystemd_internal_la_CFLAGS = \
2297 $(AM_CFLAGS) \
2298 -pthread
2299
2300 libsystemd_internal_la_LIBADD = \
2301 $(RT_LIBS)
2302
2303 libsystemd_resolve_la_SOURCES = \
2304 src/libsystemd/sd-resolve/sd-resolve.c \
2305 src/libsystemd/sd-resolve/resolve-util.h
2306
2307 libsystemd_resolve_la_CFLAGS = \
2308 $(AM_CFLAGS) \
2309 -pthread
2310
2311 libsystemd_resolve_la_LIBADD = \
2312 -lresolv
2313
2314 noinst_LTLIBRARIES += \
2315 libsystemd-internal.la \
2316 libsystemd-resolve.la
2317
2318 libsystemd_dump_la_SOURCES = \
2319 src/libsystemd/sd-bus/bus-dump.c \
2320 src/libsystemd/sd-bus/bus-dump.h
2321
2322 libsystemd_dump_la_CFLAGS = \
2323 $(AM_CFLAGS) \
2324 $(CAP_CFLAGS)
2325
2326 noinst_LTLIBRARIES += \
2327 libsystemd-dump.la
2328
2329 EXTRA_DIST += \
2330 src/libsystemd/libsystemd.sym.m4 \
2331 src/libsystemd/libsystemd.pc.in \
2332 src/libsystemd/sd-bus/bus-error-mapping.gperf \
2333 src/libsystemd/sd-bus/DIFFERENCES \
2334 src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
2335
2336 CLEANFILES += \
2337 src/libsystemd/libsystemd.sym \
2338 src/libsystemd/sd-bus/bus-error-mapping.c
2339
2340 BUILT_SOURCES += \
2341 src/libsystemd/libsystemd.sym
2342
2343 libsystemd_la_SOURCES = \
2344 $(libsystemd_internal_la_SOURCES) \
2345 $(libsystemd_resolve_la_SOURCES) \
2346 $(libsystemd_journal_internal_la_SOURCES)
2347
2348 nodist_libsystemd_la_SOURCES = \
2349 $(nodist_libsystemd_internal_la_SOURCES)
2350
2351 libsystemd_la_CFLAGS = \
2352 $(libsystemd_internal_la_CFLAGS) \
2353 $(libsystemd_resolve_la_CFLAGS) \
2354 $(libsystemd_journal_internal_la_CFLAGS)
2355
2356 libsystemd_la_LDFLAGS = \
2357 $(AM_LDFLAGS) \
2358 -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
2359 -Wl,--version-script=$(top_builddir)/src/libsystemd/libsystemd.sym
2360
2361 libsystemd_la_LIBADD = \
2362 libsystemd-shared.la \
2363 $(libsystemd_internal_la_LIBADD) \
2364 $(libsystemd_journal_internal_la_LIBADD) \
2365 $(libsystemd_resolve_la_LIBADD)
2366
2367 libsystemd-install-hook:
2368 libname=libsystemd.so && $(move-to-rootlibdir)
2369
2370 libsystemd-uninstall-hook:
2371 rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
2372
2373 INSTALL_EXEC_HOOKS += libsystemd-install-hook
2374 UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
2375
2376 pkgconfiglib_DATA += \
2377 src/libsystemd/libsystemd.pc
2378
2379 pkginclude_HEADERS += \
2380 src/systemd/sd-login.h \
2381 src/systemd/sd-id128.h \
2382 src/systemd/sd-daemon.h
2383
2384 if ENABLE_KDBUS
2385 pkginclude_HEADERS += \
2386 src/systemd/sd-bus.h \
2387 src/systemd/sd-bus-protocol.h \
2388 src/systemd/sd-bus-vtable.h \
2389 src/systemd/sd-memfd.h \
2390 src/systemd/sd-utf8.h \
2391 src/systemd/sd-event.h \
2392 src/systemd/sd-rtnl.h \
2393 src/systemd/sd-resolve.h \
2394 src/systemd/sd-path.h
2395 endif
2396
2397 lib_LTLIBRARIES += \
2398 libsystemd.la
2399
2400 tests += \
2401 test-bus-marshal \
2402 test-bus-signature \
2403 test-bus-chat \
2404 test-bus-cleanup \
2405 test-bus-server \
2406 test-bus-match \
2407 test-bus-kernel \
2408 test-bus-kernel-bloom \
2409 test-bus-kernel-benchmark \
2410 test-bus-memfd \
2411 test-bus-zero-copy \
2412 test-bus-introspect \
2413 test-bus-objects \
2414 test-bus-error \
2415 test-bus-creds \
2416 test-bus-gvariant \
2417 test-event \
2418 test-rtnl \
2419 test-resolve
2420
2421 bin_PROGRAMS += \
2422 busctl
2423
2424 test_bus_marshal_SOURCES = \
2425 src/libsystemd/sd-bus/test-bus-marshal.c
2426
2427 test_bus_marshal_LDADD = \
2428 libsystemd-internal.la \
2429 libsystemd-shared.la \
2430 libsystemd-dump.la \
2431 libsystemd-capability.la \
2432 $(GLIB_LIBS) \
2433 $(DBUS_LIBS) \
2434 $(CAP_LIBS)
2435
2436 test_bus_marshal_CFLAGS = \
2437 $(AM_CFLAGS) \
2438 $(GLIB_CFLAGS) \
2439 $(DBUS_CFLAGS) \
2440 $(CAP_CFLAGS)
2441
2442 test_bus_signature_SOURCES = \
2443 src/libsystemd/sd-bus/test-bus-signature.c
2444
2445 test_bus_signature_LDADD = \
2446 libsystemd-shared.la \
2447 libsystemd-internal.la
2448
2449 test_bus_chat_SOURCES = \
2450 src/libsystemd/sd-bus/test-bus-chat.c
2451
2452 test_bus_chat_CFLAGS = \
2453 $(AM_CFLAGS) \
2454 -pthread
2455
2456 test_bus_chat_LDADD = \
2457 libsystemd-internal.la \
2458 libsystemd-shared.la
2459
2460 test_bus_cleanup_SOURCES = \
2461 src/libsystemd/sd-bus/test-bus-cleanup.c
2462
2463 test_bus_cleanup_CFLAGS = \
2464 $(AM_CFLAGS) \
2465 $(SECCOMP_CFLAGS)
2466
2467 test_bus_cleanup_LDADD = \
2468 libsystemd-internal.la \
2469 libsystemd-shared.la
2470
2471 test_bus_server_SOURCES = \
2472 src/libsystemd/sd-bus/test-bus-server.c
2473
2474 test_bus_server_CFLAGS = \
2475 $(AM_CFLAGS) \
2476 -pthread
2477
2478 test_bus_server_LDADD = \
2479 libsystemd-internal.la \
2480 libsystemd-shared.la
2481
2482 test_bus_objects_SOURCES = \
2483 src/libsystemd/sd-bus/test-bus-objects.c
2484
2485 test_bus_objects_CFLAGS = \
2486 $(AM_CFLAGS) \
2487 $(CAP_CFLAGS) \
2488 -pthread
2489
2490 test_bus_objects_LDADD = \
2491 libsystemd-internal.la \
2492 libsystemd-shared.la \
2493 libsystemd-dump.la \
2494 libsystemd-capability.la \
2495 $(CAP_LIBS)
2496
2497 test_bus_error_SOURCES = \
2498 src/libsystemd/sd-bus/test-bus-error.c
2499
2500 test_bus_error_LDADD = \
2501 libsystemd-internal.la \
2502 libsystemd-shared.la
2503
2504 test_bus_gvariant_SOURCES = \
2505 src/libsystemd/sd-bus/test-bus-gvariant.c
2506
2507 test_bus_gvariant_LDADD = \
2508 libsystemd-internal.la \
2509 libsystemd-shared.la \
2510 libsystemd-dump.la \
2511 libsystemd-capability.la \
2512 $(GLIB_LIBS) \
2513 $(CAP_LIBS)
2514
2515 test_bus_gvariant_CFLAGS = \
2516 $(AM_CFLAGS) \
2517 $(GLIB_CFLAGS)
2518 $(CAP_CFLAGS)
2519
2520 test_bus_creds_SOURCES = \
2521 src/libsystemd/sd-bus/test-bus-creds.c
2522
2523 test_bus_creds_LDADD = \
2524 libsystemd-internal.la \
2525 libsystemd-shared.la \
2526 libsystemd-dump.la \
2527 libsystemd-capability.la
2528
2529 test_bus_match_SOURCES = \
2530 src/libsystemd/sd-bus/test-bus-match.c
2531
2532 test_bus_match_LDADD = \
2533 libsystemd-internal.la \
2534 libsystemd-shared.la
2535
2536 test_bus_kernel_SOURCES = \
2537 src/libsystemd/sd-bus/test-bus-kernel.c
2538
2539 test_bus_kernel_LDADD = \
2540 libsystemd-internal.la \
2541 libsystemd-shared.la \
2542 libsystemd-dump.la \
2543 libsystemd-capability.la \
2544 $(CAP_LIBS)
2545
2546 test_bus_kernel_CFLAGS = \
2547 $(AM_CFLAGS) \
2548 $(CAP_CFLAGS)
2549
2550 test_bus_kernel_bloom_SOURCES = \
2551 src/libsystemd/sd-bus/test-bus-kernel-bloom.c
2552
2553 test_bus_kernel_bloom_LDADD = \
2554 libsystemd-internal.la \
2555 libsystemd-shared.la
2556
2557 test_bus_kernel_benchmark_SOURCES = \
2558 src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
2559
2560 test_bus_kernel_benchmark_LDADD = \
2561 libsystemd-internal.la \
2562 libsystemd-shared.la
2563
2564 test_bus_memfd_SOURCES = \
2565 src/libsystemd/sd-bus/test-bus-memfd.c
2566
2567 test_bus_memfd_LDADD = \
2568 libsystemd-internal.la \
2569 libsystemd-shared.la
2570
2571 test_bus_zero_copy_SOURCES = \
2572 src/libsystemd/sd-bus/test-bus-zero-copy.c
2573
2574 test_bus_zero_copy_LDADD = \
2575 libsystemd-internal.la \
2576 libsystemd-shared.la \
2577 libsystemd-dump.la \
2578 libsystemd-capability.la \
2579 $(CAP_LIBS)
2580
2581 test_bus_zero_copy_CFLAGS = \
2582 $(AM_CFLAGS) \
2583 $(CAP_CFLAGS)
2584
2585 test_bus_introspect_SOURCES = \
2586 src/libsystemd/sd-bus/test-bus-introspect.c
2587
2588 test_bus_introspect_LDADD = \
2589 libsystemd-internal.la \
2590 libsystemd-shared.la
2591
2592 test_event_SOURCES = \
2593 src/libsystemd/sd-event/test-event.c
2594
2595 test_event_LDADD = \
2596 libsystemd-internal.la \
2597 libsystemd-shared.la
2598
2599 test_rtnl_SOURCES = \
2600 src/libsystemd/sd-rtnl/test-rtnl.c
2601
2602 test_rtnl_LDADD = \
2603 libsystemd-internal.la \
2604 libsystemd-shared.la
2605
2606 test_resolve_SOURCES = \
2607 src/libsystemd/sd-resolve/test-resolve.c
2608
2609 test_resolve_LDADD = \
2610 libsystemd-resolve.la \
2611 libsystemd-internal.la \
2612 libsystemd-shared.la
2613
2614 test_resolve_CFLAGS = \
2615 $(AM_CFLAGS) \
2616 -pthread
2617
2618 busctl_SOURCES = \
2619 src/libsystemd/sd-bus/busctl.c
2620
2621 busctl_LDADD = \
2622 libsystemd-internal.la \
2623 libsystemd-shared.la \
2624 libsystemd-dump.la \
2625 libsystemd-capability.la \
2626 $(CAP_LIBS)
2627
2628 busctl_CFLAGS = \
2629 $(AM_CFLAGS) \
2630 $(CAP_CFLAGS)
2631
2632 # ------------------------------------------------------------------------------
2633 noinst_LTLIBRARIES += \
2634 libsystemd-network.la
2635
2636 libsystemd_network_la_CFLAGS = \
2637 $(AM_CFLAGS) \
2638 $(KMOD_CFLAGS)
2639
2640 libsystemd_network_la_SOURCES = \
2641 src/systemd/sd-network.h \
2642 src/systemd/sd-dhcp-client.h \
2643 src/systemd/sd-dhcp-server.h \
2644 src/systemd/sd-dhcp-lease.h \
2645 src/systemd/sd-ipv4ll.h \
2646 src/network/sd-network.c \
2647 src/network/network-util.h \
2648 src/libsystemd-network/sd-dhcp-client.c \
2649 src/libsystemd-network/sd-dhcp-server.c \
2650 src/libsystemd-network/dhcp-network.c \
2651 src/libsystemd-network/dhcp-option.c \
2652 src/libsystemd-network/dhcp-packet.c \
2653 src/libsystemd-network/dhcp-internal.h \
2654 src/libsystemd-network/dhcp-server-internal.h \
2655 src/libsystemd-network/dhcp-protocol.h \
2656 src/libsystemd-network/dhcp-lease-internal.h \
2657 src/libsystemd-network/sd-dhcp-lease.c \
2658 src/libsystemd-network/sd-ipv4ll.c \
2659 src/libsystemd-network/ipv4ll-network.c \
2660 src/libsystemd-network/ipv4ll-packet.c \
2661 src/libsystemd-network/ipv4ll-internal.h \
2662 src/libsystemd-network/network-internal.c \
2663 src/libsystemd-network/network-internal.h \
2664 src/systemd/sd-icmp6-nd.h \
2665 src/systemd/sd-dhcp6-client.h \
2666 src/systemd/sd-dhcp6-lease.h \
2667 src/libsystemd-network/sd-icmp6-nd.c \
2668 src/libsystemd-network/sd-dhcp6-client.c \
2669 src/libsystemd-network/dhcp6-internal.h \
2670 src/libsystemd-network/dhcp6-protocol.h \
2671 src/libsystemd-network/dhcp6-network.c \
2672 src/libsystemd-network/dhcp6-option.c \
2673 src/libsystemd-network/dhcp6-lease-internal.h \
2674 src/libsystemd-network/sd-dhcp6-lease.c
2675
2676 libsystemd_network_la_LIBADD = \
2677 libudev-internal.la \
2678 libsystemd-label.la \
2679 libsystemd-internal.la \
2680 libsystemd-shared.la \
2681 $(KMOD_LIBS)
2682
2683 test_dhcp_option_SOURCES = \
2684 src/libsystemd-network/dhcp-protocol.h \
2685 src/libsystemd-network/dhcp-internal.h \
2686 src/libsystemd-network/test-dhcp-option.c
2687
2688 test_dhcp_option_LDADD = \
2689 libsystemd-network.la \
2690 libsystemd-internal.la \
2691 libsystemd-shared.la
2692
2693 test_dhcp_client_SOURCES = \
2694 src/systemd/sd-dhcp-client.h \
2695 src/libsystemd-network/dhcp-protocol.h \
2696 src/libsystemd-network/dhcp-internal.h \
2697 src/libsystemd-network/test-dhcp-client.c
2698
2699 test_dhcp_client_LDADD = \
2700 libsystemd-network.la \
2701 libsystemd-label.la \
2702 libsystemd-internal.la \
2703 libsystemd-shared.la
2704
2705 test_dhcp_server_SOURCES = \
2706 src/libsystemd-network/test-dhcp-server.c
2707
2708 test_dhcp_server_LDADD = \
2709 libsystemd-network.la \
2710 libsystemd-internal.la \
2711 libsystemd-shared.la
2712
2713 test_ipv4ll_SOURCES = \
2714 src/systemd/sd-ipv4ll.h \
2715 src/libsystemd-network/ipv4ll-internal.h \
2716 src/libsystemd-network/test-ipv4ll.c
2717
2718 test_ipv4ll_LDADD = \
2719 libsystemd-network.la \
2720 libsystemd-label.la \
2721 libsystemd-internal.la \
2722 libsystemd-shared.la
2723
2724 test_icmp6_rs_SOURCES = \
2725 src/systemd/sd-dhcp6-client.h \
2726 src/systemd/sd-icmp6-nd.h \
2727 src/libsystemd-network/dhcp6-internal.h \
2728 src/libsystemd-network/test-icmp6-rs.c
2729
2730 test_icmp6_rs_LDADD = \
2731 libsystemd-network.la \
2732 libsystemd-internal.la \
2733 libsystemd-shared.la
2734
2735 test_dhcp6_client_SOURCES = \
2736 src/systemd/sd-dhcp6-client.h \
2737 src/libsystemd-network/dhcp6-internal.h \
2738 src/libsystemd-network/test-dhcp6-client.c
2739
2740 test_dhcp6_client_LDADD = \
2741 libsystemd-network.la \
2742 libsystemd-internal.la \
2743 libsystemd-shared.la
2744
2745 tests += \
2746 test-dhcp-option \
2747 test-dhcp-client \
2748 test-dhcp-server \
2749 test-ipv4ll \
2750 test-icmp6-rs \
2751 test-dhcp6-client
2752
2753 # ------------------------------------------------------------------------------
2754 if ENABLE_GTK_DOC
2755 SUBDIRS += \
2756 docs/libudev
2757
2758 noinst_DATA += \
2759 docs/html/libudev \
2760 docs/html/gudev
2761 endif
2762
2763 include_HEADERS += \
2764 src/libudev/libudev.h
2765
2766 lib_LTLIBRARIES += \
2767 libudev.la
2768
2769 libudev_la_SOURCES =\
2770 src/libudev/libudev.sym \
2771 src/libudev/libudev-private.h \
2772 src/libudev/libudev.c \
2773 src/libudev/libudev-list.c \
2774 src/libudev/libudev-util.c \
2775 src/libudev/libudev-device.c \
2776 src/libudev/libudev-enumerate.c \
2777 src/libudev/libudev-monitor.c \
2778 src/libudev/libudev-queue.c \
2779 src/libudev/libudev-hwdb-def.h \
2780 src/libudev/libudev-hwdb.c
2781
2782 libudev_la_CFLAGS = \
2783 $(AM_CFLAGS) \
2784 -fvisibility=hidden
2785
2786 libudev_la_LDFLAGS = \
2787 $(AM_LDFLAGS) \
2788 -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
2789 -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
2790
2791 libudev_la_LIBADD = \
2792 libsystemd-internal.la \
2793 libsystemd-shared.la
2794
2795 pkgconfiglib_DATA += \
2796 src/libudev/libudev.pc
2797
2798 EXTRA_DIST += \
2799 src/libudev/libudev.pc.in
2800
2801 CLEANFILES += \
2802 src/libudev/libudev.pc \
2803 docs/html/libudev \
2804 docs/html/gudev
2805
2806 docs/html/libudev:
2807 $(AM_V_at)$(MKDIR_P) $(dir $@)
2808 $(AM_V_LN)$(LN_S) -f ../libudev/html $@
2809
2810 docs/html/gudev:
2811 $(AM_V_at)$(MKDIR_P) $(dir $@)
2812 $(AM_V_LN)$(LN_S) -f ../gudev/html $@
2813
2814 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2815 libudev-install-hook:
2816 libname=libudev.so && $(move-to-rootlibdir)
2817
2818 libudev-uninstall-hook:
2819 rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
2820
2821 INSTALL_EXEC_HOOKS += libudev-install-hook
2822 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
2823
2824 # ------------------------------------------------------------------------------
2825 noinst_LTLIBRARIES += \
2826 libudev-internal.la
2827
2828 libudev_internal_la_SOURCES =\
2829 $(libudev_la_SOURCES) \
2830 src/libudev/libudev-device-private.c
2831
2832 libudev_internal_la_CFLAGS = \
2833 $(AM_CFLAGS) \
2834 -fvisibility=default
2835
2836 # ------------------------------------------------------------------------------
2837 INSTALL_DIRS += \
2838 $(sysconfdir)/udev/rules.d \
2839 $(sysconfdir)/udev/hwdb.d
2840
2841 dist_network_DATA = \
2842 network/99-default.link \
2843 network/80-container-host0.network \
2844 network/80-container-ve.network
2845
2846 dist_udevrules_DATA += \
2847 rules/42-usb-hid-pm.rules \
2848 rules/50-udev-default.rules \
2849 rules/60-drm.rules \
2850 rules/60-keyboard.rules \
2851 rules/60-persistent-storage-tape.rules \
2852 rules/60-persistent-serial.rules \
2853 rules/60-persistent-input.rules \
2854 rules/60-persistent-alsa.rules \
2855 rules/60-persistent-storage.rules \
2856 rules/64-btrfs.rules \
2857 rules/75-net-description.rules \
2858 rules/75-tty-description.rules \
2859 rules/78-sound-card.rules \
2860 rules/80-net-setup-link.rules \
2861 rules/95-udev-late.rules
2862
2863 nodist_udevrules_DATA += \
2864 rules/99-systemd.rules
2865
2866 dist_udevhwdb_DATA = \
2867 hwdb/20-pci-vendor-model.hwdb \
2868 hwdb/20-pci-classes.hwdb \
2869 hwdb/20-usb-vendor-model.hwdb \
2870 hwdb/20-usb-classes.hwdb \
2871 hwdb/20-sdio-vendor-model.hwdb \
2872 hwdb/20-sdio-classes.hwdb \
2873 hwdb/20-bluetooth-vendor-product.hwdb \
2874 hwdb/20-acpi-vendor.hwdb \
2875 hwdb/20-OUI.hwdb \
2876 hwdb/20-net-ifname.hwdb \
2877 hwdb/60-keyboard.hwdb
2878
2879 udevconfdir = $(sysconfdir)/udev
2880 dist_udevconf_DATA = \
2881 src/udev/udev.conf
2882
2883 sharepkgconfigdir = $(datadir)/pkgconfig
2884 sharepkgconfig_DATA = \
2885 src/udev/udev.pc
2886
2887 EXTRA_DIST += \
2888 rules/99-systemd.rules.in \
2889 src/udev/udev.pc.in
2890
2891 CLEANFILES += \
2892 rules/99-systemd.rules \
2893 src/udev/udev.pc
2894
2895 EXTRA_DIST += \
2896 units/systemd-udevd.service.in \
2897 units/systemd-udev-trigger.service.in \
2898 units/systemd-udev-settle.service.in \
2899 units/systemd-udev-hwdb-update.service.in
2900
2901 CLEANFILES += \
2902 units/systemd-udevd.service \
2903 units/systemd-udev-trigger.service \
2904 units/systemd-udev-settle.service \
2905 units/systemd-udev-hwdb-update.service
2906
2907 SOCKETS_TARGET_WANTS += \
2908 systemd-udevd-control.socket \
2909 systemd-udevd-kernel.socket
2910
2911 SYSINIT_TARGET_WANTS += \
2912 systemd-udevd.service \
2913 systemd-udev-trigger.service \
2914 systemd-udev-hwdb-update.service
2915
2916 rootbin_PROGRAMS += \
2917 udevadm
2918
2919 rootlibexec_PROGRAMS += \
2920 systemd-udevd
2921
2922 noinst_LTLIBRARIES += \
2923 libudev-core.la
2924
2925 src/udev/keyboard-keys.txt:
2926 $(AM_V_at)$(MKDIR_P) $(dir $@)
2927 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
2928
2929 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
2930 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
2931
2932 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
2933 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
2934
2935 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
2936 $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
2937
2938 libudev_core_la_SOURCES = \
2939 src/udev/udev.h \
2940 src/udev/udev-event.c \
2941 src/udev/udev-watch.c \
2942 src/udev/udev-node.c \
2943 src/udev/udev-rules.c \
2944 src/udev/udev-ctrl.c \
2945 src/udev/udev-builtin.c \
2946 src/udev/udev-builtin-btrfs.c \
2947 src/udev/udev-builtin-hwdb.c \
2948 src/udev/udev-builtin-input_id.c \
2949 src/udev/udev-builtin-keyboard.c \
2950 src/udev/udev-builtin-net_id.c \
2951 src/udev/udev-builtin-net_setup_link.c \
2952 src/udev/udev-builtin-path_id.c \
2953 src/udev/udev-builtin-usb_id.c \
2954 src/udev/net/link-config.h \
2955 src/udev/net/link-config.c \
2956 src/udev/net/ethtool-util.h \
2957 src/udev/net/ethtool-util.c
2958
2959 nodist_libudev_core_la_SOURCES = \
2960 src/udev/keyboard-keys-from-name.h \
2961 src/udev/keyboard-keys-to-name.h \
2962 src/udev/net/link-config-gperf.c
2963
2964 BUILT_SOURCES += \
2965 $(nodist_libudev_core_la_SOURCES)
2966
2967 CLEANFILES += \
2968 src/udev/keyboard-keys-from-name.gperf \
2969 src/udev/keyboard-keys.txt \
2970 src/udev/net/link-config-gperf.c
2971
2972 EXTRA_DIST += \
2973 src/udev/net/link-config-gperf.gperf
2974
2975 libudev_core_la_CFLAGS = \
2976 $(AM_CFLAGS) \
2977 $(BLKID_CFLAGS) \
2978 $(KMOD_CFLAGS)
2979
2980 libudev_core_la_LIBADD = \
2981 libudev-internal.la \
2982 libsystemd-label.la \
2983 libsystemd-internal.la \
2984 libsystemd-network.la \
2985 libsystemd-shared.la \
2986 $(BLKID_LIBS) \
2987 $(KMOD_LIBS)
2988
2989 libudev_core_la_CPPFLAGS = \
2990 $(AM_CPPFLAGS) \
2991 -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
2992
2993 if ENABLE_FIRMWARE
2994 libudev_core_la_SOURCES += \
2995 src/udev/udev-builtin-firmware.c
2996
2997 dist_udevrules_DATA += \
2998 rules/50-firmware.rules
2999 endif
3000
3001 if HAVE_KMOD
3002 libudev_core_la_SOURCES += \
3003 src/udev/udev-builtin-kmod.c
3004
3005 dist_udevrules_DATA += \
3006 rules/80-drivers.rules
3007 endif
3008
3009 if HAVE_BLKID
3010 libudev_core_la_SOURCES += \
3011 src/udev/udev-builtin-blkid.c
3012 endif
3013
3014 if HAVE_ACL
3015 libudev_core_la_SOURCES += \
3016 src/udev/udev-builtin-uaccess.c \
3017 src/login/logind-acl.c \
3018 src/libsystemd/sd-login/sd-login.c \
3019 src/systemd/sd-login.h
3020
3021 libudev_core_la_LIBADD += \
3022 libsystemd-acl.la
3023 endif
3024
3025 systemd_udevd_SOURCES = \
3026 src/udev/udevd.c
3027
3028 systemd_udevd_LDADD = \
3029 libudev-core.la
3030
3031 udevadm_SOURCES = \
3032 src/udev/udevadm.c \
3033 src/udev/udevadm-info.c \
3034 src/udev/udevadm-control.c \
3035 src/udev/udevadm-monitor.c \
3036 src/udev/udevadm-hwdb.c \
3037 src/udev/udevadm-settle.c \
3038 src/udev/udevadm-trigger.c \
3039 src/udev/udevadm-test.c \
3040 src/udev/udevadm-test-builtin.c
3041
3042 udevadm_LDADD = \
3043 libudev-core.la
3044
3045 # Update hwdb on installation. Do not bother if installing
3046 # in DESTDIR, since this is likely for packaging purposes.
3047 hwdb-update-hook:
3048 -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
3049
3050 INSTALL_DATA_HOOKS += \
3051 hwdb-update-hook
3052
3053 hwdb-remove-hook:
3054 -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
3055
3056 # ------------------------------------------------------------------------------
3057 TESTS += \
3058 test/udev-test.pl \
3059 test/rules-test.sh
3060
3061 manual_tests += \
3062 test-libudev \
3063 test-udev
3064
3065 test_libudev_SOURCES = \
3066 src/test/test-libudev.c
3067
3068 test_libudev_LDADD = \
3069 libsystemd-label.la \
3070 libudev-internal.la \
3071 libsystemd-shared.la
3072
3073 test_udev_SOURCES = \
3074 src/test/test-udev.c
3075
3076 test_udev_LDADD = \
3077 libudev-core.la \
3078 $(BLKID_LIBS) \
3079 $(KMOD_LIBS) \
3080 $(SELINUX_LIBS)
3081
3082 if HAVE_ACL
3083 test_udev_LDADD += \
3084 libsystemd-acl.la
3085 endif
3086
3087 check_DATA += \
3088 test/sys
3089
3090 # packed sysfs test tree
3091 test/sys:
3092 $(AM_V_at)$(MKDIR_P) $(dir $@)
3093 $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
3094
3095 test-sys-distclean:
3096 -rm -rf test/sys
3097 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
3098
3099 EXTRA_DIST += \
3100 test/sys.tar.xz \
3101 test/udev-test.pl \
3102 test/rules-test.sh \
3103 test/rule-syntax-check.py
3104
3105 # ------------------------------------------------------------------------------
3106 ata_id_SOURCES = \
3107 src/udev/ata_id/ata_id.c
3108
3109 ata_id_LDADD = \
3110 libudev-internal.la \
3111 libsystemd-shared.la
3112
3113 udevlibexec_PROGRAMS += \
3114 ata_id
3115
3116 # ------------------------------------------------------------------------------
3117 cdrom_id_SOURCES = \
3118 src/udev/cdrom_id/cdrom_id.c
3119
3120 cdrom_id_LDADD = \
3121 libudev-internal.la \
3122 libsystemd-shared.la
3123
3124 udevlibexec_PROGRAMS += \
3125 cdrom_id
3126
3127 dist_udevrules_DATA += \
3128 rules/60-cdrom_id.rules
3129
3130 # ------------------------------------------------------------------------------
3131 collect_SOURCES = \
3132 src/udev/collect/collect.c
3133
3134 collect_LDADD = \
3135 libudev-internal.la \
3136 libsystemd-shared.la
3137
3138 udevlibexec_PROGRAMS += \
3139 collect
3140
3141 # ------------------------------------------------------------------------------
3142 scsi_id_SOURCES =\
3143 src/udev/scsi_id/scsi_id.c \
3144 src/udev/scsi_id/scsi_serial.c \
3145 src/udev/scsi_id/scsi.h \
3146 src/udev/scsi_id/scsi_id.h
3147
3148 scsi_id_LDADD = \
3149 libudev-internal.la \
3150 libsystemd-shared.la
3151
3152 udevlibexec_PROGRAMS += \
3153 scsi_id
3154
3155 EXTRA_DIST += \
3156 src/udev/scsi_id/README
3157
3158 # ------------------------------------------------------------------------------
3159 v4l_id_SOURCES = \
3160 src/udev/v4l_id/v4l_id.c
3161
3162 v4l_id_LDADD = \
3163 libudev-internal.la
3164
3165 udevlibexec_PROGRAMS += \
3166 v4l_id
3167
3168 dist_udevrules_DATA += \
3169 rules/60-persistent-v4l.rules
3170
3171 # ------------------------------------------------------------------------------
3172 accelerometer_SOURCES = \
3173 src/udev/accelerometer/accelerometer.c
3174
3175 accelerometer_LDADD = \
3176 libudev-internal.la -lm \
3177 libsystemd-shared.la
3178
3179 udevlibexec_PROGRAMS += \
3180 accelerometer
3181
3182 dist_udevrules_DATA += \
3183 rules/61-accelerometer.rules
3184
3185 # ------------------------------------------------------------------------------
3186 if ENABLE_GUDEV
3187 if ENABLE_GTK_DOC
3188 SUBDIRS += \
3189 docs/gudev
3190 endif
3191
3192 libgudev_includedir = \
3193 $(includedir)/gudev-1.0/gudev
3194
3195 libgudev_include_HEADERS = \
3196 src/gudev/gudev.h \
3197 src/gudev/gudevenums.h \
3198 src/gudev/gudevenumtypes.h \
3199 src/gudev/gudevtypes.h \
3200 src/gudev/gudevclient.h \
3201 src/gudev/gudevdevice.h \
3202 src/gudev/gudevenumerator.h
3203
3204 lib_LTLIBRARIES += libgudev-1.0.la
3205
3206 pkgconfiglib_DATA += \
3207 src/gudev/gudev-1.0.pc
3208
3209 CLEANFILES += \
3210 src/gudev/gudev-1.0.pc
3211
3212 libgudev_1_0_la_SOURCES = \
3213 src/gudev/libgudev-1.0.sym \
3214 src/gudev/gudevenums.h \
3215 src/gudev/gudevenumtypes.h \
3216 src/gudev/gudevenumtypes.h\
3217 src/gudev/gudevtypes.h \
3218 src/gudev/gudevclient.h \
3219 src/gudev/gudevclient.c \
3220 src/gudev/gudevdevice.h \
3221 src/gudev/gudevdevice.c \
3222 src/gudev/gudevenumerator.h \
3223 src/gudev/gudevenumerator.c \
3224 src/gudev/gudevprivate.h
3225
3226 nodist_libgudev_1_0_la_SOURCES = \
3227 src/gudev/gudevmarshal.h \
3228 src/gudev/gudevmarshal.c \
3229 src/gudev/gudevenumtypes.h \
3230 src/gudev/gudevenumtypes.c
3231
3232 BUILT_SOURCES += \
3233 $(nodist_libgudev_1_0_la_SOURCES)
3234
3235 libgudev_1_0_la_CPPFLAGS = \
3236 $(AM_CPPFLAGS) \
3237 -I$(top_builddir)/src\
3238 -I$(top_srcdir)/src\
3239 -I$(top_builddir)/src/gudev \
3240 -I$(top_srcdir)/src/gudev \
3241 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
3242 -D_GUDEV_COMPILATION \
3243 -DG_LOG_DOMAIN=\"GUdev\"
3244
3245 libgudev_1_0_la_CFLAGS = \
3246 $(AM_CFLAGS) \
3247 -fvisibility=default \
3248 $(GLIB_CFLAGS)
3249
3250 libgudev_1_0_la_LIBADD = \
3251 libudev.la \
3252 $(GLIB_LIBS)
3253
3254 libgudev_1_0_la_LDFLAGS = \
3255 $(AM_LDFLAGS) \
3256 -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
3257 -export-dynamic \
3258 -no-undefined \
3259 -Wl,--version-script=$(top_srcdir)/src/gudev/libgudev-1.0.sym
3260
3261 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
3262 $(AM_V_at)$(MKDIR_P) $(dir $@)
3263 $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
3264
3265 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
3266 $(AM_V_at)$(MKDIR_P) $(dir $@)
3267 $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
3268 glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
3269
3270 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
3271 $(AM_V_at)$(MKDIR_P) $(dir $@)
3272 $(AM_V_GEN)glib-mkenums --template $^ > $@
3273
3274 if HAVE_INTROSPECTION
3275 -include $(INTROSPECTION_MAKEFILE)
3276
3277 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
3278
3279 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
3280
3281 src_gudev_GUdev_1_0_gir_CFLAGS = \
3282 $(AM_CFLAGS) \
3283 $(INCLUDES) \
3284 -D_GUDEV_COMPILATION \
3285 -D_GUDEV_WORK_AROUND_DEV_T_BUG \
3286 -I$(top_srcdir)/src \
3287 -I$(top_builddir)/src \
3288 -I$(top_srcdir)/src/gudev \
3289 -I$(top_builddir)/src/gudev
3290
3291 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
3292
3293 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
3294 --pkg-export=gudev-1.0 \
3295 --warn-all
3296
3297 src_gudev_GUdev_1_0_gir_FILES = \
3298 src/gudev/gudev.h \
3299 src/gudev/gudevtypes.h \
3300 src/gudev/gudevenums.h \
3301 src/gudev/gudevenumtypes.h \
3302 src/gudev/gudevclient.h \
3303 src/gudev/gudevdevice.h \
3304 src/gudev/gudevenumerator.h \
3305 src/gudev/gudevclient.c \
3306 src/gudev/gudevdevice.c \
3307 src/gudev/gudevenumerator.c
3308
3309 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
3310 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
3311
3312 girdir = $(datadir)/gir-1.0
3313 gir_DATA = \
3314 src/gudev/GUdev-1.0.gir
3315
3316 typelibsdir = $(libdir)/girepository-1.0
3317 typelibs_DATA = \
3318 src/gudev/GUdev-1.0.typelib
3319
3320 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
3321 endif # HAVE_INTROSPECTION
3322
3323 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3324 libgudev-install-hook:
3325 libname=libgudev-1.0.so && $(move-to-rootlibdir)
3326
3327 libgudev-uninstall-hook:
3328 rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
3329
3330 INSTALL_EXEC_HOOKS += libgudev-install-hook
3331 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-hook
3332 endif
3333
3334 EXTRA_DIST += \
3335 src/gudev/gudev-1.0.pc.in \
3336 src/gudev/gudevmarshal.list \
3337 src/gudev/gudevenumtypes.h.template \
3338 src/gudev/gudevenumtypes.c.template \
3339 src/gudev/gjs-example.js \
3340 src/gudev/seed-example-enum.js \
3341 src/gudev/seed-example.js
3342
3343 # ------------------------------------------------------------------------------
3344 mtd_probe_SOURCES = \
3345 src/udev/mtd_probe/mtd_probe.c \
3346 src/udev/mtd_probe/mtd_probe.h \
3347 src/udev/mtd_probe/probe_smartmedia.c
3348
3349 dist_udevrules_DATA += \
3350 rules/75-probe_mtd.rules
3351
3352 udevlibexec_PROGRAMS += \
3353 mtd_probe
3354
3355 # ------------------------------------------------------------------------------
3356 test_id128_SOURCES = \
3357 src/test/test-id128.c
3358
3359 test_id128_LDADD = \
3360 libsystemd-internal.la \
3361 libsystemd-shared.la
3362
3363 tests += \
3364 test-id128
3365
3366 # ------------------------------------------------------------------------------
3367
3368 rootlibexec_PROGRAMS += \
3369 systemd-activate
3370
3371 systemd_activate_SOURCES = \
3372 src/activate/activate.c
3373
3374 systemd_activate_LDADD = \
3375 libsystemd-label.la \
3376 libsystemd-internal.la \
3377 libsystemd-shared.la
3378
3379 # ------------------------------------------------------------------------------
3380 systemd_journald_SOURCES = \
3381 src/journal/journald.c \
3382 src/journal/journald-server.h
3383
3384 systemd_journald_LDADD = \
3385 libsystemd-journal-core.la \
3386 libsystemd-internal.la \
3387 libsystemd-shared.la
3388
3389 systemd_cat_SOURCES = \
3390 src/journal/cat.c
3391
3392 systemd_cat_LDADD = \
3393 libsystemd-journal-core.la
3394
3395 if HAVE_MICROHTTPD
3396 rootlibexec_PROGRAMS += \
3397 systemd-journal-remote
3398
3399 systemd_journal_remote_SOURCES = \
3400 src/journal/journal-remote-parse.h \
3401 src/journal/journal-remote-parse.c \
3402 src/journal/journal-remote-write.h \
3403 src/journal/journal-remote-write.c \
3404 src/journal/journal-remote.c
3405
3406 systemd_journal_remote_LDADD = \
3407 libsystemd-internal.la \
3408 libsystemd-journal-core.la
3409
3410 systemd_journal_remote_SOURCES += \
3411 src/journal/microhttpd-util.h \
3412 src/journal/microhttpd-util.c
3413
3414 systemd_journal_remote_CFLAGS = \
3415 $(AM_CFLAGS) \
3416 $(MICROHTTPD_CFLAGS)
3417
3418 systemd_journal_remote_LDADD += \
3419 $(MICROHTTPD_LIBS)
3420
3421 if HAVE_GNUTLS
3422 systemd_journal_remote_LDADD += \
3423 $(GNUTLS_LIBS)
3424 endif
3425 endif
3426
3427 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3428 journalctl_CFLAGS = \
3429 $(AM_CFLAGS)
3430
3431 journalctl_SOURCES = \
3432 src/journal/journalctl.c
3433
3434 journalctl_LDADD = \
3435 libsystemd-journal-internal.la \
3436 libsystemd-internal.la \
3437 libsystemd-logs.la \
3438 libsystemd-shared.la
3439
3440 if HAVE_ACL
3441 journalctl_LDADD += \
3442 libsystemd-acl.la
3443 endif
3444
3445 if HAVE_QRENCODE
3446 journalctl_SOURCES += \
3447 src/journal/journal-qrcode.c \
3448 src/journal/journal-qrcode.h
3449
3450 journalctl_CFLAGS += \
3451 $(QRENCODE_CFLAGS)
3452
3453 journalctl_LDADD += \
3454 $(QRENCODE_LIBS)
3455 endif
3456
3457 test_journal_SOURCES = \
3458 src/journal/test-journal.c
3459
3460 test_journal_LDADD = \
3461 libsystemd-journal-core.la
3462
3463 test_journal_send_SOURCES = \
3464 src/journal/test-journal-send.c
3465
3466 test_journal_send_LDADD = \
3467 libsystemd-journal-core.la
3468
3469 test_journal_syslog_SOURCES = \
3470 src/journal/test-journal-syslog.c
3471
3472 test_journal_syslog_LDADD = \
3473 libsystemd-journal-core.la
3474
3475 test_journal_match_SOURCES = \
3476 src/journal/test-journal-match.c
3477
3478 test_journal_match_LDADD = \
3479 libsystemd-journal-core.la
3480
3481 test_journal_enum_SOURCES = \
3482 src/journal/test-journal-enum.c
3483
3484 test_journal_enum_LDADD = \
3485 libsystemd-journal-core.la
3486
3487 test_journal_stream_SOURCES = \
3488 src/journal/test-journal-stream.c
3489
3490 test_journal_stream_LDADD = \
3491 libsystemd-journal-core.la
3492
3493 test_journal_flush_SOURCES = \
3494 src/journal/test-journal-flush.c
3495
3496 test_journal_flush_LDADD = \
3497 libsystemd-journal-core.la
3498
3499 test_journal_init_SOURCES = \
3500 src/journal/test-journal-init.c
3501
3502 test_journal_init_LDADD = \
3503 libsystemd-journal-core.la
3504
3505 test_journal_verify_SOURCES = \
3506 src/journal/test-journal-verify.c
3507
3508 test_journal_verify_LDADD = \
3509 libsystemd-journal-core.la
3510
3511 test_journal_interleaving_SOURCES = \
3512 src/journal/test-journal-interleaving.c
3513
3514 test_journal_interleaving_LDADD = \
3515 libsystemd-journal-core.la
3516
3517 test_mmap_cache_SOURCES = \
3518 src/journal/test-mmap-cache.c
3519
3520 test_mmap_cache_LDADD = \
3521 libsystemd-journal-core.la
3522
3523 test_catalog_SOURCES = \
3524 src/journal/test-catalog.c
3525
3526 test_catalog_CPPFLAGS = \
3527 $(AM_CPPFLAGS) \
3528 -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
3529
3530 test_catalog_LDADD = \
3531 libsystemd-journal-core.la
3532
3533 if HAVE_XZ
3534 test_compress_SOURCES = \
3535 src/journal/test-compress.c
3536
3537 test_compress_LDADD = \
3538 libsystemd-journal-internal.la \
3539 libsystemd-shared.la
3540 endif
3541
3542 libsystemd_journal_core_la_SOURCES = \
3543 src/journal/journald-kmsg.c \
3544 src/journal/journald-kmsg.h \
3545 src/journal/journald-syslog.c \
3546 src/journal/journald-syslog.h \
3547 src/journal/journald-stream.c \
3548 src/journal/journald-stream.h \
3549 src/journal/journald-server.c \
3550 src/journal/journald-server.h \
3551 src/journal/journald-console.c \
3552 src/journal/journald-console.h \
3553 src/journal/journald-wall.c \
3554 src/journal/journald-wall.h \
3555 src/journal/journald-native.c \
3556 src/journal/journald-native.h \
3557 src/journal/journald-rate-limit.c \
3558 src/journal/journald-rate-limit.h \
3559 src/journal/journal-internal.h
3560
3561 nodist_libsystemd_journal_core_la_SOURCES = \
3562 src/journal/journald-gperf.c
3563
3564 libsystemd_journal_core_la_LIBADD = \
3565 libsystemd-journal-internal.la \
3566 libudev-internal.la \
3567 libsystemd-capability.la \
3568 libsystemd-label.la \
3569 libsystemd-internal.la \
3570 libsystemd-shared.la
3571
3572 if HAVE_ACL
3573 libsystemd_journal_core_la_LIBADD += \
3574 libsystemd-acl.la
3575 endif
3576
3577 noinst_LTLIBRARIES += \
3578 libsystemd-journal-core.la
3579
3580 journal-install-hook:
3581 -$(MKDIR_P) $(DESTDIR)/var/log/journal
3582 -chown 0:0 $(DESTDIR)/var/log/journal
3583 -chmod 755 $(DESTDIR)/var/log/journal
3584 -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
3585 -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
3586
3587 journal-uninstall-hook:
3588 -rmdir $(DESTDIR)/var/log/journal/
3589
3590 INSTALL_EXEC_HOOKS += journal-install-hook
3591 UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
3592
3593 # ------------------------------------------------------------------------------
3594 # Update catalog on installation. Do not bother if installing
3595 # in DESTDIR, since this is likely for packaging purposes.
3596 catalog-update-hook:
3597 -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
3598
3599 INSTALL_DATA_HOOKS += \
3600 catalog-update-hook
3601
3602 catalog-remove-hook:
3603 -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
3604
3605 UNINSTALL_DATA_HOOKS += \
3606 catalog-remove-hook
3607
3608 manual_tests += \
3609 test-journal-enum
3610
3611 tests += \
3612 test-journal \
3613 test-journal-send \
3614 test-journal-syslog \
3615 test-journal-match \
3616 test-journal-stream \
3617 test-journal-init \
3618 test-journal-verify \
3619 test-journal-interleaving \
3620 test-journal-flush \
3621 test-mmap-cache \
3622 test-catalog
3623
3624 if HAVE_XZ
3625 tests += test-compress
3626 endif
3627
3628 pkginclude_HEADERS += \
3629 src/systemd/sd-journal.h \
3630 src/systemd/sd-messages.h \
3631 src/systemd/_sd-common.h
3632
3633 libsystemd_journal_internal_la_SOURCES = \
3634 src/journal/sd-journal.c \
3635 src/systemd/sd-journal.h \
3636 src/systemd/_sd-common.h \
3637 src/journal/journal-file.c \
3638 src/journal/journal-file.h \
3639 src/journal/journal-vacuum.c \
3640 src/journal/journal-vacuum.h \
3641 src/journal/journal-verify.c \
3642 src/journal/journal-verify.h \
3643 src/journal/lookup3.c \
3644 src/journal/lookup3.h \
3645 src/journal/journal-send.c \
3646 src/journal/journal-def.h \
3647 src/journal/compress.h \
3648 src/journal/catalog.c \
3649 src/journal/catalog.h \
3650 src/journal/mmap-cache.c \
3651 src/journal/mmap-cache.h
3652
3653 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3654 libsystemd_journal_internal_la_CFLAGS = \
3655 $(AM_CFLAGS)
3656
3657 libsystemd_journal_internal_la_LIBADD =
3658
3659 if HAVE_XZ
3660 libsystemd_journal_internal_la_SOURCES += \
3661 src/journal/compress.c
3662
3663 libsystemd_journal_internal_la_CFLAGS += \
3664 $(XZ_CFLAGS)
3665
3666 libsystemd_journal_internal_la_LIBADD += \
3667 $(XZ_LIBS)
3668 endif
3669
3670 if HAVE_GCRYPT
3671 libsystemd_journal_internal_la_SOURCES += \
3672 src/journal/journal-authenticate.c \
3673 src/journal/journal-authenticate.h \
3674 src/journal/fsprg.c \
3675 src/journal/fsprg.h
3676
3677 libsystemd_journal_internal_la_LIBADD += \
3678 $(GCRYPT_LIBS)
3679
3680 # fsprg.c is a drop-in file using void pointer arithmetic
3681 libsystemd_journal_internal_la_CFLAGS += \
3682 $(GCRYPT_CFLAGS) \
3683 -Wno-pointer-arith
3684 endif
3685
3686 noinst_LTLIBRARIES += \
3687 libsystemd-journal-internal.la
3688
3689 rootlibexec_PROGRAMS += \
3690 systemd-journald
3691
3692 rootbin_PROGRAMS += \
3693 journalctl
3694
3695 bin_PROGRAMS += \
3696 systemd-cat
3697
3698 dist_systemunit_DATA += \
3699 units/systemd-journald.socket \
3700 units/systemd-journald-dev-log.socket
3701
3702 nodist_systemunit_DATA += \
3703 units/systemd-journald.service \
3704 units/systemd-journal-flush.service \
3705 units/systemd-journal-catalog-update.service
3706
3707 dist_pkgsysconf_DATA += \
3708 src/journal/journald.conf
3709
3710 dist_catalog_DATA = \
3711 catalog/systemd.fr.catalog \
3712 catalog/systemd.ru.catalog \
3713 catalog/systemd.it.catalog \
3714 catalog/systemd.catalog
3715
3716 SOCKETS_TARGET_WANTS += \
3717 systemd-journald.socket \
3718 systemd-journald-dev-log.socket
3719
3720 SYSINIT_TARGET_WANTS += \
3721 systemd-journald.service \
3722 systemd-journal-flush.service \
3723 systemd-journal-catalog-update.service
3724
3725 EXTRA_DIST += \
3726 units/systemd-journald.service.in \
3727 units/systemd-journal-flush.service.in \
3728 units/systemd-journal-catalog-update.service.in \
3729 src/journal/journald-gperf.gperf
3730
3731 CLEANFILES += \
3732 src/journal/journald-gperf.c
3733
3734 # ------------------------------------------------------------------------------
3735 if HAVE_MICROHTTPD
3736 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
3737
3738 rootlibexec_PROGRAMS += \
3739 systemd-journal-gatewayd
3740
3741 systemd_journal_gatewayd_SOURCES = \
3742 src/journal/journal-gatewayd.c \
3743 src/journal/microhttpd-util.h \
3744 src/journal/microhttpd-util.c
3745
3746 systemd_journal_gatewayd_LDADD = \
3747 libsystemd-logs.la \
3748 libsystemd-journal-internal.la \
3749 libsystemd-internal.la \
3750 libsystemd-shared.la \
3751 $(MICROHTTPD_LIBS)
3752
3753 if HAVE_GNUTLS
3754 systemd_journal_gatewayd_LDADD += \
3755 $(GNUTLS_LIBS)
3756 endif
3757
3758 systemd_journal_gatewayd_CFLAGS = \
3759 $(AM_CFLAGS) \
3760 $(MICROHTTPD_CFLAGS)
3761
3762 systemd_journal_gatewayd_CPPFLAGS = \
3763 $(AM_CPPFLAGS) \
3764 -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
3765
3766 dist_systemunit_DATA += \
3767 units/systemd-journal-gatewayd.socket
3768
3769 nodist_systemunit_DATA += \
3770 units/systemd-journal-gatewayd.service
3771
3772 dist_gatewayddocumentroot_DATA = \
3773 src/journal/browse.html
3774
3775 endif
3776
3777 EXTRA_DIST += \
3778 units/systemd-journal-gatewayd.service.in
3779
3780 # ------------------------------------------------------------------------------
3781
3782 systemd_socket_proxyd_SOURCES = \
3783 src/socket-proxy/socket-proxyd.c
3784
3785 systemd_socket_proxyd_LDADD = \
3786 libsystemd-logs.la \
3787 libsystemd-internal.la \
3788 libsystemd-journal-internal.la \
3789 libsystemd-shared.la \
3790 libsystemd-resolve.la
3791
3792 # ------------------------------------------------------------------------------
3793 if ENABLE_COREDUMP
3794 systemd_coredump_SOURCES = \
3795 src/journal/coredump.c \
3796 src/journal/coredump-vacuum.c \
3797 src/journal/coredump-vacuum.h
3798
3799 systemd_coredump_LDADD = \
3800 libsystemd-journal-internal.la \
3801 libsystemd-label.la \
3802 libsystemd-internal.la \
3803 libsystemd-shared.la
3804
3805 if HAVE_ELFUTILS
3806 systemd_coredump_SOURCES += \
3807 src/journal/stacktrace.c \
3808 src/journal/stacktrace.h
3809
3810 systemd_coredump_LDADD += \
3811 $(ELFUTILS_LIBS)
3812 endif
3813
3814 rootlibexec_PROGRAMS += \
3815 systemd-coredump
3816
3817 dist_pkgsysconf_DATA += \
3818 src/journal/coredump.conf
3819
3820 if HAVE_ACL
3821 systemd_coredump_LDADD += \
3822 libsystemd-acl.la
3823 endif
3824
3825 coredumpctl_SOURCES = \
3826 src/journal/coredumpctl.c
3827
3828 coredumpctl_LDADD = \
3829 libsystemd-journal-internal.la \
3830 libsystemd-internal.la \
3831 libsystemd-shared.la
3832
3833 bin_PROGRAMS += \
3834 coredumpctl
3835
3836 manual_tests += \
3837 test-coredump-vacuum
3838
3839 test_coredump_vacuum_SOURCES = \
3840 src/journal/test-coredump-vacuum.c \
3841 src/journal/coredump-vacuum.c \
3842 src/journal/coredump-vacuum.h
3843
3844 test_coredump_vacuum_LDADD = \
3845 libsystemd-internal.la \
3846 libsystemd-shared.la
3847
3848 dist_bashcompletion_DATA += \
3849 shell-completion/bash/coredumpctl
3850
3851 dist_zshcompletion_DATA += \
3852 shell-completion/zsh/_coredumpctl
3853
3854 GENERAL_ALIASES += \
3855 $(bindir)/coredumpctl $(bindir)/systemd-coredumpctl
3856
3857 sysctl_DATA = \
3858 sysctl.d/50-coredump.conf
3859
3860 CLEANFILES += \
3861 sysctl.d/50-coredump.conf
3862 endif
3863
3864 EXTRA_DIST += \
3865 sysctl.d/50-coredump.conf.in
3866
3867 # ------------------------------------------------------------------------------
3868 if ENABLE_BINFMT
3869 systemd_binfmt_SOURCES = \
3870 src/binfmt/binfmt.c
3871
3872 systemd_binfmt_LDADD = \
3873 libsystemd-shared.la
3874
3875 rootlibexec_PROGRAMS += \
3876 systemd-binfmt
3877
3878 dist_systemunit_DATA += \
3879 units/proc-sys-fs-binfmt_misc.automount \
3880 units/proc-sys-fs-binfmt_misc.mount
3881
3882 nodist_systemunit_DATA += \
3883 units/systemd-binfmt.service
3884
3885 INSTALL_DIRS += \
3886 $(prefix)/lib/binfmt.d \
3887 $(sysconfdir)/binfmt.d
3888
3889 SYSINIT_TARGET_WANTS += \
3890 systemd-binfmt.service \
3891 proc-sys-fs-binfmt_misc.automount
3892
3893 endif
3894
3895 EXTRA_DIST += \
3896 units/systemd-binfmt.service.in
3897
3898 # ------------------------------------------------------------------------------
3899 if ENABLE_VCONSOLE
3900 systemd_vconsole_setup_SOURCES = \
3901 src/vconsole/vconsole-setup.c
3902
3903 systemd_vconsole_setup_LDADD = \
3904 libsystemd-shared.la
3905
3906 rootlibexec_PROGRAMS += \
3907 systemd-vconsole-setup
3908
3909 nodist_systemunit_DATA += \
3910 units/systemd-vconsole-setup.service
3911
3912 SYSINIT_TARGET_WANTS += \
3913 systemd-vconsole-setup.service
3914 endif
3915
3916 EXTRA_DIST += \
3917 units/systemd-vconsole-setup.service.in
3918
3919 # ------------------------------------------------------------------------------
3920 if ENABLE_READAHEAD
3921 systemd_readahead_SOURCES = \
3922 src/readahead/readahead.c \
3923 src/readahead/readahead-collect.c \
3924 src/readahead/readahead-replay.c \
3925 src/readahead/readahead-analyze.c \
3926 src/readahead/readahead-common.c \
3927 src/readahead/readahead-common.h
3928
3929 systemd_readahead_LDADD = \
3930 libsystemd-internal.la \
3931 libudev-internal.la \
3932 libsystemd-shared.la
3933
3934 dist_doc_DATA += \
3935 src/readahead/sd-readahead.c \
3936 src/systemd/sd-readahead.h
3937
3938 rootlibexec_PROGRAMS += \
3939 systemd-readahead
3940
3941 dist_systemunit_DATA += \
3942 units/systemd-readahead-drop.service \
3943 units/systemd-readahead-done.timer
3944
3945 nodist_systemunit_DATA += \
3946 units/systemd-readahead-collect.service \
3947 units/systemd-readahead-replay.service \
3948 units/systemd-readahead-done.service
3949
3950 manual_tests += \
3951 test-ssd
3952
3953 test_ssd_SOURCES = \
3954 src/readahead/test-ssd.c \
3955 src/readahead/readahead-common.c \
3956 src/readahead/readahead-common.h
3957
3958 test_ssd_LDADD = \
3959 libsystemd-internal.la \
3960 libudev-internal.la \
3961 libsystemd-shared.la
3962
3963 endif
3964
3965 EXTRA_DIST += \
3966 units/systemd-readahead-collect.service.in \
3967 units/systemd-readahead-replay.service.in \
3968 units/systemd-readahead-done.service.in
3969
3970 # ------------------------------------------------------------------------------
3971 if ENABLE_BOOTCHART
3972 systemd_bootchart_SOURCES = \
3973 src/bootchart/bootchart.c \
3974 src/bootchart/bootchart.h \
3975 src/bootchart/store.c \
3976 src/bootchart/store.h \
3977 src/bootchart/svg.c \
3978 src/bootchart/svg.h
3979
3980 systemd_bootchart_LDADD = \
3981 libsystemd-journal-internal.la \
3982 libsystemd-shared.la
3983
3984 rootlibexec_PROGRAMS += \
3985 systemd-bootchart
3986
3987 dist_pkgsysconf_DATA += \
3988 src/bootchart/bootchart.conf
3989 endif
3990
3991 # ------------------------------------------------------------------------------
3992 if ENABLE_QUOTACHECK
3993 rootlibexec_PROGRAMS += \
3994 systemd-quotacheck
3995
3996 nodist_systemunit_DATA += \
3997 units/systemd-quotacheck.service
3998
3999 systemd_quotacheck_SOURCES = \
4000 src/quotacheck/quotacheck.c
4001
4002 systemd_quotacheck_LDADD = \
4003 libsystemd-shared.la
4004 endif
4005
4006 EXTRA_DIST += \
4007 units/systemd-quotacheck.service.in
4008
4009 nodist_systemunit_DATA += \
4010 units/quotaon.service
4011
4012 # ------------------------------------------------------------------------------
4013 if ENABLE_RANDOMSEED
4014 rootlibexec_PROGRAMS += \
4015 systemd-random-seed
4016
4017 nodist_systemunit_DATA += \
4018 units/systemd-random-seed.service
4019
4020 systemd_random_seed_SOURCES = \
4021 src/random-seed/random-seed.c
4022
4023 systemd_random_seed_LDADD = \
4024 libsystemd-label.la \
4025 libsystemd-shared.la
4026
4027 SYSINIT_TARGET_WANTS += \
4028 systemd-random-seed.service
4029
4030 endif
4031
4032 EXTRA_DIST += \
4033 units/systemd-random-seed.service.in
4034
4035 # ------------------------------------------------------------------------------
4036 if ENABLE_BACKLIGHT
4037 rootlibexec_PROGRAMS += \
4038 systemd-backlight
4039
4040 nodist_systemunit_DATA += \
4041 units/systemd-backlight@.service
4042
4043 systemd_backlight_SOURCES = \
4044 src/backlight/backlight.c
4045
4046 systemd_backlight_LDADD = \
4047 libsystemd-label.la \
4048 libudev-internal.la \
4049 libsystemd-shared.la
4050 endif
4051
4052 EXTRA_DIST += \
4053 units/systemd-backlight@.service.in
4054
4055 # ------------------------------------------------------------------------------
4056 if ENABLE_RFKILL
4057 rootlibexec_PROGRAMS += \
4058 systemd-rfkill
4059
4060 nodist_systemunit_DATA += \
4061 units/systemd-rfkill@.service
4062
4063 systemd_rfkill_SOURCES = \
4064 src/rfkill/rfkill.c
4065
4066 systemd_rfkill_LDADD = \
4067 libsystemd-label.la \
4068 libudev-internal.la \
4069 libsystemd-shared.la
4070 endif
4071
4072 EXTRA_DIST += \
4073 units/systemd-rfkill@.service.in
4074
4075 # ------------------------------------------------------------------------------
4076 if HAVE_LIBCRYPTSETUP
4077 rootlibexec_PROGRAMS += \
4078 systemd-cryptsetup
4079
4080 systemgenerator_PROGRAMS += \
4081 systemd-cryptsetup-generator
4082
4083 dist_systemunit_DATA += \
4084 units/cryptsetup.target \
4085 units/cryptsetup-pre.target
4086
4087 systemd_cryptsetup_SOURCES = \
4088 src/cryptsetup/cryptsetup.c
4089
4090 systemd_cryptsetup_CFLAGS = \
4091 $(AM_CFLAGS) \
4092 $(LIBCRYPTSETUP_CFLAGS)
4093
4094 systemd_cryptsetup_LDADD = \
4095 libsystemd-label.la \
4096 libudev-internal.la \
4097 libsystemd-shared.la \
4098 $(LIBCRYPTSETUP_LIBS)
4099
4100 systemd_cryptsetup_generator_SOURCES = \
4101 src/cryptsetup/cryptsetup-generator.c
4102
4103 systemd_cryptsetup_generator_LDADD = \
4104 libsystemd-label.la \
4105 libsystemd-shared.la
4106
4107 SYSINIT_TARGET_WANTS += \
4108 cryptsetup.target
4109
4110 endif
4111
4112 # ------------------------------------------------------------------------------
4113 if ENABLE_HOSTNAMED
4114 systemd_hostnamed_SOURCES = \
4115 src/hostname/hostnamed.c
4116
4117 systemd_hostnamed_LDADD = \
4118 libsystemd-label.la \
4119 libsystemd-internal.la \
4120 libsystemd-shared.la
4121
4122 rootlibexec_PROGRAMS += \
4123 systemd-hostnamed
4124
4125 nodist_systemunit_DATA += \
4126 units/systemd-hostnamed.service
4127
4128 dist_systemunit_DATA += \
4129 units/org.freedesktop.hostname1.busname
4130
4131 dist_dbuspolicy_DATA += \
4132 src/hostname/org.freedesktop.hostname1.conf
4133
4134 dist_dbussystemservice_DATA += \
4135 src/hostname/org.freedesktop.hostname1.service
4136
4137 polkitpolicy_files += \
4138 src/hostname/org.freedesktop.hostname1.policy
4139
4140 SYSTEM_UNIT_ALIASES += \
4141 systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
4142
4143 BUSNAMES_TARGET_WANTS += \
4144 org.freedesktop.hostname1.busname
4145
4146 hostnamectl_SOURCES = \
4147 src/hostname/hostnamectl.c
4148
4149 hostnamectl_LDADD = \
4150 libsystemd-internal.la \
4151 libsystemd-shared.la
4152
4153 bin_PROGRAMS += \
4154 hostnamectl
4155
4156 dist_bashcompletion_DATA += \
4157 shell-completion/bash/hostnamectl
4158
4159 dist_zshcompletion_DATA += \
4160 shell-completion/zsh/_hostnamectl
4161
4162 endif
4163
4164 polkitpolicy_in_files += \
4165 src/hostname/org.freedesktop.hostname1.policy.in
4166
4167 EXTRA_DIST += \
4168 units/systemd-hostnamed.service.in
4169
4170 # ------------------------------------------------------------------------------
4171 if ENABLE_KDBUS
4172 dist_systemunit_DATA += \
4173 units/org.freedesktop.systemd1.busname
4174
4175 BUSNAMES_TARGET_WANTS += \
4176 org.freedesktop.systemd1.busname
4177 endif
4178
4179 # ------------------------------------------------------------------------------
4180 if ENABLE_LOCALED
4181 systemd_localed_SOURCES = \
4182 src/locale/localed.c
4183
4184 systemd_localed_LDADD = \
4185 libsystemd-label.la \
4186 libsystemd-internal.la \
4187 libsystemd-shared.la
4188
4189 nodist_systemunit_DATA += \
4190 units/systemd-localed.service
4191
4192 dist_systemunit_DATA += \
4193 units/org.freedesktop.locale1.busname
4194
4195 rootlibexec_PROGRAMS += \
4196 systemd-localed
4197
4198 dist_dbuspolicy_DATA += \
4199 src/locale/org.freedesktop.locale1.conf
4200
4201 dist_dbussystemservice_DATA += \
4202 src/locale/org.freedesktop.locale1.service
4203
4204 polkitpolicy_files += \
4205 src/locale/org.freedesktop.locale1.policy
4206
4207 SYSTEM_UNIT_ALIASES += \
4208 systemd-localed.service dbus-org.freedesktop.locale1.service
4209
4210 BUSNAMES_TARGET_WANTS += \
4211 org.freedesktop.locale1.busname
4212
4213 dist_pkgdata_DATA += \
4214 src/locale/kbd-model-map
4215
4216 dist_noinst_SCRIPT = \
4217 src/locale/generate-kbd-model-map
4218
4219 update-kbd-model-map: src/locale/generate-kbd-model-map
4220 $PYTHON $< >src/locale/kbd-model-map
4221
4222 localectl_SOURCES = \
4223 src/locale/localectl.c
4224
4225 localectl_LDADD = \
4226 libsystemd-internal.la \
4227 libsystemd-shared.la
4228
4229 bin_PROGRAMS += \
4230 localectl
4231
4232 dist_bashcompletion_DATA += \
4233 shell-completion/bash/localectl
4234
4235 dist_zshcompletion_DATA += \
4236 shell-completion/zsh/_localectl
4237
4238 endif
4239
4240 .PHONY: update-kbd-model-map
4241
4242 polkitpolicy_in_files += \
4243 src/locale/org.freedesktop.locale1.policy.in
4244
4245 EXTRA_DIST += \
4246 units/systemd-localed.service.in
4247
4248 # ------------------------------------------------------------------------------
4249 if ENABLE_TIMEDATED
4250 systemd_timedated_SOURCES = \
4251 src/timedate/timedated.c
4252
4253 systemd_timedated_LDADD = \
4254 libsystemd-label.la \
4255 libsystemd-internal.la \
4256 libsystemd-shared.la
4257
4258 rootlibexec_PROGRAMS += \
4259 systemd-timedated
4260
4261 dist_dbussystemservice_DATA += \
4262 src/timedate/org.freedesktop.timedate1.service
4263
4264 dist_dbuspolicy_DATA += \
4265 src/timedate/org.freedesktop.timedate1.conf
4266
4267 nodist_systemunit_DATA += \
4268 units/systemd-timedated.service
4269
4270 dist_systemunit_DATA += \
4271 units/org.freedesktop.timedate1.busname
4272
4273 polkitpolicy_files += \
4274 src/timedate/org.freedesktop.timedate1.policy
4275
4276 INSTALL_DIRS += \
4277 $(prefix)/lib/systemd/ntp-units.d \
4278 $(sysconfdir)/systemd/ntp-units.d
4279
4280 SYSTEM_UNIT_ALIASES += \
4281 systemd-timedated.service dbus-org.freedesktop.timedate1.service
4282
4283 BUSNAMES_TARGET_WANTS += \
4284 org.freedesktop.timedate1.busname
4285
4286 timedatectl_SOURCES = \
4287 src/timedate/timedatectl.c
4288
4289 timedatectl_LDADD = \
4290 libsystemd-internal.la \
4291 libsystemd-shared.la
4292
4293 bin_PROGRAMS += \
4294 timedatectl
4295
4296 dist_bashcompletion_DATA += \
4297 shell-completion/bash/timedatectl
4298
4299 dist_zshcompletion_DATA += \
4300 shell-completion/zsh/_timedatectl
4301 endif
4302
4303 polkitpolicy_in_files += \
4304 src/timedate/org.freedesktop.timedate1.policy.in
4305
4306 EXTRA_DIST += \
4307 units/systemd-timedated.service.in
4308
4309 # ------------------------------------------------------------------------------
4310 if ENABLE_TIMESYNCD
4311 systemd_timesyncd_SOURCES = \
4312 src/timesync/timesyncd.c \
4313 src/timesync/timesyncd.h
4314
4315 nodist_systemd_timesyncd_SOURCES = \
4316 src/timesync/timesyncd-gperf.c
4317
4318 EXTRA_DIST += \
4319 src/timesync/timesyncd-gperf.gperf
4320
4321 CLEANFILES += \
4322 src/timesync/timesyncd-gperf.c
4323
4324 systemd_timesyncd_LDADD = \
4325 libsystemd-resolve.la \
4326 libsystemd-network.la \
4327 libsystemd-label.la \
4328 libsystemd-capability.la \
4329 libsystemd-internal.la \
4330 libsystemd-shared.la \
4331 -lm
4332
4333 rootlibexec_PROGRAMS += \
4334 systemd-timesyncd
4335
4336 nodist_systemunit_DATA += \
4337 units/systemd-timesyncd.service
4338
4339 GENERAL_ALIASES += \
4340 $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-timesyncd.service
4341
4342 EXTRA_DIST += \
4343 units/systemd-timesyncd.service.in
4344
4345 nodist_pkgsysconf_DATA += \
4346 src/timesync/timesyncd.conf
4347
4348 EXTRA_DIST += \
4349 src/timesync/timesyncd.conf.in
4350
4351 CLEANFILES += \
4352 src/timesync/timesyncd.conf
4353
4354 dist_ntpunits_DATA = \
4355 src/timesync/90-systemd.list
4356
4357 endif
4358
4359 # ------------------------------------------------------------------------------
4360 if HAVE_MYHOSTNAME
4361 libnss_myhostname_la_SOURCES = \
4362 src/nss-myhostname/nss-myhostname.c \
4363 src/nss-myhostname/ifconf.h \
4364 src/nss-myhostname/netlink.c
4365
4366 libnss_myhostname_la_LDFLAGS = \
4367 $(AM_LDFLAGS) \
4368 -module \
4369 -export-dynamic \
4370 -avoid-version \
4371 -shared \
4372 -shrext .so.2
4373
4374 libnss_myhostname_la_LIBADD = \
4375 libsystemd-shared.la \
4376 libsystemd-internal.la
4377
4378 lib_LTLIBRARIES += \
4379 libnss_myhostname.la
4380 endif
4381
4382 # ------------------------------------------------------------------------------
4383 if ENABLE_MACHINED
4384 systemd_machined_SOURCES = \
4385 src/machine/machined.c \
4386 src/machine/machined.h
4387
4388 systemd_machined_LDADD = \
4389 libsystemd-machine-core.la
4390
4391 rootlibexec_PROGRAMS += \
4392 systemd-machined
4393
4394 libsystemd_machine_core_la_SOURCES = \
4395 src/machine/machined-dbus.c \
4396 src/machine/machine.c \
4397 src/machine/machine.h \
4398 src/machine/machine-dbus.c
4399
4400 libsystemd_machine_core_la_LIBADD = \
4401 libsystemd-label.la \
4402 libsystemd-internal.la \
4403 libudev-internal.la \
4404 libsystemd-shared.la
4405
4406 noinst_LTLIBRARIES += \
4407 libsystemd-machine-core.la
4408
4409 machinectl_SOURCES = \
4410 src/machine/machinectl.c
4411
4412 machinectl_LDADD = \
4413 libsystemd-internal.la \
4414 libsystemd-shared.la
4415
4416 rootbin_PROGRAMS += \
4417 machinectl
4418
4419 dist_bashcompletion_DATA += \
4420 shell-completion/bash/machinectl
4421
4422 test_machine_tables_SOURCES = \
4423 src/machine/test-machine-tables.c
4424
4425 test_machine_tables_LDADD = \
4426 libsystemd-machine-core.la
4427
4428 tests += \
4429 test-machine-tables
4430
4431 nodist_systemunit_DATA += \
4432 units/systemd-machined.service
4433
4434 dist_systemunit_DATA += \
4435 units/machine.slice \
4436 units/org.freedesktop.machine1.busname
4437
4438 dist_dbussystemservice_DATA += \
4439 src/machine/org.freedesktop.machine1.service
4440
4441 dist_dbuspolicy_DATA += \
4442 src/machine/org.freedesktop.machine1.conf
4443
4444 dist_zshcompletion_DATA += \
4445 shell-completion/zsh/_machinectl \
4446 shell-completion/zsh/_sd_machines
4447
4448 SYSTEM_UNIT_ALIASES += \
4449 systemd-machined.service dbus-org.freedesktop.machine1.service
4450
4451 BUSNAMES_TARGET_WANTS += \
4452 org.freedesktop.machine1.busname
4453
4454 EXTRA_DIST += \
4455 units/systemd-machined.service.in
4456
4457 endif
4458
4459 # ------------------------------------------------------------------------------
4460 if ENABLE_RESOLVED
4461 systemd_resolved_SOURCES = \
4462 src/resolve/resolved.h \
4463 src/resolve/resolved.c \
4464 src/resolve/resolved-manager.c
4465
4466 systemd_resolved_CFLAGS = \
4467 $(AM_CFLAGS) \
4468 $(KMOD_CFLAGS)
4469
4470 nodist_systemd_resolved_SOURCES = \
4471 src/resolve/resolved-gperf.c
4472
4473 EXTRA_DIST += \
4474 src/resolve/resolved-gperf.gperf
4475
4476 CLEANFILES += \
4477 src/resolve/resolved-gperf.c
4478
4479 systemd_resolved_LDADD = \
4480 libsystemd-capability.la \
4481 libsystemd-network.la \
4482 libsystemd-label.la \
4483 libsystemd-internal.la \
4484 libsystemd-shared.la
4485
4486 rootlibexec_PROGRAMS += \
4487 systemd-resolved
4488
4489 nodist_systemunit_DATA += \
4490 units/systemd-resolved.service
4491
4492 EXTRA_DIST += \
4493 units/systemd-resolved.service.in
4494
4495 GENERAL_ALIASES += \
4496 $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-resolved.service
4497
4498 nodist_pkgsysconf_DATA += \
4499 src/resolve/resolved.conf
4500
4501 EXTRA_DIST += \
4502 src/resolve/resolved.conf.in
4503
4504 CLEANFILES += \
4505 src/resolve/resolved.conf
4506
4507 endif
4508
4509 # ------------------------------------------------------------------------------
4510 if ENABLE_NETWORKD
4511 rootlibexec_PROGRAMS += \
4512 systemd-networkd
4513
4514 systemd_networkd_SOURCES = \
4515 src/network/networkd.c
4516
4517 systemd_networkd_LDADD = \
4518 libsystemd-networkd-core.la \
4519 libsystemd-capability.la
4520
4521 noinst_LTLIBRARIES += \
4522 libsystemd-networkd-core.la
4523
4524 libsystemd_networkd_core_la_CFLAGS = \
4525 $(AM_CFLAGS)
4526
4527 libsystemd_networkd_core_la_SOURCES = \
4528 src/libsystemd-network/network-internal.h \
4529 src/network/networkd.h \
4530 src/network/networkd-link.c \
4531 src/network/networkd-netdev.c \
4532 src/network/networkd-tunnel.c \
4533 src/network/networkd-veth.c \
4534 src/network/networkd-vxlan.c \
4535 src/network/networkd-vlan.c \
4536 src/network/networkd-macvlan.c \
4537 src/network/networkd-dummy.c \
4538 src/network/networkd-network.c \
4539 src/network/networkd-address.c \
4540 src/network/networkd-route.c \
4541 src/network/networkd-manager.c \
4542 src/network/networkd-address-pool.c
4543
4544 nodist_libsystemd_networkd_core_la_SOURCES = \
4545 src/network/networkd-network-gperf.c \
4546 src/network/networkd-netdev-gperf.c
4547
4548 libsystemd_networkd_core_la_LIBADD = \
4549 libudev-internal.la \
4550 libsystemd-internal.la \
4551 libsystemd-network.la \
4552 libsystemd-label.la \
4553 libsystemd-shared.la
4554
4555 rootlibexec_PROGRAMS += \
4556 systemd-networkd-wait-online
4557
4558 systemd_networkd_wait_online_CFLAGS = \
4559 $(AM_CFLAGS)
4560
4561 systemd_networkd_wait_online_SOURCES = \
4562 src/libsystemd-network/network-internal.h \
4563 src/network/networkd-wait-online.c \
4564 src/network/networkd-wait-online.h
4565
4566 systemd_networkd_wait_online_LDADD = \
4567 libsystemd-network.la \
4568 libudev-internal.la \
4569 libsystemd-internal.la \
4570 libsystemd-shared.la
4571
4572 test_network_SOURCES = \
4573 src/network/test-network.c
4574
4575 test_network_CFLAGS = \
4576 $(AM_CFLAGS)
4577
4578 test_network_LDADD = \
4579 libsystemd-networkd-core.la
4580
4581 tests += \
4582 test-network
4583
4584 nodist_systemunit_DATA += \
4585 units/systemd-networkd.service \
4586 units/systemd-networkd-wait-online.service
4587
4588 GENERAL_ALIASES += \
4589 $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
4590 $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
4591
4592 EXTRA_DIST += \
4593 src/network/networkd-network-gperf.gperf \
4594 src/network/networkd-netdev-gperf.gperf \
4595 units/systemd-networkd.service.in \
4596 units/systemd-networkd-wait-online.service.in
4597
4598 CLEANFILES += \
4599 src/network/networkd-network-gperf.c \
4600 src/network/networkd-netdev-gperf.c
4601 endif
4602
4603 # ------------------------------------------------------------------------------
4604 if ENABLE_LOGIND
4605 systemd_logind_SOURCES = \
4606 src/login/logind.c \
4607 src/login/logind.h
4608
4609 nodist_systemd_logind_SOURCES = \
4610 src/login/logind-gperf.c
4611
4612 systemd_logind_LDADD = \
4613 libsystemd-logind-core.la
4614
4615 libsystemd_logind_core_la_SOURCES = \
4616 src/login/logind-core.c \
4617 src/login/logind-device.c \
4618 src/login/logind-device.h \
4619 src/login/logind-button.c \
4620 src/login/logind-button.h \
4621 src/login/logind-action.c \
4622 src/login/logind-action.h \
4623 src/login/logind-seat.c \
4624 src/login/logind-seat.h \
4625 src/login/logind-session.c \
4626 src/login/logind-session.h \
4627 src/login/logind-session-device.c \
4628 src/login/logind-session-device.h \
4629 src/login/logind-user.c \
4630 src/login/logind-user.h \
4631 src/login/logind-inhibit.c \
4632 src/login/logind-inhibit.h \
4633 src/login/logind-dbus.c \
4634 src/login/logind-session-dbus.c \
4635 src/login/logind-seat-dbus.c \
4636 src/login/logind-user-dbus.c \
4637 src/login/logind-acl.h
4638
4639 libsystemd_logind_core_la_LIBADD = \
4640 libsystemd-label.la \
4641 libsystemd-capability.la \
4642 libsystemd-internal.la \
4643 libudev-internal.la \
4644 libsystemd-shared.la
4645
4646 if HAVE_ACL
4647 libsystemd_logind_core_la_SOURCES += \
4648 src/login/logind-acl.c
4649
4650 libsystemd_logind_core_la_LIBADD += \
4651 libsystemd-acl.la
4652 endif
4653
4654 noinst_LTLIBRARIES += \
4655 libsystemd-logind-core.la
4656
4657 systemd_user_sessions_SOURCES = \
4658 src/login/user-sessions.c
4659
4660 systemd_user_sessions_LDADD = \
4661 libsystemd-shared.la
4662
4663 rootlibexec_PROGRAMS += \
4664 systemd-logind \
4665 systemd-user-sessions
4666
4667 loginctl_SOURCES = \
4668 src/login/loginctl.c \
4669 src/login/sysfs-show.c
4670
4671 loginctl_LDADD = \
4672 libsystemd-internal.la \
4673 libudev-internal.la \
4674 libsystemd-shared.la
4675
4676 rootbin_PROGRAMS += \
4677 loginctl
4678
4679 dist_bashcompletion_DATA += \
4680 shell-completion/bash/loginctl
4681
4682 dist_zshcompletion_DATA += \
4683 shell-completion/zsh/_loginctl \
4684 shell-completion/zsh/_systemd-inhibit
4685
4686 systemd_inhibit_SOURCES = \
4687 src/login/inhibit.c
4688
4689 systemd_inhibit_LDADD = \
4690 libsystemd-internal.la \
4691 libsystemd-shared.la
4692
4693 rootbin_PROGRAMS += \
4694 systemd-inhibit
4695
4696 test_login_SOURCES = \
4697 src/libsystemd/sd-login/test-login.c
4698
4699 test_login_LDADD = \
4700 libsystemd-internal.la \
4701 libsystemd-shared.la
4702
4703 test_login_shared_SOURCES = \
4704 src/login/test-login-shared.c
4705
4706 test_login_shared_LDADD = \
4707 libsystemd-internal.la \
4708 libsystemd-shared.la
4709
4710 test_inhibit_SOURCES = \
4711 src/login/test-inhibit.c
4712
4713 test_inhibit_LDADD = \
4714 libsystemd-internal.la \
4715 libsystemd-shared.la
4716
4717 test_login_tables_SOURCES = \
4718 src/login/test-login-tables.c
4719
4720 test_login_tables_LDADD = \
4721 libsystemd-logind-core.la
4722
4723 manual_tests += \
4724 test-login \
4725 test-inhibit
4726
4727 tests += \
4728 test-login-tables \
4729 test-login-shared
4730
4731 if HAVE_PAM
4732 pam_systemd_la_SOURCES = \
4733 src/login/pam_systemd.sym \
4734 src/login/pam_systemd.c
4735
4736 pam_systemd_la_CFLAGS = \
4737 $(AM_CFLAGS) \
4738 $(PAM_CFLAGS) \
4739 -fvisibility=hidden
4740
4741 pam_systemd_la_LDFLAGS = \
4742 $(AM_LDFLAGS) \
4743 -module \
4744 -export-dynamic \
4745 -avoid-version \
4746 -shared \
4747 -Wl,--version-script=$(top_srcdir)/src/login/pam_systemd.sym
4748
4749 pam_systemd_la_LIBADD = \
4750 libsystemd-capability.la \
4751 libsystemd-internal.la \
4752 libsystemd-shared.la \
4753 $(PAM_LIBS)
4754
4755 pamlib_LTLIBRARIES = \
4756 pam_systemd.la
4757
4758 dist_pamconf_DATA = \
4759 src/login/systemd-user
4760 endif
4761
4762 nodist_systemunit_DATA += \
4763 units/systemd-logind.service \
4764 units/systemd-user-sessions.service
4765
4766 dist_systemunit_DATA += \
4767 units/user.slice \
4768 units/org.freedesktop.login1.busname
4769
4770 dist_dbussystemservice_DATA += \
4771 src/login/org.freedesktop.login1.service
4772
4773 dist_dbuspolicy_DATA += \
4774 src/login/org.freedesktop.login1.conf
4775
4776 dist_pkgsysconf_DATA += \
4777 src/login/logind.conf
4778
4779 polkitpolicy_files += \
4780 src/login/org.freedesktop.login1.policy
4781
4782 INSTALL_DIRS += \
4783 $(systemdstatedir)
4784
4785 MULTI_USER_TARGET_WANTS += \
4786 systemd-logind.service \
4787 systemd-user-sessions.service
4788
4789 SYSTEM_UNIT_ALIASES += \
4790 systemd-logind.service dbus-org.freedesktop.login1.service
4791
4792 BUSNAMES_TARGET_WANTS += \
4793 org.freedesktop.login1.busname
4794
4795 if ENABLE_MULTI_SEAT_X
4796
4797 systemd_multi_seat_x_SOURCES = \
4798 src/login/multi-seat-x.c
4799
4800 systemd_multi_seat_x_LDADD = \
4801 libsystemd-label.la \
4802 libsystemd-shared.la
4803
4804 rootlibexec_PROGRAMS += \
4805 systemd-multi-seat-x
4806
4807 endif
4808
4809 dist_udevrules_DATA += \
4810 src/login/70-uaccess.rules \
4811 src/login/70-power-switch.rules
4812
4813 nodist_udevrules_DATA += \
4814 src/login/71-seat.rules \
4815 src/login/73-seat-late.rules
4816
4817 CLEANFILES += \
4818 src/login/logind-gperf.c \
4819 src/login/71-seat.rules \
4820 src/login/73-seat-late.rules
4821 endif
4822
4823 polkitpolicy_in_files += \
4824 src/login/org.freedesktop.login1.policy.in
4825
4826 EXTRA_DIST += \
4827 src/login/logind-gperf.gperf \
4828 src/login/71-seat.rules.in \
4829 src/login/73-seat-late.rules.in \
4830 units/systemd-logind.service.in \
4831 units/systemd-user-sessions.service.in
4832
4833 # ------------------------------------------------------------------------------
4834 if HAVE_PYTHON_DEVEL
4835 pkgpyexec_LTLIBRARIES = \
4836 _journal.la \
4837 id128.la \
4838 _daemon.la \
4839 _reader.la \
4840 login.la
4841
4842 _journal_la_SOURCES = \
4843 src/python-systemd/_journal.c
4844
4845 _journal_la_CFLAGS = \
4846 $(AM_CFLAGS) \
4847 -fvisibility=default \
4848 $(PYTHON_DEVEL_CFLAGS)
4849
4850 _journal_la_LDFLAGS = \
4851 $(AM_LDFLAGS) \
4852 -shared \
4853 -module \
4854 -avoid-version
4855
4856 _journal_la_LIBADD = \
4857 $(PYTHON_DEVEL_LIBS) \
4858 libsystemd.la
4859
4860 id128_la_SOURCES = \
4861 src/python-systemd/id128.c \
4862 src/python-systemd/pyutil.c \
4863 src/python-systemd/pyutil.h
4864
4865 nodist_id128_la_SOURCES = \
4866 src/python-systemd/id128-constants.h
4867
4868 id128_la_CFLAGS = \
4869 $(AM_CFLAGS) \
4870 -fvisibility=default \
4871 $(PYTHON_DEVEL_CFLAGS) \
4872 -I$(top_builddir)/src/python-systemd
4873
4874 id128_la_LDFLAGS = \
4875 $(AM_LDFLAGS) \
4876 -shared \
4877 -module \
4878 -avoid-version
4879
4880 id128_la_LIBADD = \
4881 $(PYTHON_DEVEL_LIBS) \
4882 libsystemd-shared.la \
4883 libsystemd.la
4884
4885 _daemon_la_SOURCES = \
4886 src/python-systemd/_daemon.c \
4887 src/python-systemd/pyutil.c \
4888 src/python-systemd/pyutil.h
4889
4890 _daemon_la_CFLAGS = \
4891 $(AM_CFLAGS) \
4892 -fvisibility=default \
4893 $(PYTHON_DEVEL_CFLAGS) \
4894 -I$(top_builddir)/src/python-systemd
4895
4896 _daemon_la_LDFLAGS = \
4897 $(AM_LDFLAGS) \
4898 -shared \
4899 -module \
4900 -avoid-version
4901
4902 _daemon_la_LIBADD = \
4903 $(PYTHON_DEVEL_LIBS) \
4904 libsystemd-shared.la \
4905 libsystemd.la
4906
4907 _reader_la_SOURCES = \
4908 src/python-systemd/_reader.c \
4909 src/python-systemd/pyutil.c \
4910 src/python-systemd/pyutil.h
4911
4912 _reader_la_CFLAGS = \
4913 $(AM_CFLAGS) \
4914 -fvisibility=default \
4915 $(PYTHON_DEVEL_CFLAGS)
4916
4917 _reader_la_LDFLAGS = \
4918 $(AM_LDFLAGS) \
4919 -shared \
4920 -module \
4921 -avoid-version
4922
4923 _reader_la_LIBADD = \
4924 $(PYTHON_DEVEL_LIBS) \
4925 libsystemd-shared.la \
4926 libsystemd.la
4927
4928 login_la_SOURCES = \
4929 src/python-systemd/login.c \
4930 src/python-systemd/pyutil.c \
4931 src/python-systemd/pyutil.h
4932
4933 login_la_CFLAGS = \
4934 $(AM_CFLAGS) \
4935 -fvisibility=default \
4936 $(PYTHON_DEVEL_CFLAGS)
4937
4938 login_la_LDFLAGS = \
4939 $(AM_LDFLAGS) \
4940 -shared \
4941 -module \
4942 -avoid-version
4943
4944 login_la_LIBADD = \
4945 $(PYTHON_DEVEL_LIBS) \
4946 libsystemd-shared.la \
4947 libsystemd.la
4948
4949 dist_pkgpyexec_PYTHON = \
4950 src/python-systemd/journal.py \
4951 src/python-systemd/daemon.py \
4952 src/python-systemd/__init__.py
4953
4954 src/python-systemd/id128-constants.h: src/systemd/sd-messages.h
4955 $(AM_V_at)$(MKDIR_P) $(dir $@)
4956 $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
4957
4958 BUILT_SOURCES += \
4959 src/python-systemd/id128-constants.h
4960
4961 SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
4962 sphinx-%:
4963 $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
4964 $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
4965 $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/html/python-systemd/
4966
4967 python-shell:
4968 $(AM_V_at)echo "Starting python with $(DESTDIR)$(pyexecdir)"
4969 $(AM_V_at)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(PYTHON)
4970
4971 destdir-sphinx: all
4972 dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
4973 $(MAKE) DESTDIR="$$dir" install && \
4974 $(MAKE) DESTDIR="$$dir" sphinx-html && \
4975 rm -rf "$$dir"
4976
4977 endif
4978
4979 CLEAN_LOCAL_HOOKS += clean-sphinx
4980
4981 .PHONY: python-shell destdir-sphinx clean-sphinx clean-python
4982
4983 clean-sphinx:
4984 -rm -rf docs/html/python-systemd/
4985
4986 # Remove Python stuff, e.g. to force rebuilding for a different Python version.
4987 clean-python:
4988 -rm -rf src/python-systemd/.libs src/python-systemd/*.l[ao]
4989 -rm -f _daemon.la id128.la _journal.la login.la _reader.la
4990
4991 # ------------------------------------------------------------------------------
4992 if ENABLE_COMPAT_LIBS
4993 EXTRA_DIST += \
4994 src/compat-libs/linkwarning.h
4995
4996 libsystemd-%.c: src/compat-libs/libsystemd-%.sym
4997 $(AM_V_at)$(MKDIR_P) $(dir $@)
4998 $(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/obsolete_lib(\1,$(notdir $(basename $<)));/p' <$< >$@
4999
5000 BUILT_SOURCES += \
5001 libsystemd-journal.c \
5002 libsystemd-login.c \
5003 libsystemd-id128.c \
5004 libsystemd-daemon.c
5005
5006 libsystemd_journal_la_SOURCES = \
5007 libsystemd-journal.c \
5008 src/compat-libs/libsystemd-journal.sym
5009
5010 libsystemd_journal_la_CPPFLAGS = \
5011 $(AM_CFLAGS) \
5012 -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
5013
5014 libsystemd_journal_la_LDFLAGS = \
5015 $(AM_LDFLAGS) \
5016 -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
5017 -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-journal.sym
5018
5019 libsystemd_journal_la_LIBADD = \
5020 libsystemd-journal-internal.la \
5021 libsystemd-internal.la \
5022 libsystemd-shared.la
5023
5024 libsystemd_login_la_SOURCES = \
5025 libsystemd-login.c \
5026 src/compat-libs/libsystemd-login.sym
5027
5028 libsystemd_login_la_CPPFLAGS = \
5029 $(AM_CFLAGS) \
5030 -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
5031
5032 libsystemd_login_la_LDFLAGS = \
5033 $(AM_LDFLAGS) \
5034 -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
5035 -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-login.sym
5036
5037 libsystemd_login_la_LIBADD = \
5038 libsystemd-internal.la \
5039 libsystemd-shared.la
5040
5041 libsystemd_id128_la_SOURCES = \
5042 libsystemd-id128.c \
5043 src/compat-libs/libsystemd-id128.sym
5044
5045 libsystemd_id128_la_CPPFLAGS = \
5046 $(AM_CFLAGS) \
5047 -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
5048
5049 libsystemd_id128_la_LDFLAGS = \
5050 $(AM_LDFLAGS) \
5051 -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
5052 -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-id128.sym
5053
5054 libsystemd_id128_la_LIBADD = \
5055 libsystemd-internal.la \
5056 libsystemd-shared.la
5057
5058 libsystemd_daemon_la_SOURCES = \
5059 libsystemd-daemon.c \
5060 src/compat-libs/libsystemd-daemon.sym
5061
5062 libsystemd_daemon_la_CPPFLAGS = \
5063 $(AM_CFLAGS) \
5064 -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
5065
5066 libsystemd_daemon_la_LDFLAGS = \
5067 $(AM_LDFLAGS) \
5068 -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
5069 -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-daemon.sym
5070
5071 libsystemd_daemon_la_LIBADD = \
5072 libsystemd-internal.la \
5073 libsystemd-shared.la
5074
5075 lib_LTLIBRARIES += \
5076 libsystemd-journal.la \
5077 libsystemd-login.la \
5078 libsystemd-id128.la \
5079 libsystemd-daemon.la
5080
5081 pkgconfiglib_DATA += \
5082 src/compat-libs/libsystemd-journal.pc \
5083 src/compat-libs/libsystemd-login.pc \
5084 src/compat-libs/libsystemd-id128.pc \
5085 src/compat-libs/libsystemd-daemon.pc
5086
5087 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
5088 compat-lib-install-hook:
5089 libname=libsystemd-login.so && $(move-to-rootlibdir)
5090 libname=libsystemd-journal.so && $(move-to-rootlibdir)
5091 libname=libsystemd-id128.so && $(move-to-rootlibdir)
5092 libname=libsystemd-daemon.so && $(move-to-rootlibdir)
5093
5094 compat-lib-uninstall-hook:
5095 rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
5096 rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
5097 rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
5098 rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
5099
5100 INSTALL_EXEC_HOOKS += compat-lib-install-hook
5101 UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
5102 endif
5103
5104 EXTRA_DIST += \
5105 src/compat-libs/libsystemd-journal.pc.in \
5106 src/compat-libs/libsystemd-login.pc.in \
5107 src/compat-libs/libsystemd-id128.pc.in \
5108 src/compat-libs/libsystemd-daemon.pc.in
5109
5110 # ------------------------------------------------------------------------------
5111 substitutions = \
5112 '|rootlibexecdir=$(rootlibexecdir)|' \
5113 '|rootbindir=$(rootbindir)|' \
5114 '|bindir=$(bindir)|' \
5115 '|SYSTEMCTL=$(rootbindir)/systemctl|' \
5116 '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
5117 '|pkgsysconfdir=$(pkgsysconfdir)|' \
5118 '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
5119 '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
5120 '|pkgdatadir=$(pkgdatadir)|' \
5121 '|systemunitdir=$(systemunitdir)|' \
5122 '|userunitdir=$(userunitdir)|' \
5123 '|systempresetdir=$(systempresetdir)|' \
5124 '|userpresetdir=$(userpresetdir)|' \
5125 '|udevhwdbdir=$(udevhwdbdir)|' \
5126 '|udevrulesdir=$(udevrulesdir)|' \
5127 '|catalogdir=$(catalogdir)|' \
5128 '|tmpfilesdir=$(tmpfilesdir)|' \
5129 '|sysusersdir=$(sysusersdir)|' \
5130 '|sysctldir=$(sysctldir)|' \
5131 '|systemgeneratordir=$(systemgeneratordir)|' \
5132 '|usergeneratordir=$(usergeneratordir)|' \
5133 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
5134 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
5135 '|PACKAGE_URL=$(PACKAGE_URL)|' \
5136 '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
5137 '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
5138 '|prefix=$(prefix)|' \
5139 '|exec_prefix=$(exec_prefix)|' \
5140 '|libdir=$(libdir)|' \
5141 '|includedir=$(includedir)|' \
5142 '|VERSION=$(VERSION)|' \
5143 '|rootprefix=$(rootprefix)|' \
5144 '|udevlibexecdir=$(udevlibexecdir)|' \
5145 '|SUSHELL=$(SUSHELL)|' \
5146 '|DEBUGTTY=$(DEBUGTTY)|' \
5147 '|KILL=$(KILL)|' \
5148 '|KMOD=$(KMOD)|' \
5149 '|MKDIR_P=$(MKDIR_P)|' \
5150 '|QUOTAON=$(QUOTAON)|' \
5151 '|QUOTACHECK=$(QUOTACHECK)|' \
5152 '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
5153 '|VARLOGDIR=$(varlogdir)|' \
5154 '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
5155 '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
5156 '|PYTHON=$(PYTHON)|' \
5157 '|PYTHON_BINARY=$(PYTHON_BINARY)|' \
5158 '|NTP_SERVERS=$(NTP_SERVERS)|' \
5159 '|DNS_SERVERS=$(DNS_SERVERS)|' \
5160 '|systemuidmax=$(SYSTEM_UID_MAX)|' \
5161 '|systemgidmax=$(SYSTEM_GID_MAX)|' \
5162 '|TTY_GID=$(TTY_GID)|' \
5163 '|systemsleepdir=$(systemsleepdir)|' \
5164 '|systemshutdowndir=$(systemshutdowndir)|' \
5165 '|binfmtdir=$(binfmtdir)|' \
5166 '|modulesloaddir=$(modulesloaddir)|'
5167
5168 SED_PROCESS = \
5169 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
5170 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
5171 < $< > $@
5172
5173 units/%: units/%.in
5174 $(SED_PROCESS)
5175
5176 man/%: man/%.in
5177 $(SED_PROCESS)
5178
5179 sysctl.d/%: sysctl.d/%.in
5180 $(SED_PROCESS)
5181
5182 %.pc: %.pc.in
5183 $(SED_PROCESS)
5184
5185 src/core/macros.%: src/core/macros.%.in
5186 $(SED_PROCESS)
5187
5188 src/%.policy.in: src/%.policy.in.in
5189 $(SED_PROCESS)
5190
5191 %.rules: %.rules.in
5192 $(SED_PROCESS)
5193
5194 %.conf: %.conf.in
5195 $(SED_PROCESS)
5196
5197 %.sh: %.sh.in
5198 $(SED_PROCESS)
5199 $(AM_V_GEN)chmod +x $@
5200
5201 src/%.c: src/%.gperf
5202 $(AM_V_at)$(MKDIR_P) $(dir $@)
5203 $(AM_V_GPERF)$(GPERF) < $< > $@
5204
5205 src/%: src/%.m4
5206 $(AM_V_at)$(MKDIR_P) $(dir $@)
5207 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
5208
5209 units/%: units/%.m4
5210 $(AM_V_at)$(MKDIR_P) $(dir $@)
5211 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
5212
5213 units/user/%: units/%.m4
5214 $(AM_V_at)$(MKDIR_P) $(dir $@)
5215 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
5216
5217 if ENABLE_POLKIT
5218 dist_polkitpolicy_DATA = \
5219 $(polkitpolicy_files) \
5220 $(polkitpolicy_in_in_files:.policy.in.in=.policy)
5221 endif
5222
5223 EXTRA_DIST += \
5224 $(polkitpolicy_in_files) \
5225 $(polkitpolicy_in_in_files)
5226
5227 CLEANFILES += \
5228 $(nodist_systemunit_DATA) \
5229 $(nodist_userunit_DATA) \
5230 $(pkgconfigdata_DATA) \
5231 $(pkgconfiglib_DATA) \
5232 $(nodist_polkitpolicy_DATA)
5233
5234 # ------------------------------------------------------------------------------
5235 if ENABLE_MANPAGES
5236 man/custom-entities.ent: configure.ac
5237 $(AM_V_GEN)$(MKDIR_P) $(dir $@)
5238 $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
5239 printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
5240 > $@ # '
5241
5242 DISTCLEANFILES += \
5243 man/custom-entities.ent
5244
5245 XSLTPROC_FLAGS = \
5246 --nonet \
5247 --xinclude \
5248 --stringparam man.output.quietly 1 \
5249 --stringparam funcsynopsis.style ansi \
5250 --stringparam man.authors.section.enabled 0 \
5251 --stringparam man.copyright.section.enabled 0 \
5252 --stringparam systemd.version $(VERSION) \
5253 --path '$(builddir)/man:$(srcdir)/man'
5254
5255 XSLTPROC_PROCESS_MAN = \
5256 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
5257
5258 XSLTPROC_PROCESS_HTML = \
5259 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
5260
5261 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
5262 $(XSLTPROC_PROCESS_MAN)
5263
5264 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
5265 $(XSLTPROC_PROCESS_MAN)
5266
5267 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
5268 $(XSLTPROC_PROCESS_MAN)
5269
5270 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
5271 $(XSLTPROC_PROCESS_MAN)
5272
5273 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
5274 $(XSLTPROC_PROCESS_MAN)
5275
5276 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
5277 $(XSLTPROC_PROCESS_HTML)
5278
5279 define html-alias
5280 $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
5281 endef
5282
5283 endif
5284
5285 EXTRA_DIST += \
5286 man/custom-html.xsl \
5287 man/custom-man.xsl
5288
5289 # ------------------------------------------------------------------------------
5290 if HAVE_SYSV_COMPAT
5291 sysvinit_DATA = \
5292 docs/sysvinit/README
5293
5294 varlog_DATA = \
5295 docs/var-log/README
5296
5297 docs/sysvinit/README: docs/sysvinit/README.in
5298 $(SED_PROCESS)
5299
5300 docs/var-log/README: docs/var-log/README.in
5301 $(SED_PROCESS)
5302
5303 CLEANFILES += \
5304 docs/sysvinit/README \
5305 docs/var-log/README
5306 endif
5307
5308 EXTRA_DIST += \
5309 docs/sysvinit/README.in \
5310 docs/var-log/README.in
5311
5312 SOCKETS_TARGET_WANTS += \
5313 systemd-initctl.socket \
5314 systemd-shutdownd.socket
5315
5316 if HAVE_SYSV_COMPAT
5317 RUNLEVEL1_TARGET_WANTS += \
5318 systemd-update-utmp-runlevel.service
5319 RUNLEVEL2_TARGET_WANTS += \
5320 systemd-update-utmp-runlevel.service
5321 RUNLEVEL3_TARGET_WANTS += \
5322 systemd-update-utmp-runlevel.service
5323 RUNLEVEL4_TARGET_WANTS += \
5324 systemd-update-utmp-runlevel.service
5325 RUNLEVEL5_TARGET_WANTS += \
5326 systemd-update-utmp-runlevel.service
5327 endif
5328
5329 SYSINIT_TARGET_WANTS += \
5330 systemd-update-utmp.service \
5331 systemd-update-done.service \
5332 ldconfig.service
5333
5334 LOCAL_FS_TARGET_WANTS += \
5335 systemd-remount-fs.service \
5336 tmp.mount
5337
5338 MULTI_USER_TARGET_WANTS += \
5339 getty.target \
5340 systemd-ask-password-wall.path
5341
5342 SYSINIT_TARGET_WANTS += \
5343 dev-hugepages.mount \
5344 dev-mqueue.mount \
5345 sys-kernel-config.mount \
5346 sys-kernel-debug.mount \
5347 sys-fs-fuse-connections.mount \
5348 systemd-sysctl.service \
5349 systemd-ask-password-console.path
5350
5351 if HAVE_SYSV_COMPAT
5352 SYSTEM_UNIT_ALIASES += \
5353 poweroff.target runlevel0.target \
5354 rescue.target runlevel1.target \
5355 multi-user.target runlevel2.target \
5356 multi-user.target runlevel3.target \
5357 multi-user.target runlevel4.target \
5358 graphical.target runlevel5.target \
5359 reboot.target runlevel6.target
5360 endif
5361
5362 SYSTEM_UNIT_ALIASES += \
5363 graphical.target default.target \
5364 reboot.target ctrl-alt-del.target \
5365 getty@.service autovt@.service
5366
5367 USER_UNIT_ALIASES += \
5368 $(systemunitdir)/shutdown.target shutdown.target \
5369 $(systemunitdir)/sockets.target sockets.target \
5370 $(systemunitdir)/busnames.target busnames.target \
5371 $(systemunitdir)/timers.target timers.target \
5372 $(systemunitdir)/paths.target paths.target \
5373 $(systemunitdir)/bluetooth.target bluetooth.target \
5374 $(systemunitdir)/printer.target printer.target \
5375 $(systemunitdir)/sound.target sound.target \
5376 $(systemunitdir)/smartcard.target smartcard.target
5377
5378 GENERAL_ALIASES += \
5379 $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
5380 $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
5381 $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
5382 $(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
5383
5384 if HAVE_SYSV_COMPAT
5385 INSTALL_DIRS += \
5386 $(systemunitdir)/runlevel1.target.wants \
5387 $(systemunitdir)/runlevel2.target.wants \
5388 $(systemunitdir)/runlevel3.target.wants \
5389 $(systemunitdir)/runlevel4.target.wants \
5390 $(systemunitdir)/runlevel5.target.wants
5391 endif
5392
5393 INSTALL_DIRS += \
5394 $(prefix)/lib/modules-load.d \
5395 $(sysconfdir)/modules-load.d \
5396 $(prefix)/lib/systemd/network \
5397 $(sysconfdir)/systemd/network \
5398 $(prefix)/lib/sysctl.d \
5399 $(sysconfdir)/sysctl.d \
5400 $(prefix)/lib/kernel/install.d \
5401 $(sysconfdir)/kernel/install.d \
5402 $(systemshutdowndir) \
5403 $(systemsleepdir) \
5404 $(systemgeneratordir) \
5405 $(usergeneratordir) \
5406 \
5407 $(userunitdir) \
5408 $(pkgsysconfdir)/system \
5409 $(pkgsysconfdir)/system/multi-user.target.wants \
5410 $(pkgsysconfdir)/system/getty.target.wants \
5411 $(pkgsysconfdir)/user \
5412 $(dbussessionservicedir) \
5413 $(sysconfdir)/xdg/systemd
5414
5415 install-exec-hook: $(INSTALL_EXEC_HOOKS)
5416
5417 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
5418
5419 install-data-hook: $(INSTALL_DATA_HOOKS)
5420
5421 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
5422
5423 clean-local: $(CLEAN_LOCAL_HOOKS)
5424 rm -rf $(abs_srcdir)/install-tree
5425 rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
5426 $(abs_srcdir)/hwdb/iab.txt
5427
5428 DISTCHECK_CONFIGURE_FLAGS = \
5429 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
5430 --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
5431 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
5432 --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
5433 --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
5434 --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
5435 --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
5436 --with-rootprefix=$$dc_install_base \
5437 --disable-split-usr \
5438 --enable-kdbus \
5439 --enable-compat-libs
5440
5441 if HAVE_SYSV_COMPAT
5442 DISTCHECK_CONFIGURE_FLAGS += \
5443 --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
5444 --with-sysvrcnd-path=$$dc_install_base/$(sysvrcnddir)
5445 else
5446 DISTCHECK_CONFIGURE_FLAGS += \
5447 --with-sysvinit-path= \
5448 --with-sysvrcnd-path=
5449 endif
5450
5451 if HAVE_PYTHON
5452 DISTCHECK_CONFIGURE_FLAGS += \
5453 --with-python
5454 endif
5455
5456 if ENABLE_GTK_DOC
5457 DISTCHECK_CONFIGURE_FLAGS += \
5458 --enable-gtk-doc
5459 endif
5460
5461 #
5462 # Require python when making dist
5463 #
5464 .PHONY: dist-check-python
5465 dist-check-python:
5466 if !HAVE_PYTHON
5467 @echo "*** python and python-lxml module must be installed and enabled in order to make dist"
5468 @false
5469 endif
5470
5471 dist-check-compat-libs:
5472 if !ENABLE_COMPAT_LIBS
5473 @echo "*** compat-libs must be enabled in order to make dist"
5474 @false
5475 endif
5476
5477 dist: dist-check-python dist-check-compat-libs
5478
5479 # check "broken" platforms limited toolchains for link breakage before we release
5480 .PHONY: linkcheck
5481 linkcheck:
5482 $(MAKE) CFLAGS='-fno-lto' LDFLAGS='-Wl,-fuse-ld=gold -Wl,--as-needed -Wl,--no-gc-sections' distcheck
5483
5484 .PHONY: hwdb-update
5485 hwdb-update:
5486 ( cd $(top_srcdir)/hwdb && \
5487 wget -N http://www.linux-usb.org/usb.ids \
5488 http://pci-ids.ucw.cz/v2.2/pci.ids \
5489 http://standards.ieee.org/develop/regauth/oui/oui.txt \
5490 http://standards.ieee.org/develop/regauth/iab/iab.txt && \
5491 ./ids-update.pl )
5492
5493 .PHONY: kdbus-update
5494 kdbus-update:
5495 ( cd $(top_srcdir)/src/libsystemd/sd-bus/ && \
5496 wget -N https://d-bus.googlecode.com/git/kdbus.h )
5497
5498 .PHONY: git-tag
5499 git-tag:
5500 git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
5501
5502 www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
5503 .PHONY: upload
5504 upload: all check dist
5505 scp systemd-$(VERSION).tar.xz $(www_target)
5506
5507 .PHONY: doc-sync
5508 doc-sync: all destdir-sphinx
5509 gtkdoc-rebase --html-dir=docs/libudev/html --online
5510 rsync -rlv --delete docs/libudev/html/ --omit-dir-times $(www_target)/libudev/
5511 gtkdoc-rebase --html-dir=docs/gudev/html --online
5512 rsync -rlv --delete docs/gudev/html/ --omit-dir-times $(www_target)/gudev/
5513 rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
5514 rsync -rlv --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
5515
5516 .PHONY: tango
5517 tango: upload
5518 cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
5519 scp man/*.html tango:public/systemd-man/
5520
5521 .PHONY: install-tree
5522 install-tree: all
5523 rm -rf $(abs_srcdir)/install-tree
5524 $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
5525 tree $(abs_srcdir)/install-tree
5526
5527 # Let's run all tests of the test suite, but under valgrind. Let's
5528 # exclude the one perl script we have in there
5529 .PHONY: valgrind-tests
5530 valgrind-tests: $(TESTS)
5531 $(AM_V_GEN)for f in $(filter-out %.pl, $^); do \
5532 if file $$f | grep -q shell; then \
5533 echo -e "$${x}Skipping non-binary $$f"; else \
5534 echo -e "$${x}Running $$f"; \
5535 libtool --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
5536 x="\n\n"; \
5537 done
5538
5539 exported-%: %
5540 $(AM_V_GEN)$(NM) -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@
5541
5542 exported: $(addprefix exported-, $(lib_LTLIBRARIES))
5543 $(AM_V_GEN)cat $^ > $@
5544
5545 .PHONY: check-api-docs
5546 check-api-docs: exported man
5547 $(AM_V_GEN)for symbol in `cat exported` ; do \
5548 if test -f $(builddir)/man/$$symbol.html ; then \
5549 echo " Symbol $$symbol() is documented." ; \
5550 else \
5551 echo "‣ Symbol $$symbol() lacks documentation." ; \
5552 fi ; \
5553 done
5554
5555 OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
5556 ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
5557
5558 undefined defined: $(ALL_OBJECTS)
5559 $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
5560 $(NM) -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
5561 done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
5562
5563 CLEANFILES += \
5564 defined \
5565 undefined
5566
5567 .PHONY: check-api-unused
5568 check-api-unused: defined undefined exported
5569 ( cat exported undefined ) | sort -u | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
5570
5571 .PHONY: check-includes
5572 check-includes: $(top_srcdir)/tools/check-includes.pl
5573 $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
5574 | xargs $(top_srcdir)/tools/check-includes.pl
5575
5576 EXTRA_DIST += \
5577 $(top_srcdir)/tools/check-includes.pl
5578
5579 # Stupid test that everything purported to be exported really is
5580 define generate-sym-test
5581 $(AM_V_at)$(MKDIR_P) $(dir $@)
5582 $(AM_V_at)printf '#include <stdio.h>\n' > $@
5583 $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@
5584 $(AM_V_at)printf 'void* functions[] = {\n' >> $@
5585 $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@
5586 $(AM_V_at)printf '};\nint main(void) {\n' >> $@
5587 $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@
5588 $(AM_V_at)printf 'return 0; }\n' >> $@
5589 endef
5590
5591 test-libsystemd-sym.c: \
5592 $(top_builddir)/src/libsystemd/libsystemd.sym \
5593 src/systemd/sd-journal.h \
5594 src/systemd/sd-daemon.h \
5595 src/systemd/sd-login.h \
5596 src/systemd/sd-bus.h \
5597 src/systemd/sd-utf8.h \
5598 src/systemd/sd-resolve.h
5599 $(generate-sym-test)
5600
5601 test-libudev-sym.c: \
5602 src/libudev/libudev.sym \
5603 src/udev/udev.h
5604 $(generate-sym-test)
5605
5606 test_libsystemd_sym_SOURCES = \
5607 test-libsystemd-sym.c
5608 test_libsystemd_sym_LDADD = \
5609 libsystemd.la
5610
5611 test_libudev_sym_SOURCES = \
5612 test-libudev-sym.c
5613 test_libudev_sym_CFLAGS = \
5614 $(AM_CFLAGS) \
5615 -Wno-deprecated-declarations
5616 test_libudev_sym_LDADD = \
5617 libudev.la
5618
5619 BUILT_SOURCES += \
5620 $(test_libsystemd_sym_SOURCES) \
5621 $(test_libudev_sym_SOURCES)
5622
5623 tests += \
5624 test-libsystemd-sym \
5625 test-libudev-sym
5626
5627 .PHONY: cppcheck
5628 cppcheck:
5629 cppcheck --enable=all -q $(top_srcdir)
5630
5631 # Used to extract compile flags for YCM.
5632 print-%:
5633 @echo $($*)
5634
5635 git-contrib:
5636 @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | awk '{ print $$0 "," }' | sort -u