chiark / gitweb /
logind: add support for automatic suspend/hibernate/shutdown on idle
[elogind.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 #
8 #  systemd is free software; you can redistribute it and/or modify it
9 #  under the terms of the GNU Lesser General Public License as published by
10 #  the Free Software Foundation; either version 2.1 of the License, or
11 #  (at your option) any later version.
12 #
13 #  systemd is distributed in the hope that it will be useful, but
14 #  WITHOUT ANY WARRANTY; without even the implied warranty of
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 #  Lesser General Public License for more details.
17 #
18 #  You should have received a copy of the GNU Lesser General Public License
19 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
20
21 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22 AM_MAKEFLAGS = --no-print-directory
23 AUTOMAKE_OPTIONS = color-tests parallel-tests
24
25 SUBDIRS = . po
26
27 # remove targets if the command fails
28 .DELETE_ON_ERROR:
29
30 LIBUDEV_CURRENT=3
31 LIBUDEV_REVISION=0
32 LIBUDEV_AGE=2
33
34 LIBGUDEV_CURRENT=1
35 LIBGUDEV_REVISION=2
36 LIBGUDEV_AGE=1
37
38 LIBSYSTEMD_LOGIN_CURRENT=3
39 LIBSYSTEMD_LOGIN_REVISION=10
40 LIBSYSTEMD_LOGIN_AGE=3
41
42 LIBSYSTEMD_DAEMON_CURRENT=0
43 LIBSYSTEMD_DAEMON_REVISION=6
44 LIBSYSTEMD_DAEMON_AGE=0
45
46 LIBSYSTEMD_ID128_CURRENT=0
47 LIBSYSTEMD_ID128_REVISION=16
48 LIBSYSTEMD_ID128_AGE=0
49
50 LIBSYSTEMD_JOURNAL_CURRENT=7
51 LIBSYSTEMD_JOURNAL_REVISION=0
52 LIBSYSTEMD_JOURNAL_AGE=7
53
54 # Dirs of external packages
55 dbuspolicydir=@dbuspolicydir@
56 dbussessionservicedir=@dbussessionservicedir@
57 dbussystemservicedir=@dbussystemservicedir@
58 dbusinterfacedir=@dbusinterfacedir@
59 pamlibdir=@pamlibdir@
60 pkgconfigdatadir=$(datadir)/pkgconfig
61 pkgconfiglibdir=$(libdir)/pkgconfig
62 polkitpolicydir=$(datadir)/polkit-1/actions
63 bashcompletiondir=$(sysconfdir)/bash_completion.d
64 rpmmacrosdir=$(sysconfdir)/rpm
65 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
66 sysvrcddir=$(SYSTEM_SYSVRCND_PATH)
67 varlogdir=$(localstatedir)/log
68 systemdstatedir=$(localstatedir)/lib/systemd
69 catalogstatedir=$(systemdstatedir)/catalog
70 hwdb_bin=/etc/udev/hwdb.bin
71
72 # Our own, non-special dirs
73 pkgsysconfdir=$(sysconfdir)/systemd
74 userunitdir=$(prefix)/lib/systemd/user
75 userpresetdir=$(prefix)/lib/systemd/user-preset
76 tmpfilesdir=$(prefix)/lib/tmpfiles.d
77 sysctldir=$(prefix)/lib/sysctl.d
78 usergeneratordir=$(prefix)/lib/systemd/user-generators
79 pkgincludedir=$(includedir)/systemd
80 systemgeneratordir=$(rootlibexecdir)/system-generators
81 systemshutdowndir=$(rootlibexecdir)/system-shutdown
82 systemsleepdir=$(rootlibexecdir)/system-sleep
83 systemunitdir=$(rootprefix)/lib/systemd/system
84 systempresetdir=$(rootprefix)/lib/systemd/system-preset
85 udevlibexecdir=$(rootprefix)/lib/udev
86 udevhomedir=$(udevlibexecdir)
87 udevrulesdir=$(udevlibexecdir)/rules.d
88 udevhwdbdir=$(udevlibexecdir)/hwdb.d
89 catalogdir=$(prefix)/lib/systemd/catalog
90
91 # And these are the special ones for /
92 rootprefix=@rootprefix@
93 rootbindir=$(rootprefix)/bin
94 rootlibexecdir=$(rootprefix)/lib/systemd
95
96 CLEANFILES = $(BUILT_SOURCES)
97 EXTRA_DIST =
98 BUILT_SOURCES =
99 INSTALL_EXEC_HOOKS =
100 UNINSTALL_EXEC_HOOKS =
101 INSTALL_DATA_HOOKS =
102 UNINSTALL_DATA_HOOKS =
103 DISTCLEAN_LOCAL_HOOKS =
104 pkginclude_HEADERS =
105 noinst_LTLIBRARIES =
106 lib_LTLIBRARIES =
107 include_HEADERS =
108 pkgconfiglib_DATA =
109 polkitpolicy_in_files =
110 polkitpolicy_files =
111 dist_udevrules_DATA =
112 nodist_udevrules_DATA =
113 dist_man_MANS =
114 dist_pkgsysconf_DATA =
115 dist_pkgdata_DATA =
116 dist_dbuspolicy_DATA =
117 dbusinterface_DATA =
118 dist_dbussystemservice_DATA =
119 check_PROGRAMS =
120 check_DATA =
121 noinst_PROGRAMS =
122 TESTS =
123 udevlibexec_PROGRAMS =
124
125 AM_CPPFLAGS = \
126         -include $(top_builddir)/config.h \
127         -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
128         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
129         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
130         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
131         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
132         -DUSER_CONFIG_FILE=\"$(pkgsysconfdir)/user.conf\" \
133         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
134         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
135         -DCATALOG_PATH=\"$(catalogstatedir)\" \
136         -DHWDB_BIN=\"$(hwdb_bin)\" \
137         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
138         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
139         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
140         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
141         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
142         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
143         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
144         -DROOTPREFIX=\"$(rootprefix)\" \
145         -DRUNTIME_DIR=\"/run\" \
146         -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
147         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
148         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
149         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
150         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
151         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
152         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
153         -DX_SERVER=\"$(bindir)/X\" \
154         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
155         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
156         -I $(top_srcdir)/src \
157         -I $(top_srcdir)/src/shared \
158         -I $(top_srcdir)/src/login \
159         -I $(top_srcdir)/src/journal \
160         -I $(top_srcdir)/src/systemd \
161         -I $(top_builddir)/src/core \
162         -I $(top_srcdir)/src/core \
163         -I $(top_srcdir)/src/libudev \
164         -I $(top_srcdir)/src/udev \
165         $(OUR_CPPFLAGS)
166
167 AM_CFLAGS = $(OUR_CFLAGS)
168 AM_LDFLAGS = $(OUR_LDFLAGS)
169
170 # ------------------------------------------------------------------------------
171 if TARGET_GENTOO
172 AM_CPPFLAGS += \
173         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
174         -DKBD_SETFONT=\"/usr/bin/setfont\"
175 else
176 if TARGET_ARCH
177 AM_CPPFLAGS += \
178         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
179         -DKBD_SETFONT=\"/usr/bin/setfont\"
180 else
181 if TARGET_FRUGALWARE
182 AM_CPPFLAGS += \
183         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
184         -DKBD_SETFONT=\"/usr/bin/setfont\"
185 else
186 if TARGET_MANDRIVA
187 AM_CPPFLAGS += \
188         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
189         -DKBD_SETFONT=\"/bin/setfont\"
190 else
191 if TARGET_ANGSTROM
192 AM_CPPFLAGS += \
193         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
194         -DKBD_SETFONT=\"/usr/bin/setfont\"
195 else
196 if TARGET_MAGEIA
197 AM_CPPFLAGS += \
198         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
199         -DKBD_SETFONT=\"/bin/setfont\"
200 else
201 AM_CPPFLAGS += \
202         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
203         -DKBD_SETFONT=\"/bin/setfont\"
204 endif
205 endif
206 endif
207 endif
208 endif
209 endif
210
211 # ------------------------------------------------------------------------------
212 rootbin_PROGRAMS = \
213         systemctl \
214         systemd-notify \
215         systemd-ask-password \
216         systemd-tty-ask-password-agent \
217         systemd-tmpfiles \
218         systemd-machine-id-setup
219
220 bin_PROGRAMS = \
221         systemd-cgls \
222         systemd-cgtop \
223         systemd-stdio-bridge \
224         systemd-nspawn \
225         systemd-detect-virt \
226         systemd-delta
227
228 dist_bin_SCRIPTS = \
229         src/analyze/systemd-analyze
230
231 rootlibexec_PROGRAMS = \
232         systemd \
233         systemd-cgroups-agent \
234         systemd-initctl \
235         systemd-update-utmp \
236         systemd-shutdownd \
237         systemd-shutdown \
238         systemd-remount-fs \
239         systemd-reply-password \
240         systemd-fsck \
241         systemd-timestamp \
242         systemd-ac-power \
243         systemd-sysctl \
244         systemd-sleep
245
246 if HAVE_KMOD
247 rootlibexec_PROGRAMS += \
248         systemd-modules-load
249 endif
250
251 systemgenerator_PROGRAMS = \
252         systemd-getty-generator \
253         systemd-fstab-generator \
254         systemd-system-update-generator
255
256 dist_bashcompletion_DATA = \
257         shell-completion/systemd-bash-completion.sh
258
259 dist_tmpfiles_DATA = \
260         tmpfiles.d/systemd.conf \
261         tmpfiles.d/tmp.conf \
262         tmpfiles.d/x11.conf
263
264 if HAVE_SYSV_COMPAT
265 dist_tmpfiles_DATA += \
266         tmpfiles.d/legacy.conf
267 endif
268
269 dist_systemunit_DATA = \
270         units/graphical.target \
271         units/multi-user.target \
272         units/emergency.service \
273         units/emergency.target \
274         units/sysinit.target \
275         units/basic.target \
276         units/getty.target \
277         units/halt.target \
278         units/kexec.target \
279         units/local-fs.target \
280         units/local-fs-pre.target \
281         units/remote-fs.target \
282         units/remote-fs-pre.target \
283         units/network.target \
284         units/nss-lookup.target \
285         units/nss-user-lookup.target \
286         units/mail-transfer-agent.target \
287         units/hibernate.target \
288         units/hybrid-sleep.target \
289         units/poweroff.target \
290         units/reboot.target \
291         units/rescue.target \
292         units/rpcbind.target \
293         units/time-sync.target \
294         units/shutdown.target \
295         units/final.target \
296         units/umount.target \
297         units/sigpwr.target \
298         units/sleep.target \
299         units/sockets.target \
300         units/suspend.target \
301         units/swap.target \
302         units/systemd-initctl.socket \
303         units/systemd-shutdownd.socket \
304         units/syslog.socket \
305         units/dev-hugepages.mount \
306         units/dev-mqueue.mount \
307         units/sys-kernel-config.mount \
308         units/sys-kernel-debug.mount \
309         units/sys-fs-fuse-connections.mount \
310         units/tmp.mount \
311         units/printer.target \
312         units/sound.target \
313         units/bluetooth.target \
314         units/smartcard.target \
315         units/systemd-tmpfiles-clean.timer \
316         units/quotaon.service \
317         units/systemd-ask-password-wall.path \
318         units/systemd-ask-password-console.path \
319         units/syslog.target \
320         units/systemd-udevd-control.socket \
321         units/systemd-udevd-kernel.socket \
322         units/system-update.target
323
324 nodist_systemunit_DATA = \
325         units/getty@.service \
326         units/serial-getty@.service \
327         units/console-shell.service \
328         units/console-getty.service \
329         units/systemd-initctl.service \
330         units/systemd-shutdownd.service \
331         units/systemd-remount-fs.service \
332         units/systemd-update-utmp-runlevel.service \
333         units/systemd-update-utmp-shutdown.service \
334         units/systemd-tmpfiles-setup.service \
335         units/systemd-tmpfiles-clean.service \
336         units/systemd-ask-password-wall.service \
337         units/systemd-ask-password-console.service \
338         units/systemd-sysctl.service \
339         units/emergency.service \
340         units/rescue.service \
341         units/user@.service \
342         units/systemd-hibernate.service \
343         units/systemd-hybrid-sleep.service \
344         units/systemd-suspend.service \
345         units/systemd-halt.service \
346         units/systemd-poweroff.service \
347         units/systemd-reboot.service \
348         units/systemd-kexec.service \
349         units/systemd-fsck@.service \
350         units/systemd-fsck-root.service \
351         units/systemd-udevd.service \
352         units/systemd-udev-trigger.service \
353         units/systemd-udev-settle.service \
354         units/debug-shell.service
355
356 if HAVE_KMOD
357 nodist_systemunit_DATA += \
358         units/systemd-modules-load.service
359 endif
360
361 dist_userunit_DATA = \
362         units/user/default.target \
363         units/user/exit.target
364
365 nodist_userunit_DATA = \
366         units/user/systemd-exit.service
367
368 EXTRA_DIST += \
369         units/getty@.service.m4 \
370         units/serial-getty@.service.m4 \
371         units/console-shell.service.m4.in \
372         units/console-getty.service.m4.in \
373         units/rescue.service.m4.in \
374         units/systemd-initctl.service.in \
375         units/systemd-shutdownd.service.in \
376         units/systemd-remount-fs.service.in \
377         units/systemd-update-utmp-runlevel.service.in \
378         units/systemd-update-utmp-shutdown.service.in \
379         units/systemd-tmpfiles-setup.service.in \
380         units/systemd-tmpfiles-clean.service.in \
381         units/systemd-ask-password-wall.service.in \
382         units/systemd-ask-password-console.service.in \
383         units/systemd-sysctl.service.in \
384         units/emergency.service.in \
385         units/systemd-halt.service.in \
386         units/systemd-poweroff.service.in \
387         units/systemd-reboot.service.in \
388         units/systemd-kexec.service.in \
389         units/user/systemd-exit.service.in \
390         units/systemd-fsck@.service.in \
391         units/systemd-fsck-root.service.in \
392         units/user@.service.in \
393         units/systemd-udevd.service \
394         units/systemd-udev-trigger.service \
395         units/systemd-udev-settle.service \
396         units/debug-shell.service.in \
397         units/systemd-hibernate.service.in \
398         units/systemd-hybrid-sleep.service.in \
399         units/systemd-suspend.service.in \
400         units/quotaon.service.in \
401         introspect.awk \
402         man/custom-html.xsl
403
404 if HAVE_KMOD
405 EXTRA_DIST += \
406         units/systemd-modules-load.service.in
407 endif
408
409 if TARGET_FEDORA
410 dist_systemunit_DATA += \
411         units/fedora/rc-local.service \
412         units/fedora/halt-local.service
413 systemgenerator_PROGRAMS += \
414         systemd-rc-local-generator
415 endif
416
417 if TARGET_MANDRIVA
418 dist_systemunit_DATA += \
419         units/fedora/rc-local.service \
420         units/fedora/halt-local.service
421 systemgenerator_PROGRAMS += \
422         systemd-rc-local-generator
423 endif
424
425 if TARGET_SUSE
426 dist_systemunit_DATA += \
427         units/suse/rc-local.service \
428         units/suse/halt-local.service
429 systemgenerator_PROGRAMS += \
430         systemd-rc-local-generator
431 endif
432
433 if TARGET_MAGEIA
434 dist_systemunit_DATA += \
435         units/fedora/rc-local.service \
436         units/fedora/halt-local.service
437 systemgenerator_PROGRAMS += \
438         systemd-rc-local-generator
439 endif
440
441 dist_doc_DATA = \
442         README \
443         NEWS \
444         LICENSE.LGPL2.1 \
445         LICENSE.GPL2 \
446         LICENSE.MIT \
447         DISTRO_PORTING
448
449 @INTLTOOL_POLICY_RULE@
450
451 # ------------------------------------------------------------------------------
452 MANPAGES = \
453         man/systemd.1 \
454         man/systemctl.1 \
455         man/systemd-cgls.1 \
456         man/systemd-delta.1 \
457         man/systemd-cgtop.1 \
458         man/systemd-nspawn.1 \
459         man/systemd-tmpfiles.8 \
460         man/systemd-notify.1 \
461         man/systemd.unit.5 \
462         man/systemd.service.5 \
463         man/systemd.socket.5 \
464         man/systemd.mount.5 \
465         man/systemd.automount.5 \
466         man/systemd.swap.5 \
467         man/systemd.timer.5 \
468         man/systemd.path.5 \
469         man/systemd.target.5 \
470         man/systemd.device.5 \
471         man/systemd.snapshot.5 \
472         man/systemd.exec.5 \
473         man/systemd.kill.5 \
474         man/systemd.special.7 \
475         man/systemd.journal-fields.7 \
476         man/systemd.time.7 \
477         man/kernel-command-line.7 \
478         man/daemon.7 \
479         man/bootup.7 \
480         man/runlevel.8 \
481         man/telinit.8 \
482         man/halt.8 \
483         man/shutdown.8 \
484         man/pam_systemd.8 \
485         man/systemd.conf.5 \
486         man/tmpfiles.d.5 \
487         man/hostname.5 \
488         man/localtime.5 \
489         man/machine-id.5 \
490         man/locale.conf.5 \
491         man/os-release.5 \
492         man/machine-info.5 \
493         man/sysctl.d.5 \
494         man/systemd-sysctl.service.8 \
495         man/systemd-ask-password.1 \
496         man/systemd-cat.1 \
497         man/systemd-machine-id-setup.1 \
498         man/systemd-detect-virt.1 \
499         man/journald.conf.5 \
500         man/systemd-journald.service.8 \
501         man/journalctl.1 \
502         man/systemd-coredumpctl.1 \
503         man/systemd-inhibit.1 \
504         man/systemd-remount-fs.service.8 \
505         man/systemd-update-utmp-runlevel.service.8 \
506         man/systemd-initctl.service.8 \
507         man/systemd-shutdownd.service.8 \
508         man/systemd-suspend.service.8 \
509         man/systemd-halt.service.8 \
510         man/systemd-fsck@.service.8 \
511         man/systemd-ask-password-console.service.8 \
512         man/systemd-analyze.1 \
513         man/systemd-tty-ask-password-agent.1 \
514         man/systemd-getty-generator.8 \
515         man/systemd-system-update-generator.8 \
516         man/systemd-fstab-generator.8 \
517         man/systemd.preset.5 \
518         man/sd-id128.3 \
519         man/sd_id128_to_string.3 \
520         man/sd_id128_randomize.3 \
521         man/sd_id128_get_machine.3 \
522         man/sd-journal.3 \
523         man/sd_journal_print.3 \
524         man/sd_journal_stream_fd.3 \
525         man/sd_journal_open.3 \
526         man/sd_journal_next.3 \
527         man/sd_journal_get_data.3 \
528         man/sd_journal_get_realtime_usec.3 \
529         man/sd_journal_get_cutoff_realtime_usec.3 \
530         man/sd_journal_get_cursor.3 \
531         man/sd_journal_get_fd.3 \
532         man/sd_journal_get_usage.3 \
533         man/sd_journal_add_match.3 \
534         man/sd_journal_seek_head.3 \
535         man/sd_journal_query_unique.3 \
536         man/sd_journal_get_catalog.3
537
538 MANPAGES_ALIAS = \
539         man/reboot.8 \
540         man/poweroff.8 \
541         man/init.1 \
542         man/systemd-sysctl.8 \
543         man/systemd-journald.socket.8 \
544         man/systemd-journald.8 \
545         man/systemd-remount-fs.8 \
546         man/systemd-update-utmp-shutdown.service.8 \
547         man/systemd-update-utmp.8 \
548         man/systemd-initctl.socket.8 \
549         man/systemd-initctl.8 \
550         man/systemd-shutdownd.socket.8 \
551         man/systemd-shutdownd.8 \
552         man/systemd-hibernate.service.8 \
553         man/systemd-hybrid-sleep.service.8 \
554         man/systemd-sleep.8 \
555         man/systemd-shutdown.8 \
556         man/systemd-poweroff.service.8 \
557         man/systemd-reboot.service.8 \
558         man/systemd-kexec.service.8 \
559         man/systemd-fsck.8 \
560         man/systemd-fsck-root.service.8 \
561         man/systemd-ask-password-console.path.8 \
562         man/systemd-ask-password-wall.service.8 \
563         man/systemd-ask-password-wall.path.8 \
564         man/systemd-tmpfiles-setup.service.8 \
565         man/systemd-tmpfiles-clean.service.8 \
566         man/systemd-tmpfiles-clean.timer.8 \
567         man/sd_id128_t.3 \
568         man/SD_ID128_MAKE.3 \
569         man/SD_ID128_CONST_STR.3 \
570         man/SD_ID128_FORMAT_STR.3 \
571         man/SD_ID128_FORMAT_VAL.3 \
572         man/sd_id128_equal.3 \
573         man/sd_id128_from_string.3 \
574         man/sd_id128_get_boot.3 \
575         man/sd_journal_printv.3 \
576         man/sd_journal_send.3 \
577         man/sd_journal_sendv.3 \
578         man/sd_journal_perror.3 \
579         man/SD_JOURNAL_SUPPRESS_LOCATION.3 \
580         man/sd_journal_open_directory.3 \
581         man/sd_journal_close.3 \
582         man/sd_journal.3 \
583         man/SD_JOURNAL_RUNTIME_ONLY.3 \
584         man/SD_JOURNAL_SYSTEM_ONLY.3 \
585         man/SD_JOURNAL_LOCAL_ONLY.3 \
586         man/sd_journal_previous.3 \
587         man/sd_journal_next_skip.3 \
588         man/sd_journal_previous_skip.3 \
589         man/SD_JOURNAL_FOREACH.3 \
590         man/SD_JOURNAL_FOREACH_BACKWARDS.3 \
591         man/sd_journal_enumerate_data.3 \
592         man/sd_journal_restart_data.3 \
593         man/SD_JOURNAL_FOREACH_DATA.3 \
594         man/sd_journal_get_monotonic_usec.3 \
595         man/sd_journal_get_cutoff_monotonic_usec.3 \
596         man/sd_journal_reliable_fd.3 \
597         man/sd_journal_process.3 \
598         man/sd_journal_wait.3 \
599         man/SD_JOURNAL_NOP.3 \
600         man/SD_JOURNAL_APPEND.3 \
601         man/SD_JOURNAL_INVALIDATE.3 \
602         man/sd_journal_add_disjunction.3 \
603         man/sd_journal_flush_matches.3 \
604         man/sd_journal_seek_tail.3 \
605         man/sd_journal_seek_monotonic_usec.3 \
606         man/sd_journal_seek_realtime_usec.3 \
607         man/sd_journal_seek_cursor.3 \
608         man/sd_journal_test_cursor.3 \
609         man/sd_journal_enumerate_unique.3 \
610         man/sd_journal_restart_unique.3 \
611         man/SD_JOURNAL_FOREACH_UNIQUE.3 \
612         man/sd_journal_get_catalog_for_message_id.3
613
614 if HAVE_KMOD
615 MANPAGES += \
616         man/modules-load.d.5 \
617         man/systemd-modules-load.service.8
618 MANPAGES_ALIAS += \
619         man/systemd-modules-load.8
620 man/systemd-modules-load.8: man/systemd-modules-load.service.8
621 endif
622
623 if HAVE_MICROHTTPD
624 MANPAGES += \
625         man/systemd-journal-gatewayd.service.8
626 MANPAGES_ALIAS += \
627         man/systemd-journal-gatewayd.socket.8 \
628         man/systemd-journal-gatewayd.8
629 man/systemd-journal-gatewayd.socket.8: man/systemd-journal-gatewayd.service.8
630 man/systemd-journal-gatewayd.8: man/systemd-journal-gatewayd.service.8
631 endif
632
633 man/reboot.8: man/halt.8
634 man/poweroff.8: man/halt.8
635 man/init.1: man/systemd.1
636 man/systemd-sysctl.8: man/systemd-sysctl.service.8
637 man/systemd-journald.socket.8: man/systemd-journald.service.8
638 man/systemd-journald.8: man/systemd-journald.service.8
639 man/systemd-remount-fs.8: man/systemd-remount-fs.service.8
640 man/systemd-update-utmp-shutdown.service.8: man/systemd-update-utmp-runlevel.service.8
641 man/systemd-update-utmp.8: man/systemd-update-utmp-runlevel.service.8
642 man/systemd-initctl.socket.8: man/systemd-initctl.service.8
643 man/systemd-initctl.8: man/systemd-initctl.service.8
644 man/systemd-shutdownd.socket.8: man/systemd-shutdownd.service.8
645 man/systemd-shutdownd.8: man/systemd-shutdownd.service.8
646 man/systemd-hibernate.service.8: man/systemd-suspend.service.8
647 man/systemd-hybrid-sleep.service.8: man/systemd-suspend.service.8
648 man/systemd-sleep.8: man/systemd-suspend.service.8
649 man/systemd-shutdown.8: man/systemd-halt.service.8
650 man/systemd-poweroff.service.8: man/systemd-halt.service.8
651 man/systemd-reboot.service.8: man/systemd-halt.service.8
652 man/systemd-kexec.service.8: man/systemd-halt.service.8
653 man/systemd-fsck.8: man/systemd-fsck@.service.8
654 man/systemd-fsck-root.service.8: man/systemd-fsck@.service.8
655 man/systemd-ask-password-console.path.8: man/systemd-ask-password-console.service.8
656 man/systemd-ask-password-wall.service.8: man/systemd-ask-password-console.service.8
657 man/systemd-ask-password-wall.path.8: man/systemd-ask-password-console.service.8
658 man/systemd-tmpfiles-setup.service.8: man/systemd-tmpfiles.8
659 man/systemd-tmpfiles-clean.service.8: man/systemd-tmpfiles.8
660 man/systemd-tmpfiles-clean.timer.8: man/systemd-tmpfiles.8
661 man/sd_id128_t.3: man/sd-id128.3
662 man/SD_ID128_MAKE.3: man/sd-id128.3
663 man/SD_ID128_CONST_STR.3: man/sd-id128.3
664 man/SD_ID128_FORMAT_STR.3: man/sd-id128.3
665 man/SD_ID128_FORMAT_VAL.3: man/sd-id128.3
666 man/sd_id128_equal.3: man/sd-id128.3
667 man/sd_id128_from_string.3: man/sd_id128_to_string.3
668 man/sd_id128_get_boot.3: man/sd_id128_get_machine.3
669 man/sd_journal_printv.3: man/sd_journal_print.3
670 man/sd_journal_send.3: man/sd_journal_print.3
671 man/sd_journal_sendv.3: man/sd_journal_print.3
672 man/sd_journal_perror.3: man/sd_journal_print.3
673 man/SD_JOURNAL_SUPPRESS_LOCATION.3: man/sd_journal_print.3
674 man/sd_journal_open_directory.3: man/sd_journal_open.3
675 man/sd_journal_close.3: man/sd_journal_open.3
676 man/sd_journal.3: man/sd_journal_open.3
677 man/SD_JOURNAL_RUNTIME_ONLY.3: man/sd_journal_open.3
678 man/SD_JOURNAL_SYSTEM_ONLY.3: man/sd_journal_open.3
679 man/SD_JOURNAL_LOCAL_ONLY.3: man/sd_journal_open.3
680 man/sd_journal_previous.3: man/sd_journal_next.3
681 man/sd_journal_next_skip.3: man/sd_journal_next.3
682 man/sd_journal_previous_skip.3: man/sd_journal_next.3
683 man/SD_JOURNAL_FOREACH.3: man/sd_journal_next.3
684 man/SD_JOURNAL_FOREACH_BACKWARDS.3: man/sd_journal_next.3
685 man/sd_journal_enumerate_data.3: man/sd_journal_get_data.3
686 man/sd_journal_restart_data.3: man/sd_journal_get_data.3
687 man/SD_JOURNAL_FOREACH_DATA.3: man/sd_journal_get_data.3
688 man/sd_journal_get_monotonic_usec.3: man/sd_journal_get_realtime_usec.3
689 man/sd_journal_get_cutoff_monotonic_usec.3: man/sd_journal_get_cutoff_realtime_usec.3
690 man/sd_journal_reliable_fd.3: man/sd_journal_get_fd.3
691 man/sd_journal_process.3: man/sd_journal_get_fd.3
692 man/sd_journal_wait.3: man/sd_journal_get_fd.3
693 man/SD_JOURNAL_NOP.3: man/sd_journal_get_fd.3
694 man/SD_JOURNAL_APPEND.3: man/sd_journal_get_fd.3
695 man/SD_JOURNAL_INVALIDATE.3: man/sd_journal_get_fd.3
696 man/sd_journal_add_disjunction.3: man/sd_journal_add_match.3
697 man/sd_journal_flush_matches.3: man/sd_journal_add_match.3
698 man/sd_journal_seek_tail.3: man/sd_journal_seek_head.3
699 man/sd_journal_seek_monotonic_usec.3: man/sd_journal_seek_head.3
700 man/sd_journal_seek_realtime_usec.3: man/sd_journal_seek_head.3
701 man/sd_journal_seek_cursor.3: man/sd_journal_seek_head.3
702 man/sd_journal_test_cursor.3: man/sd_journal_get_cursor.3
703 man/sd_journal_enumerate_unique.3: man/sd_journal_query_unique.3
704 man/sd_journal_restart_unique.3: man/sd_journal_query_unique.3
705 man/SD_JOURNAL_FOREACH_UNIQUE.3: man/sd_journal_query_unique.3
706 man/sd_journal_get_catalog_for_message_id.3: man/sd_journal_get_catalog.3
707
708 XML_FILES = \
709         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
710
711 if ENABLE_MANPAGES
712 man_MANS = \
713         $(MANPAGES) \
714         $(MANPAGES_ALIAS)
715
716 noinst_DATA = \
717         ${XML_FILES:.xml=.html}
718
719 CLEANFILES += \
720         $(MANPAGES) \
721         $(MANPAGES_ALIAS) \
722         ${XML_FILES:.xml=.html}
723
724 if HAVE_PYTHON
725 noinst_DATA += \
726         man/index.html
727
728 CLEANFILES += \
729         man/index.html
730
731 man/index.html: make-man-index.py $(XML_FILES)
732         $(AM_V_at)$(MKDIR_P) $(dir $@)
733         $(AM_V_GEN)$(PYTHON) $^ > $@
734
735 MANPAGES += \
736         man/systemd.directives.5
737
738 EXTRA_DIST += \
739         man/index.html
740
741 XML_DIRECTIVE_FILES = \
742         man/systemd.unit.xml \
743         man/systemd.service.xml \
744         man/systemd.socket.xml \
745         man/systemd.mount.xml \
746         man/systemd.automount.xml \
747         man/systemd.swap.xml \
748         man/systemd.target.xml \
749         man/systemd.path.xml \
750         man/systemd.timer.xml \
751         man/systemd.snapshot.xml \
752         man/systemd.exec.xml \
753         man/systemd.kill.xml \
754         man/systemd.device.xml \
755         man/systemd.conf.xml \
756         man/systemd.journal-fields.xml \
757         man/systemd.time.xml
758
759 man/systemd.directives.xml: make-directive-index.py $(XML_DIRECTIVE_FILES)
760         $(AM_V_at)$(MKDIR_P) $(dir $@)
761         $(AM_V_GEN)$(PYTHON) $^ > $@
762
763 EXTRA_DIST += \
764         man/systemd.directives.xml
765
766 endif
767
768 endif
769
770 EXTRA_DIST += \
771         $(XML_FILES) \
772         ${XML_FILES:.xml=.html} \
773         $(MANPAGES) \
774         $(MANPAGES_ALIAS) \
775         make-man-index.py \
776         make-directive-index.py
777
778 # ------------------------------------------------------------------------------
779 noinst_LTLIBRARIES += \
780         libsystemd-shared.la
781
782 libsystemd_shared_la_SOURCES = \
783         src/shared/linux/auto_dev-ioctl.h \
784         src/shared/linux/fanotify.h \
785         src/shared/linux/seccomp.h \
786         src/shared/linux/seccomp-bpf.h \
787         src/shared/missing.h \
788         src/shared/list.h \
789         src/shared/macro.h \
790         src/shared/def.h \
791         src/shared/sparse-endian.h \
792         src/shared/util.c \
793         src/shared/util.h \
794         src/shared/virt.c \
795         src/shared/virt.h \
796         src/shared/path-util.c \
797         src/shared/path-util.h \
798         src/shared/time-util.c \
799         src/shared/time-util.h \
800         src/shared/hashmap.c \
801         src/shared/hashmap.h \
802         src/shared/set.c \
803         src/shared/set.h \
804         src/shared/fdset.c \
805         src/shared/fdset.h \
806         src/shared/strv.c \
807         src/shared/strv.h \
808         src/shared/strbuf.c \
809         src/shared/strbuf.h \
810         src/shared/conf-parser.c \
811         src/shared/conf-parser.h \
812         src/shared/log.c \
813         src/shared/log.h \
814         src/shared/ratelimit.h \
815         src/shared/ratelimit.c \
816         src/shared/exit-status.c \
817         src/shared/exit-status.h \
818         src/shared/utf8.c \
819         src/shared/utf8.h \
820         src/shared/pager.c \
821         src/shared/pager.h \
822         src/shared/ioprio.h \
823         src/shared/socket-util.c \
824         src/shared/socket-util.h \
825         src/shared/conf-files.c \
826         src/shared/conf-files.h \
827         src/shared/cgroup-util.c \
828         src/shared/cgroup-util.h \
829         src/shared/cgroup-show.c \
830         src/shared/cgroup-show.h \
831         src/shared/unit-name.c \
832         src/shared/unit-name.h \
833         src/shared/utmp-wtmp.c \
834         src/shared/utmp-wtmp.h \
835         src/shared/watchdog.c \
836         src/shared/watchdog.h \
837         src/shared/spawn-ask-password-agent.c \
838         src/shared/spawn-ask-password-agent.h \
839         src/shared/specifier.c \
840         src/shared/specifier.h \
841         src/shared/replace-var.c \
842         src/shared/replace-var.h \
843         src/shared/spawn-polkit-agent.c \
844         src/shared/spawn-polkit-agent.h \
845         src/shared/hwclock.c \
846         src/shared/hwclock.h \
847         src/shared/time-dst.c \
848         src/shared/time-dst.h \
849         src/shared/calendarspec.c \
850         src/shared/calendarspec.h
851
852 libsystemd_shared_la_LIBADD = libsystemd-daemon.la
853
854 #-------------------------------------------------------------------------------
855 noinst_LTLIBRARIES += \
856         libsystemd-dbus.la
857
858 libsystemd_dbus_la_SOURCES = \
859         src/shared/dbus-common.c \
860         src/shared/dbus-common.h \
861         src/shared/dbus-loop.c \
862         src/shared/dbus-loop.h \
863         src/shared/polkit.c \
864         src/shared/polkit.h
865
866 libsystemd_dbus_la_CFLAGS = \
867         $(AM_CFLAGS) \
868         $(DBUS_CFLAGS)
869
870 libsystemd_dbus_la_LIBADD = \
871         $(DBUS_LIBS)
872
873 # ------------------------------------------------------------------------------
874 noinst_LTLIBRARIES += \
875         libsystemd-units.la
876
877 libsystemd_units_la_SOURCES = \
878         src/shared/install.c \
879         src/shared/install.h \
880         src/shared/path-lookup.c \
881         src/shared/path-lookup.h
882
883 libsystemd_units_la_CFLAGS = \
884         $(AM_CFLAGS) \
885         $(DBUS_CFLAGS)
886
887 # ------------------------------------------------------------------------------
888 noinst_LTLIBRARIES += \
889         libsystemd-label.la
890
891 libsystemd_label_la_SOURCES = \
892         src/shared/cgroup-label.c \
893         src/shared/socket-label.c \
894         src/shared/label.c \
895         src/shared/label.h \
896         src/shared/selinux-util.c \
897         src/shared/selinux-util.h \
898         src/shared/mkdir.c \
899         src/shared/mkdir.h \
900         src/shared/ask-password-api.c \
901         src/shared/ask-password-api.h \
902         src/shared/dev-setup.c \
903         src/shared/dev-setup.h
904
905 libsystemd_label_la_CFLAGS = \
906         $(AM_CFLAGS) \
907         $(SELINUX_CFLAGS)
908
909 libsystemd_label_la_LIBADD = \
910         $(SELINUX_LIBS)
911
912 # ------------------------------------------------------------------------------
913 noinst_LTLIBRARIES += \
914         libsystemd-logs.la
915
916 libsystemd_logs_la_SOURCES = \
917         src/shared/logs-show.c \
918         src/shared/logs-show.h
919
920 libsystemd_logs_la_CFLAGS = \
921         $(AM_CFLAGS)
922
923 libsystemd_logs_la_LIBADD = \
924         libsystemd-journal-internal.la \
925         libsystemd-id128-internal.la \
926         libsystemd-shared.la
927
928 # ------------------------------------------------------------------------------
929 noinst_LTLIBRARIES += \
930         libsystemd-capability.la
931
932 libsystemd_capability_la_SOURCES = \
933         src/shared/capability.c \
934         src/shared/capability.h
935
936 libsystemd_capability_la_CFLAGS = \
937         $(AM_CFLAGS) \
938         $(CAP_CFLAGS)
939
940 libsystemd_capability_la_LIBADD = \
941         $(CAP_LIBS)
942
943 # ------------------------------------------------------------------------------
944 noinst_LTLIBRARIES += \
945         libsystemd-audit.la
946
947 libsystemd_audit_la_SOURCES = \
948         src/shared/audit.c \
949         src/shared/audit.h
950
951 libsystemd_audit_la_LIBADD = \
952         libsystemd-capability.la
953
954 # ------------------------------------------------------------------------------
955 if HAVE_ACL
956 noinst_LTLIBRARIES += \
957         libsystemd-acl.la
958
959 libsystemd_acl_la_SOURCES = \
960         src/shared/acl-util.c \
961         src/shared/acl-util.h
962
963 libsystemd_acl_la_CFLAGS = \
964         $(AM_CFLAGS) \
965         $(ACL_CFLAGS)
966
967 libsystemd_acl_la_LIBADD = \
968         $(ACL_LIBS)
969 endif
970
971 # ------------------------------------------------------------------------------
972 noinst_LTLIBRARIES += \
973         libsystemd-core.la
974
975 libsystemd_core_la_SOURCES = \
976         src/core/unit.c \
977         src/core/unit.h \
978         src/core/unit-printf.c \
979         src/core/unit-printf.h \
980         src/core/job.c \
981         src/core/job.h \
982         src/core/manager.c \
983         src/core/manager.h \
984         src/core/transaction.c \
985         src/core/transaction.h \
986         src/core/load-fragment.c \
987         src/core/load-fragment.h \
988         src/core/service.c \
989         src/core/service.h \
990         src/core/automount.c \
991         src/core/automount.h \
992         src/core/mount.c \
993         src/core/mount.h \
994         src/core/swap.c \
995         src/core/swap.h \
996         src/core/device.c \
997         src/core/device.h \
998         src/core/target.c \
999         src/core/target.h \
1000         src/core/snapshot.c \
1001         src/core/snapshot.h \
1002         src/core/socket.c \
1003         src/core/socket.h \
1004         src/core/timer.c \
1005         src/core/timer.h \
1006         src/core/path.c \
1007         src/core/path.h \
1008         src/core/load-dropin.c \
1009         src/core/load-dropin.h \
1010         src/core/execute.c \
1011         src/core/execute.h \
1012         src/core/kill.c \
1013         src/core/kill.h \
1014         src/core/dbus.c \
1015         src/core/dbus.h \
1016         src/core/dbus-manager.c \
1017         src/core/dbus-manager.h \
1018         src/core/dbus-unit.c \
1019         src/core/dbus-unit.h \
1020         src/core/dbus-job.c \
1021         src/core/dbus-job.h \
1022         src/core/dbus-service.c \
1023         src/core/dbus-service.h \
1024         src/core/dbus-socket.c \
1025         src/core/dbus-socket.h \
1026         src/core/dbus-timer.c \
1027         src/core/dbus-timer.h \
1028         src/core/dbus-target.c \
1029         src/core/dbus-target.h \
1030         src/core/dbus-mount.c \
1031         src/core/dbus-mount.h \
1032         src/core/dbus-automount.c \
1033         src/core/dbus-automount.h \
1034         src/core/dbus-swap.c \
1035         src/core/dbus-swap.h \
1036         src/core/dbus-snapshot.c \
1037         src/core/dbus-snapshot.h \
1038         src/core/dbus-device.c \
1039         src/core/dbus-device.h \
1040         src/core/dbus-execute.c \
1041         src/core/dbus-execute.h \
1042         src/core/dbus-kill.c \
1043         src/core/dbus-kill.h \
1044         src/core/dbus-path.c \
1045         src/core/dbus-path.h \
1046         src/core/cgroup.c \
1047         src/core/cgroup.h \
1048         src/core/selinux-access.c \
1049         src/core/selinux-access.h \
1050         src/core/selinux-setup.c \
1051         src/core/selinux-setup.h \
1052         src/core/ima-setup.c \
1053         src/core/ima-setup.h \
1054         src/core/locale-setup.h \
1055         src/core/locale-setup.c \
1056         src/core/hostname-setup.c \
1057         src/core/hostname-setup.h \
1058         src/core/machine-id-setup.c \
1059         src/core/machine-id-setup.h \
1060         src/core/mount-setup.c \
1061         src/core/mount-setup.h \
1062         src/core/loopback-setup.h \
1063         src/core/loopback-setup.c \
1064         src/core/condition.c \
1065         src/core/condition.h \
1066         src/core/namespace.c \
1067         src/core/namespace.h \
1068         src/core/tcpwrap.c \
1069         src/core/tcpwrap.h \
1070         src/core/cgroup-attr.c \
1071         src/core/cgroup-attr.h \
1072         src/core/securebits.h \
1073         src/core/initreq.h \
1074         src/core/special.h \
1075         src/core/bus-errors.h \
1076         src/core/build.h \
1077         src/core/sysfs-show.h \
1078         src/core/switch-root.h \
1079         src/core/switch-root.c \
1080         src/core/killall.h \
1081         src/core/killall.c \
1082         src/core/syscall-list.c \
1083         src/core/syscall-list.h \
1084         src/core/audit-fd.c \
1085         src/core/audit-fd.h
1086
1087 if HAVE_KMOD
1088 libsystemd_core_la_SOURCES += \
1089         src/core/kmod-setup.c \
1090         src/core/kmod-setup.h
1091 endif
1092
1093 nodist_libsystemd_core_la_SOURCES = \
1094         src/core/load-fragment-gperf.c \
1095         src/core/load-fragment-gperf-nulstr.c \
1096         src/core/syscall-from-name.h \
1097         src/core/syscall-to-name.h
1098
1099 libsystemd_core_la_CFLAGS = \
1100         $(AM_CFLAGS) \
1101         $(DBUS_CFLAGS) \
1102         $(LIBWRAP_CFLAGS) \
1103         $(PAM_CFLAGS) \
1104         $(AUDIT_CFLAGS) \
1105         $(KMOD_CFLAGS)
1106
1107 libsystemd_core_la_LIBADD = \
1108         libsystemd-capability.la \
1109         libsystemd-units.la \
1110         libsystemd-label.la \
1111         libsystemd-shared.la \
1112         libsystemd-dbus.la \
1113         libsystemd-audit.la \
1114         libsystemd-id128-internal.la \
1115         libsystemd-daemon.la \
1116         libudev.la \
1117         $(LIBWRAP_LIBS) \
1118         $(PAM_LIBS) \
1119         $(AUDIT_LIBS) \
1120         $(CAP_LIBS) \
1121         $(KMOD_LIBS)
1122
1123 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1124         $(AM_V_at)$(MKDIR_P) $(dir $@)
1125         $(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 ";" }' < $< > $@
1126
1127 EXTRA_DIST += \
1128         src/core/load-fragment-gperf.gperf.m4
1129
1130 CLEANFILES += \
1131         src/core/load-fragment-gperf.gperf \
1132         src/core/load-fragment-gperf.c \
1133         src/core/load-fragment-gperf-nulstr.c \
1134         src/core/syscall-list.txt \
1135         src/core/syscall-from-name.gperf
1136
1137 BUILT_SOURCES += \
1138         src/core/syscall-from-name.h \
1139         src/core/syscall-to-name.h
1140
1141 src/core/syscall-list.txt: Makefile
1142         $(AM_V_at)$(MKDIR_P) $(dir $@)
1143         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+\(?.*[0-9]+.*\)?/ { sub(/__NR_/, "", $$2); print $$2; }' > $@
1144
1145 src/core/syscall-from-name.gperf: src/core/syscall-list.txt Makefile
1146         $(AM_V_at)$(MKDIR_P) $(dir $@)
1147         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct syscall_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, __NR_%s\n", $$1, $$1 }' < $< > $@
1148
1149 src/core/syscall-from-name.h: src/core/syscall-from-name.gperf Makefile
1150         $(AM_V_at)$(MKDIR_P) $(dir $@)
1151         $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_syscall -H hash_syscall_name -p -C < $< > $@
1152
1153 src/core/syscall-to-name.h: src/core/syscall-list.txt Makefile
1154         $(AM_V_at)$(MKDIR_P) $(dir $@)
1155         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const syscall_names[] = { "} { printf "[__NR_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1156
1157 # ------------------------------------------------------------------------------
1158 systemd_SOURCES = \
1159         src/core/main.c
1160
1161 systemd_CFLAGS = \
1162         $(AM_CFLAGS) \
1163         $(DBUS_CFLAGS)
1164
1165 systemd_LDADD = \
1166         libsystemd-core.la \
1167         libsystemd-daemon.la \
1168         libsystemd-id128-internal.la \
1169         libsystemd-dbus.la
1170
1171 dist_pkgsysconf_DATA += \
1172         src/core/system.conf \
1173         src/core/user.conf
1174
1175 dist_dbuspolicy_DATA += \
1176         src/core/org.freedesktop.systemd1.conf
1177
1178 dist_dbussystemservice_DATA += \
1179         src/core/org.freedesktop.systemd1.service
1180
1181 dbusinterface_DATA += \
1182         org.freedesktop.systemd1.Manager.xml \
1183         org.freedesktop.systemd1.Job.xml \
1184         org.freedesktop.systemd1.Unit.xml \
1185         org.freedesktop.systemd1.Service.xml \
1186         org.freedesktop.systemd1.Socket.xml \
1187         org.freedesktop.systemd1.Timer.xml \
1188         org.freedesktop.systemd1.Target.xml \
1189         org.freedesktop.systemd1.Device.xml \
1190         org.freedesktop.systemd1.Mount.xml \
1191         org.freedesktop.systemd1.Automount.xml \
1192         org.freedesktop.systemd1.Snapshot.xml \
1193         org.freedesktop.systemd1.Swap.xml \
1194         org.freedesktop.systemd1.Path.xml
1195
1196 polkitpolicy_in_in_files = \
1197         src/core/org.freedesktop.systemd1.policy.in.in
1198
1199 org.freedesktop.systemd1.%.xml: systemd
1200         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \
1201                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1202                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1203
1204 pkgconfigdata_DATA = \
1205         src/core/systemd.pc
1206
1207 nodist_rpmmacros_DATA = \
1208         src/core/macros.systemd
1209
1210 EXTRA_DIST += \
1211         src/core/systemd.pc.in \
1212         src/core/macros.systemd.in
1213
1214 CLEANFILES += \
1215         src/core/macros.systemd
1216
1217 # ------------------------------------------------------------------------------
1218 noinst_PROGRAMS += \
1219         test-engine \
1220         test-job-type \
1221         test-ns \
1222         test-loopback \
1223         test-hostname \
1224         test-daemon \
1225         test-cgroup \
1226         test-env-replace \
1227         test-strv \
1228         test-install \
1229         test-watchdog \
1230         test-unit-name \
1231         test-log \
1232         test-unit-file \
1233         test-date \
1234         test-sleep \
1235         test-replace-var \
1236         test-sched-prio \
1237         test-calendarspec \
1238         test-strip-tab-ansi
1239
1240 TESTS += \
1241         test-job-type \
1242         test-env-replace \
1243         test-strv \
1244         test-unit-name \
1245         test-unit-file \
1246         test-date \
1247         test-sleep \
1248         test-replace-var \
1249         test-sched-prio \
1250         test-calendarspec \
1251         test-strip-tab-ansi
1252
1253 EXTRA_DIST += \
1254         test/sched_idle_bad.service \
1255         test/sched_idle_ok.service \
1256         test/sched_rr_bad.service \
1257         test/sched_rr_ok.service \
1258         test/sched_rr_change.service
1259
1260 test_engine_SOURCES = \
1261         src/test/test-engine.c
1262
1263 test_engine_CFLAGS = \
1264         $(AM_CFLAGS) \
1265         $(DBUS_CFLAGS)
1266
1267 test_engine_LDADD = \
1268         libsystemd-core.la \
1269         libsystemd-daemon.la \
1270         libsystemd-dbus.la
1271
1272 test_job_type_SOURCES = \
1273         src/test/test-job-type.c
1274
1275 test_job_type_CFLAGS = \
1276         $(AM_CFLAGS) \
1277         $(DBUS_CFLAGS)
1278
1279 test_job_type_LDADD = \
1280         libsystemd-core.la \
1281         libsystemd-daemon.la
1282
1283 test_ns_SOURCES = \
1284         src/test/test-ns.c
1285
1286 test_ns_LDADD = \
1287         libsystemd-core.la
1288
1289 test_loopback_SOURCES = \
1290         src/test/test-loopback.c
1291
1292 test_loopback_LDADD = \
1293         libsystemd-shared.la \
1294         libsystemd-core.la
1295
1296 test_hostname_SOURCES = \
1297         src/test/test-hostname.c
1298
1299 test_hostname_LDADD = \
1300         libsystemd-core.la
1301
1302 test_unit_name_SOURCES = \
1303         src/test/test-unit-name.c
1304
1305 test_unit_name_LDADD = \
1306         libsystemd-core.la
1307
1308 test_unit_file_SOURCES = \
1309         src/test/test-unit-file.c
1310
1311 test_unit_file_CFLAGS = \
1312         $(AM_CFLAGS) \
1313         $(DBUS_CFLAGS)
1314
1315 test_unit_file_LDADD = \
1316         libsystemd-core.la
1317
1318 test_log_SOURCES = \
1319         src/test/test-log.c
1320
1321 test_log_LDADD = \
1322         libsystemd-core.la
1323
1324 test_date_SOURCES = \
1325         src/test/test-date.c
1326
1327 test_date_LDADD = \
1328         libsystemd-core.la
1329
1330 test_sleep_SOURCES = \
1331         src/test/test-sleep.c
1332
1333 test_sleep_LDADD = \
1334         libsystemd-core.la
1335
1336 test_replace_var_SOURCES = \
1337         src/test/test-replace-var.c
1338
1339 test_replace_var_LDADD = \
1340         libsystemd-shared.la
1341
1342 test_calendarspec_SOURCES = \
1343         src/test/test-calendarspec.c
1344
1345 test_calendarspec_LDADD = \
1346         libsystemd-shared.la
1347
1348 test_strip_tab_ansi_SOURCES = \
1349         src/test/test-strip-tab-ansi.c
1350
1351 test_strip_tab_ansi_LDADD = \
1352         libsystemd-shared.la
1353
1354 test_daemon_SOURCES = \
1355         src/test/test-daemon.c
1356
1357 test_daemon_LDADD = \
1358         libsystemd-shared.la \
1359         libsystemd-daemon.la
1360
1361 test_cgroup_SOURCES = \
1362         src/test/test-cgroup.c
1363
1364 test_cgroup_LDADD = \
1365         libsystemd-label.la \
1366         libsystemd-shared.la
1367
1368 test_env_replace_SOURCES = \
1369         src/test/test-env-replace.c
1370
1371 test_env_replace_LDADD = \
1372         libsystemd-shared.la
1373
1374 test_strv_SOURCES = \
1375         src/test/test-strv.c
1376
1377 test_strv_LDADD = \
1378         libsystemd-shared.la
1379
1380 test_install_SOURCES = \
1381         src/test/test-install.c
1382
1383 test_install_CFLAGS = \
1384         $(AM_CFLAGS) \
1385         $(DBUS_CFLAGS)
1386
1387 test_install_LDADD = \
1388         libsystemd-units.la \
1389         libsystemd-label.la \
1390         libsystemd-shared.la
1391
1392 test_watchdog_SOURCES = \
1393         src/test/test-watchdog.c
1394
1395 test_watchdog_LDADD = \
1396         libsystemd-shared.la
1397
1398 test_sched_prio_SOURCES = \
1399         src/test/test-sched-prio.c
1400
1401 test_sched_prio_CFLAGS = \
1402         $(AM_CFLAGS) \
1403         $(DBUS_CFLAGS) \
1404         -D"STR(s)=\#s" -D"TEST_DIR=STR($(abs_top_srcdir)/test/)"
1405
1406 test_sched_prio_LDADD = \
1407         libsystemd-core.la \
1408         libsystemd-daemon.la
1409
1410 # ------------------------------------------------------------------------------
1411 systemd_initctl_SOURCES = \
1412         src/initctl/initctl.c
1413
1414 systemd_initctl_CFLAGS = \
1415         $(AM_CFLAGS) \
1416         $(DBUS_CFLAGS)
1417
1418 systemd_initctl_LDADD = \
1419         libsystemd-shared.la \
1420         libsystemd-daemon.la \
1421         libsystemd-dbus.la
1422
1423 # ------------------------------------------------------------------------------
1424 systemd_update_utmp_SOURCES = \
1425         src/update-utmp/update-utmp.c
1426
1427 systemd_update_utmp_CFLAGS = \
1428         $(AM_CFLAGS) \
1429         $(DBUS_CFLAGS) \
1430         $(AUDIT_CFLAGS)
1431
1432 systemd_update_utmp_LDADD = \
1433         libsystemd-shared.la \
1434         libsystemd-dbus.la \
1435         $(AUDIT_LIBS)
1436
1437 # ------------------------------------------------------------------------------
1438 systemd_shutdownd_SOURCES = \
1439         src/shutdownd/shutdownd.c
1440
1441 systemd_shutdownd_LDADD = \
1442         libsystemd-label.la \
1443         libsystemd-shared.la \
1444         libsystemd-daemon.la
1445
1446 pkginclude_HEADERS += \
1447         src/systemd/sd-shutdown.h
1448
1449 # ------------------------------------------------------------------------------
1450 systemd_shutdown_SOURCES = \
1451         src/core/umount.c \
1452         src/core/umount.h \
1453         src/core/shutdown.c \
1454         src/core/mount-setup.c \
1455         src/core/mount-setup.h \
1456         src/core/killall.h \
1457         src/core/killall.c
1458
1459 systemd_shutdown_LDADD = \
1460         libsystemd-label.la \
1461         libsystemd-shared.la \
1462         libudev.la
1463
1464 if HAVE_KMOD
1465 # ------------------------------------------------------------------------------
1466 systemd_modules_load_SOURCES = \
1467         src/modules-load/modules-load.c
1468
1469 systemd_modules_load_CFLAGS = \
1470         $(AM_CFLAGS) \
1471         $(KMOD_CFLAGS)
1472
1473 systemd_modules_load_LDADD = \
1474         libsystemd-shared.la \
1475         $(KMOD_LIBS)
1476 endif
1477
1478 # ------------------------------------------------------------------------------
1479 systemd_tmpfiles_SOURCES = \
1480         src/tmpfiles/tmpfiles.c
1481
1482 systemd_tmpfiles_LDADD = \
1483         libsystemd-label.la \
1484         libsystemd-shared.la \
1485         libsystemd-capability.la
1486
1487 # ------------------------------------------------------------------------------
1488 systemd_machine_id_setup_SOURCES = \
1489         src/machine-id-setup/machine-id-setup-main.c \
1490         src/core/machine-id-setup.c \
1491         src/core/machine-id-setup.h
1492
1493 systemd_machine_id_setup_LDADD = \
1494         libsystemd-label.la \
1495         libsystemd-shared.la \
1496         libsystemd-id128-internal.la
1497
1498 # ------------------------------------------------------------------------------
1499 systemd_sysctl_SOURCES = \
1500         src/sysctl/sysctl.c
1501
1502 systemd_sysctl_LDADD = \
1503         libsystemd-shared.la
1504
1505 # ------------------------------------------------------------------------------
1506 systemd_sleep_SOURCES = \
1507         src/sleep/sleep.c
1508
1509 systemd_sleep_LDADD = \
1510         libsystemd-shared.la
1511
1512 # ------------------------------------------------------------------------------
1513 systemd_fsck_SOURCES = \
1514         src/fsck/fsck.c
1515
1516 systemd_fsck_CFLAGS = \
1517         $(AM_CFLAGS) \
1518         $(DBUS_CFLAGS)
1519
1520 systemd_fsck_LDADD = \
1521         libsystemd-shared.la \
1522         libsystemd-dbus.la \
1523         libudev.la
1524
1525 # ------------------------------------------------------------------------------
1526 systemd_timestamp_SOURCES = \
1527         src/timestamp/timestamp.c
1528
1529 systemd_timestamp_LDADD = \
1530         libsystemd-shared.la
1531
1532 # ------------------------------------------------------------------------------
1533 systemd_ac_power_SOURCES = \
1534         src/ac-power/ac-power.c
1535
1536 systemd_ac_power_LDADD = \
1537         libsystemd-shared.la \
1538         libudev.la
1539
1540 # ------------------------------------------------------------------------------
1541 systemd_detect_virt_SOURCES = \
1542         src/detect-virt/detect-virt.c
1543
1544 systemd_detect_virt_LDADD = \
1545         libsystemd-shared.la
1546
1547 systemd-detect-virt-install-hook:
1548         -$(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt
1549
1550 INSTALL_EXEC_HOOKS += \
1551         systemd-detect-virt-install-hook
1552
1553 # ------------------------------------------------------------------------------
1554 systemd_delta_SOURCES = \
1555         src/delta/delta.c
1556
1557 systemd_delta_LDADD = \
1558         libsystemd-shared.la
1559
1560 # ------------------------------------------------------------------------------
1561 systemd_getty_generator_SOURCES = \
1562         src/getty-generator/getty-generator.c
1563
1564 systemd_getty_generator_LDADD = \
1565         libsystemd-label.la \
1566         libsystemd-shared.la
1567
1568 # ------------------------------------------------------------------------------
1569 systemd_fstab_generator_SOURCES = \
1570         src/fstab-generator/fstab-generator.c \
1571         src/core/mount-setup.c
1572
1573 systemd_fstab_generator_LDADD = \
1574         libsystemd-label.la \
1575         libsystemd-shared.la
1576
1577 # ------------------------------------------------------------------------------
1578 systemd_system_update_generator_SOURCES = \
1579         src/system-update-generator/system-update-generator.c
1580
1581 systemd_system_update_generator_LDADD = \
1582         libsystemd-label.la \
1583         libsystemd-shared.la
1584
1585 # ------------------------------------------------------------------------------
1586 systemd_rc_local_generator_SOURCES = \
1587         src/rc-local-generator/rc-local-generator.c
1588
1589 systemd_rc_local_generator_LDADD = \
1590         libsystemd-label.la \
1591         libsystemd-shared.la
1592
1593 # ------------------------------------------------------------------------------
1594 systemd_remount_fs_SOURCES = \
1595         src/remount-fs/remount-fs.c \
1596         src/core/mount-setup.c \
1597         src/core/mount-setup.h
1598
1599 systemd_remount_fs_LDADD = \
1600         libsystemd-label.la \
1601         libsystemd-shared.la
1602
1603 # ------------------------------------------------------------------------------
1604 systemd_cgroups_agent_SOURCES = \
1605         src/cgroups-agent/cgroups-agent.c
1606
1607 systemd_cgroups_agent_CFLAGS = \
1608         $(AM_CFLAGS) \
1609         $(DBUS_CFLAGS)
1610
1611 systemd_cgroups_agent_LDADD = \
1612         libsystemd-shared.la \
1613         libsystemd-dbus.la
1614
1615 # ------------------------------------------------------------------------------
1616 systemctl_SOURCES = \
1617         src/systemctl/systemctl.c
1618
1619 systemctl_CFLAGS = \
1620         $(AM_CFLAGS) \
1621         $(DBUS_CFLAGS)
1622
1623 systemctl_LDADD = \
1624         libsystemd-units.la \
1625         libsystemd-label.la \
1626         libsystemd-shared.la \
1627         libsystemd-daemon.la \
1628         libsystemd-dbus.la \
1629         libsystemd-logs.la
1630
1631 # ------------------------------------------------------------------------------
1632 systemd_notify_SOURCES = \
1633         src/notify/notify.c \
1634         src/readahead/sd-readahead.c
1635
1636 systemd_notify_LDADD = \
1637         libsystemd-shared.la \
1638         libsystemd-daemon.la
1639
1640 # ------------------------------------------------------------------------------
1641 systemd_ask_password_SOURCES = \
1642         src/ask-password/ask-password.c
1643
1644 systemd_ask_password_LDADD = \
1645         libsystemd-label.la \
1646         libsystemd-shared.la
1647
1648 # ------------------------------------------------------------------------------
1649 systemd_reply_password_SOURCES = \
1650         src/reply-password/reply-password.c
1651
1652 systemd_reply_password_LDADD = \
1653         libsystemd-shared.la
1654
1655 # ------------------------------------------------------------------------------
1656 systemd_cgls_SOURCES = \
1657         src/cgls/cgls.c
1658
1659 systemd_cgls_LDADD = \
1660         libsystemd-shared.la
1661
1662 # ------------------------------------------------------------------------------
1663 systemd_cgtop_SOURCES = \
1664         src/cgtop/cgtop.c
1665
1666 systemd_cgtop_LDADD = \
1667         libsystemd-shared.la
1668
1669 # ------------------------------------------------------------------------------
1670 systemd_nspawn_SOURCES = \
1671         src/nspawn/nspawn.c \
1672         src/core/mount-setup.c \
1673         src/core/mount-setup.h \
1674         src/core/loopback-setup.c \
1675         src/core/loopback-setup.h
1676
1677 systemd_nspawn_LDADD = \
1678         libsystemd-label.la \
1679         libsystemd-capability.la \
1680         libsystemd-shared.la \
1681         libsystemd-daemon.la \
1682         libsystemd-id128-internal.la
1683
1684 # ------------------------------------------------------------------------------
1685 systemd_stdio_bridge_SOURCES = \
1686         src/stdio-bridge/stdio-bridge.c
1687
1688 systemd_stdio_bridge_LDADD = \
1689         libsystemd-shared.la
1690
1691 # ------------------------------------------------------------------------------
1692 systemd_tty_ask_password_agent_SOURCES = \
1693         src/tty-ask-password-agent/tty-ask-password-agent.c
1694
1695 systemd_tty_ask_password_agent_LDADD = \
1696         libsystemd-label.la \
1697         libsystemd-shared.la
1698
1699 # ------------------------------------------------------------------------------
1700 libsystemd_daemon_la_SOURCES = \
1701         src/libsystemd-daemon/sd-daemon.c
1702
1703 libsystemd_daemon_la_CFLAGS = \
1704         $(AM_CFLAGS) \
1705         -fvisibility=hidden \
1706         -DSD_EXPORT_SYMBOLS
1707
1708 libsystemd_daemon_la_LDFLAGS = \
1709         $(AM_LDFLAGS) \
1710         -shared \
1711         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
1712         -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon/libsystemd-daemon.sym
1713
1714 pkginclude_HEADERS += \
1715         src/systemd/sd-daemon.h
1716
1717 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1718 libsystemd-daemon-install-hook:
1719         if test "$(libdir)" != "$(rootlibdir)"; then \
1720                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
1721                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-daemon.so) && \
1722                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
1723                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-daemon.so && \
1724                 mv $(DESTDIR)$(libdir)/libsystemd-daemon.so.* $(DESTDIR)$(rootlibdir); \
1725         fi
1726
1727 INSTALL_EXEC_HOOKS += \
1728         libsystemd-daemon-install-hook
1729
1730 libsystemd-daemon-uninstall-hook:
1731         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
1732
1733 UNINSTALL_EXEC_HOOKS += \
1734         libsystemd-daemon-uninstall-hook
1735
1736 lib_LTLIBRARIES += \
1737         libsystemd-daemon.la
1738
1739 pkgconfiglib_DATA += \
1740         src/libsystemd-daemon/libsystemd-daemon.pc
1741
1742 MANPAGES += \
1743         man/sd-daemon.3 \
1744         man/sd_notify.3 \
1745         man/sd_listen_fds.3 \
1746         man/sd_is_fifo.3 \
1747         man/sd_booted.3
1748
1749 MANPAGES_ALIAS += \
1750         man/sd_is_socket.3 \
1751         man/sd_is_socket_unix.3 \
1752         man/sd_is_socket_inet.3 \
1753         man/sd_is_mq.3 \
1754         man/sd_notifyf.3 \
1755         man/SD_LISTEN_FDS_START.3 \
1756         man/SD_EMERG.3 \
1757         man/SD_ALERT.3 \
1758         man/SD_CRIT.3 \
1759         man/SD_ERR.3 \
1760         man/SD_WARNING.3 \
1761         man/SD_NOTICE.3 \
1762         man/SD_INFO.3 \
1763         man/SD_DEBUG.3
1764
1765 man/sd_is_socket.3: man/sd_is_fifo.3
1766 man/sd_is_socket_unix.3: man/sd_is_fifo.3
1767 man/sd_is_socket_inet.3: man/sd_is_fifo.3
1768 man/sd_is_mq.3: man/sd_is_fifo.3
1769 man/sd_notifyf.3: man/sd_notify.3
1770 man/SD_LISTEN_FDS_START.3: man/sd_listen_fds.3
1771 man/SD_EMERG.3: man/sd-daemon.3
1772 man/SD_ALERT.3: man/sd-daemon.3
1773 man/SD_CRIT.3: man/sd-daemon.3
1774 man/SD_ERR.3: man/sd-daemon.3
1775 man/SD_WARNING.3: man/sd-daemon.3
1776 man/SD_NOTICE.3: man/sd-daemon.3
1777 man/SD_INFO.3: man/sd-daemon.3
1778 man/SD_DEBUG.3: man/sd-daemon.3
1779
1780 EXTRA_DIST += \
1781         src/libsystemd-daemon/libsystemd-daemon.pc.in \
1782         src/libsystemd-daemon/libsystemd-daemon.sym
1783
1784 # ------------------------------------------------------------------------------
1785 if ENABLE_GTK_DOC
1786 SUBDIRS += \
1787         docs/libudev
1788 endif
1789
1790 include_HEADERS += \
1791         src/libudev/libudev.h
1792
1793 lib_LTLIBRARIES += \
1794         libudev.la
1795
1796 libudev_la_SOURCES =\
1797         src/libudev/libudev-private.h \
1798         src/libudev/libudev.c \
1799         src/libudev/libudev-list.c \
1800         src/libudev/libudev-util.c \
1801         src/libudev/libudev-device.c \
1802         src/libudev/libudev-enumerate.c \
1803         src/libudev/libudev-monitor.c \
1804         src/libudev/libudev-queue.c \
1805         src/libudev/libudev-hwdb-def.h \
1806         src/libudev/libudev-hwdb.c
1807
1808 libudev_la_CFLAGS = \
1809         $(AM_CFLAGS) \
1810         -fvisibility=hidden
1811
1812 libudev_la_LDFLAGS = \
1813         $(AM_LDFLAGS) \
1814         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
1815         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
1816
1817 libudev_la_LIBADD = \
1818         libsystemd-shared.la
1819
1820 pkgconfiglib_DATA += \
1821         src/libudev/libudev.pc
1822
1823 EXTRA_DIST += \
1824         src/libudev/libudev.pc.in \
1825         src/libudev/libudev.sym
1826
1827 CLEANFILES += \
1828         src/libudev/libudev.pc
1829
1830 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1831 libudev-install-move-hook:
1832         if test "$(libdir)" != "$(rootlibdir)"; then \
1833                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
1834                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libudev.so) && \
1835                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
1836                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libudev.so && \
1837                 mv $(DESTDIR)$(libdir)/libudev.so.* $(DESTDIR)$(rootlibdir); \
1838         fi
1839
1840 libudev-uninstall-move-hook:
1841         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
1842
1843 INSTALL_EXEC_HOOKS += libudev-install-move-hook
1844 UNINSTALL_EXEC_HOOKS += libudev-uninstall-move-hook
1845
1846 # ------------------------------------------------------------------------------
1847 noinst_LTLIBRARIES += \
1848         libudev-private.la
1849
1850 libudev_private_la_SOURCES =\
1851         $(libudev_la_SOURCES) \
1852         src/libudev/libudev-device-private.c \
1853         src/libudev/libudev-queue-private.c
1854
1855 libudev_private_la_CFLAGS = \
1856         $(AM_CFLAGS) \
1857         -fvisibility=default
1858
1859 libudev_private_la_LIBADD = \
1860         libsystemd-shared.la
1861
1862 # ------------------------------------------------------------------------------
1863 MANPAGES += \
1864         man/udev.7 \
1865         man/udevadm.8 \
1866         man/systemd-udevd.service.8
1867
1868 MANPAGES_ALIAS += \
1869         man/systemd-udevd.8 \
1870         man/systemd-udevd-control.socket.8 \
1871         man/systemd-udevd-kernel.socket.8
1872
1873 man/systemd-udevd.8: man/systemd-udevd.service.8
1874 man/systemd-udevd-control.socket.8: man/systemd-udevd.service.8
1875 man/systemd-udevd-kernel.socket.8: man/systemd-udevd.service.8
1876
1877 udev-confdirs:
1878         -$(MKDIR_P) $(DESTDIR)$(sysconfdir)/udev/rules.d
1879         -$(MKDIR_P) $(DESTDIR)$(sysconfdir)/udev/hwdb.d
1880
1881 INSTALL_DATA_HOOKS += udev-confdirs
1882
1883 dist_udevrules_DATA += \
1884         rules/99-systemd.rules \
1885         rules/42-usb-hid-pm.rules \
1886         rules/50-udev-default.rules \
1887         rules/60-persistent-storage-tape.rules \
1888         rules/60-persistent-serial.rules \
1889         rules/60-persistent-input.rules \
1890         rules/60-persistent-alsa.rules \
1891         rules/60-persistent-storage.rules \
1892         rules/64-btrfs.rules \
1893         rules/75-net-description.rules \
1894         rules/75-tty-description.rules \
1895         rules/78-sound-card.rules \
1896         rules/95-udev-late.rules
1897
1898 if HAVE_KMOD
1899 dist_udevrules_DATA += \
1900         rules/80-drivers.rules
1901 endif
1902
1903 dist_udevhwdb_DATA = \
1904         hwdb/20-pci-vendor-product.hwdb \
1905         hwdb/20-pci-classes.hwdb \
1906         hwdb/20-usb-vendor-product.hwdb \
1907         hwdb/20-usb-classes.hwdb \
1908         hwdb/20-acpi-vendor.hwdb \
1909         hwdb/20-OUI.hwdb
1910
1911 udevconfdir = $(sysconfdir)/udev
1912 dist_udevconf_DATA = \
1913         src/udev/udev.conf
1914
1915 sharepkgconfigdir = $(datadir)/pkgconfig
1916 sharepkgconfig_DATA = \
1917         src/udev/udev.pc
1918
1919 EXTRA_DIST += \
1920         rules/99-systemd.rules.in \
1921         src/udev/udev.pc.in
1922
1923 CLEANFILES += \
1924         rules/99-systemd.rules \
1925         src/udev/udev.pc
1926
1927 EXTRA_DIST += \
1928         units/systemd-udevd.service.in \
1929         units/systemd-udev-trigger.service.in \
1930         units/systemd-udev-settle.service.in
1931
1932 CLEANFILES += \
1933         units/systemd-udevd.service \
1934         units/systemd-udev-trigger.service \
1935         units/systemd-udev-settle.service
1936
1937 systemd-install-hook:
1938         $(MKDIR_P) $(DESTDIR)$(systemunitdir)/sockets.target.wants
1939         ln -sf ../systemd-udevd-control.socket $(DESTDIR)$(systemunitdir)/sockets.target.wants/systemd-udevd-control.socket
1940         ln -sf ../systemd-udevd-kernel.socket $(DESTDIR)$(systemunitdir)/sockets.target.wants/systemd-udevd-kernel.socket
1941         $(MKDIR_P) $(DESTDIR)$(systemunitdir)/sysinit.target.wants
1942         ln -sf ../systemd-udevd.service $(DESTDIR)$(systemunitdir)/sysinit.target.wants/systemd-udevd.service
1943         ln -sf ../systemd-udev-trigger.service $(DESTDIR)$(systemunitdir)/sysinit.target.wants/systemd-udev-trigger.service
1944
1945 INSTALL_DATA_HOOKS += systemd-install-hook
1946
1947 bin_PROGRAMS += \
1948         udevadm
1949
1950 rootlibexec_PROGRAMS += \
1951         systemd-udevd
1952
1953 noinst_LTLIBRARIES += \
1954         libudev-core.la
1955
1956 libudev_core_la_SOURCES = \
1957         src/udev/udev.h \
1958         src/udev/udev-event.c \
1959         src/udev/udev-watch.c \
1960         src/udev/udev-node.c \
1961         src/udev/udev-rules.c \
1962         src/udev/udev-ctrl.c \
1963         src/udev/udev-builtin.c \
1964         src/udev/udev-builtin-btrfs.c \
1965         src/udev/udev-builtin-firmware.c \
1966         src/udev/udev-builtin-hwdb.c \
1967         src/udev/udev-builtin-input_id.c \
1968         src/udev/udev-builtin-net_id.c \
1969         src/udev/udev-builtin-path_id.c \
1970         src/udev/udev-builtin-usb_id.c \
1971         src/libsystemd-daemon/sd-daemon.c
1972
1973 libudev_core_la_CFLAGS = \
1974         $(AM_CFLAGS) \
1975         $(BLKID_CFLAGS) \
1976         $(KMOD_CFLAGS)
1977
1978 libudev_core_la_LIBADD = \
1979         libudev-private.la \
1980         libsystemd-label.la \
1981         libsystemd-shared.la \
1982         $(BLKID_LIBS) \
1983         $(KMOD_LIBS)
1984
1985 libudev_core_la_CPPFLAGS = \
1986         $(AM_CPPFLAGS) \
1987         -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
1988
1989 if HAVE_KMOD
1990 libudev_core_la_SOURCES += \
1991         src/udev/udev-builtin-kmod.c
1992 endif
1993
1994 if HAVE_BLKID
1995 libudev_core_la_SOURCES += \
1996         src/udev/udev-builtin-blkid.c
1997 endif
1998
1999 if HAVE_ACL
2000 libudev_core_la_SOURCES += \
2001         src/udev/udev-builtin-uaccess.c \
2002         src/login/logind-acl.c \
2003         src/login/sd-login.c
2004
2005 libudev_core_la_LIBADD += \
2006         libsystemd-acl.la
2007 endif
2008
2009 systemd_udevd_SOURCES = \
2010         src/udev/udevd.c
2011
2012 systemd_udevd_LDADD = \
2013         libudev-core.la
2014
2015 udevadm_SOURCES = \
2016         src/udev/udevadm.c \
2017         src/udev/udevadm-info.c \
2018         src/udev/udevadm-control.c \
2019         src/udev/udevadm-monitor.c \
2020         src/udev/udevadm-hwdb.c \
2021         src/udev/udevadm-settle.c \
2022         src/udev/udevadm-trigger.c \
2023         src/udev/udevadm-test.c \
2024         src/udev/udevadm-test-builtin.c
2025
2026 udevadm_LDADD = \
2027         libudev-core.la \
2028         libsystemd-shared.la
2029
2030 # Update hwdb on installation. Do not bother if installing
2031 # in DESTDIR, since this is likely for packaging purposes.
2032 hwdb-update-hook:
2033         -test -n "$(DESTDIR)" || $(bindir)/udevadm hwdb --update
2034
2035 INSTALL_DATA_HOOKS += \
2036         hwdb-update-hook
2037
2038 hwdb-remove-hook:
2039         -test -n "$(DESTDIR)" || rm -f $(HWDB_BIN)
2040
2041 # ------------------------------------------------------------------------------
2042 TESTS += \
2043         test/udev-test.pl \
2044         test/rules-test.sh
2045
2046 noinst_PROGRAMS += \
2047         test-libudev \
2048         test-udev
2049
2050 test_libudev_SOURCES = \
2051         src/test/test-libudev.c
2052
2053 test_libudev_LDADD = \
2054         libsystemd-label.la \
2055         libsystemd-shared.la \
2056         libudev.la
2057
2058 test_udev_SOURCES = \
2059         src/test/test-udev.c
2060
2061 test_udev_LDADD = \
2062         libudev-core.la \
2063         libsystemd-shared.la \
2064         $(BLKID_LIBS) \
2065         $(KMOD_LIBS) \
2066         $(SELINUX_LIBS)
2067
2068 if HAVE_ACL
2069 test_udev_LDADD += \
2070         libsystemd-acl.la
2071 endif
2072
2073 check_DATA += \
2074         test/sys
2075
2076 # packed sysfs test tree
2077 test/sys:
2078         $(AM_V_at)$(MKDIR_P) $(dir $@)
2079         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
2080
2081 test-sys-distclean:
2082         -rm -rf test/sys
2083 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
2084
2085 EXTRA_DIST += \
2086         test/sys.tar.xz \
2087         test/udev-test.pl \
2088         test/rules-test.sh \
2089         test/rule-syntax-check.py
2090
2091 # ------------------------------------------------------------------------------
2092 ata_id_SOURCES = \
2093         src/udev/ata_id/ata_id.c
2094
2095 ata_id_LDADD = \
2096         libudev-private.la \
2097         libsystemd-shared.la
2098
2099 udevlibexec_PROGRAMS += \
2100         ata_id
2101
2102 # ------------------------------------------------------------------------------
2103 cdrom_id_SOURCES = \
2104         src/udev/cdrom_id/cdrom_id.c
2105
2106 cdrom_id_LDADD = \
2107         libudev.la \
2108         libsystemd-shared.la
2109
2110 udevlibexec_PROGRAMS += \
2111         cdrom_id
2112
2113 dist_udevrules_DATA += \
2114         rules/60-cdrom_id.rules
2115
2116 # ------------------------------------------------------------------------------
2117 collect_SOURCES = \
2118         src/udev/collect/collect.c
2119
2120 collect_LDADD = \
2121         libudev-private.la
2122
2123 udevlibexec_PROGRAMS += \
2124         collect
2125
2126 # ------------------------------------------------------------------------------
2127 scsi_id_SOURCES =\
2128         src/udev/scsi_id/scsi_id.c \
2129         src/udev/scsi_id/scsi_serial.c \
2130         src/udev/scsi_id/scsi.h \
2131         src/udev/scsi_id/scsi_id.h
2132
2133 scsi_id_LDADD = \
2134         libudev-private.la \
2135         libsystemd-shared.la
2136
2137 udevlibexec_PROGRAMS += \
2138         scsi_id
2139
2140 EXTRA_DIST += \
2141         src/udev/scsi_id/README
2142
2143 # ------------------------------------------------------------------------------
2144 v4l_id_SOURCES = \
2145         src/udev/v4l_id/v4l_id.c
2146
2147 v4l_id_LDADD = \
2148         libudev.la
2149
2150 udevlibexec_PROGRAMS += \
2151         v4l_id
2152
2153 dist_udevrules_DATA += \
2154         rules/60-persistent-v4l.rules
2155
2156 # ------------------------------------------------------------------------------
2157 accelerometer_SOURCES = \
2158         src/udev/accelerometer/accelerometer.c
2159
2160 accelerometer_LDADD = \
2161         libudev.la -lm \
2162         libsystemd-shared.la
2163
2164 udevlibexec_PROGRAMS += \
2165         accelerometer
2166
2167 dist_udevrules_DATA += \
2168         rules/61-accelerometer.rules
2169
2170 # ------------------------------------------------------------------------------
2171 if ENABLE_GUDEV
2172 if ENABLE_GTK_DOC
2173 SUBDIRS += \
2174         docs/gudev
2175 endif
2176
2177 libgudev_includedir = \
2178         $(includedir)/gudev-1.0/gudev
2179
2180 libgudev_include_HEADERS = \
2181         src/gudev/gudev.h \
2182         src/gudev/gudevenums.h \
2183         src/gudev/gudevenumtypes.h \
2184         src/gudev/gudevtypes.h \
2185         src/gudev/gudevclient.h \
2186         src/gudev/gudevdevice.h \
2187         src/gudev/gudevenumerator.h
2188
2189 lib_LTLIBRARIES += libgudev-1.0.la
2190
2191 pkgconfiglib_DATA += \
2192         src/gudev/gudev-1.0.pc
2193
2194 CLEANFILES += \
2195         src/gudev/gudev-1.0.pc
2196
2197 libgudev_1_0_la_SOURCES = \
2198         src/gudev/gudevenums.h \
2199         src/gudev/gudevenumtypes.h \
2200         src/gudev/gudevenumtypes.h\
2201         src/gudev/gudevtypes.h \
2202         src/gudev/gudevclient.h \
2203         src/gudev/gudevclient.c \
2204         src/gudev/gudevdevice.h \
2205         src/gudev/gudevdevice.c \
2206         src/gudev/gudevenumerator.h \
2207         src/gudev/gudevenumerator.c \
2208         src/gudev/gudevprivate.h
2209
2210 nodist_libgudev_1_0_la_SOURCES = \
2211         src/gudev/gudevmarshal.h \
2212         src/gudev/gudevmarshal.c \
2213         src/gudev/gudevenumtypes.h \
2214         src/gudev/gudevenumtypes.c
2215
2216 BUILT_SOURCES += \
2217         $(nodist_libgudev_1_0_la_SOURCES)
2218
2219 libgudev_1_0_la_CPPFLAGS = \
2220         $(AM_CPPFLAGS) \
2221         -I$(top_builddir)/src\
2222         -I$(top_srcdir)/src\
2223         -I$(top_builddir)/src/gudev \
2224         -I$(top_srcdir)/src/gudev \
2225         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
2226         -D_GUDEV_COMPILATION \
2227         -DG_LOG_DOMAIN=\"GUdev\"
2228
2229 libgudev_1_0_la_CFLAGS = \
2230         $(AM_CFLAGS) \
2231         -fvisibility=default \
2232         $(GLIB_CFLAGS)
2233
2234 libgudev_1_0_la_LIBADD = \
2235         libudev.la \
2236         $(GLIB_LIBS)
2237
2238 libgudev_1_0_la_LDFLAGS = \
2239         $(AM_LDFLAGS) \
2240         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
2241         -export-dynamic -no-undefined \
2242         -export-symbols-regex '^g_udev_.*'
2243
2244 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
2245         $(AM_V_at)$(MKDIR_P) $(dir $@)
2246         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
2247
2248 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
2249         $(AM_V_at)$(MKDIR_P) $(dir $@)
2250         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
2251         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
2252
2253 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
2254         $(AM_V_at)$(MKDIR_P) $(dir $@)
2255         $(AM_V_GEN)glib-mkenums --template $^ > $@
2256
2257 if HAVE_INTROSPECTION
2258 -include $(INTROSPECTION_MAKEFILE)
2259
2260 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
2261
2262 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
2263
2264 src_gudev_GUdev_1_0_gir_CFLAGS = \
2265         $(INCLUDES) \
2266         -D_GUDEV_COMPILATION \
2267         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
2268         -I$(top_srcdir)/src \
2269         -I$(top_builddir)/src \
2270         -I$(top_srcdir)/src/gdev \
2271         -I$(top_builddir)/src/gdev
2272
2273 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
2274
2275 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
2276         --pkg-export=gudev-1.0 \
2277         --warn-all
2278
2279 src_gudev_GUdev_1_0_gir_FILES = \
2280         src/gudev/gudev.h \
2281         src/gudev/gudevtypes.h \
2282         src/gudev/gudevenums.h \
2283         src/gudev/gudevenumtypes.h \
2284         src/gudev/gudevclient.h \
2285         src/gudev/gudevdevice.h \
2286         src/gudev/gudevenumerator.h \
2287         src/gudev/gudevclient.c \
2288         src/gudev/gudevdevice.c \
2289         src/gudev/gudevenumerator.c
2290
2291 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
2292 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
2293
2294 girdir = $(datadir)/gir-1.0
2295 gir_DATA = \
2296         src/gudev/GUdev-1.0.gir
2297
2298 typelibsdir = $(libdir)/girepository-1.0
2299 typelibs_DATA = \
2300         src/gudev/GUdev-1.0.typelib
2301
2302 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
2303 endif # HAVE_INTROSPECTION
2304
2305 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2306 libgudev-install-move-hook:
2307         if test "$(libdir)" != "$(rootlibdir)"; then \
2308                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
2309                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libgudev-1.0.so) && \
2310                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
2311                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libgudev-1.0.so && \
2312                 mv $(DESTDIR)$(libdir)/libgudev-1.0.so.* $(DESTDIR)$(rootlibdir); \
2313         fi
2314
2315 libgudev-uninstall-move-hook:
2316         rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
2317
2318 INSTALL_EXEC_HOOKS += libgudev-install-move-hook
2319 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-move-hook
2320 endif
2321
2322 EXTRA_DIST += \
2323         src/gudev/gudev-1.0.pc.in \
2324         src/gudev/gudevmarshal.list \
2325         src/gudev/gudevenumtypes.h.template \
2326         src/gudev/gudevenumtypes.c.template \
2327         src/gudev/gjs-example.js \
2328         src/gudev/seed-example-enum.js \
2329         src/gudev/seed-example.js
2330
2331
2332 # ------------------------------------------------------------------------------
2333 if ENABLE_KEYMAP
2334 keymap_SOURCES = \
2335         src/udev/keymap/keymap.c
2336
2337 keymap_CPPFLAGS = \
2338         $(AM_CPPFLAGS) -I src/udev/keymap
2339
2340 keymap_LDADD = \
2341         libsystemd-shared.la
2342
2343 nodist_keymap_SOURCES = \
2344         src/udev/keymap/keys-from-name.h \
2345         src/udev/keymap/keys-to-name.h
2346
2347 BUILT_SOURCES += \
2348         $(nodist_keymap_SOURCES)
2349
2350 udevlibexec_PROGRAMS += \
2351         keymap
2352
2353 dist_doc_DATA += \
2354         src/udev/keymap/README.keymap.txt
2355
2356 dist_udevrules_DATA += \
2357         src/udev/keymap/95-keymap.rules \
2358         src/udev/keymap/95-keyboard-force-release.rules
2359
2360 dist_udevhome_SCRIPTS = \
2361         src/udev/keymap/findkeyboards \
2362         src/udev/keymap/keyboard-force-release.sh
2363
2364 TESTS += \
2365         src/udev/keymap/check-keymaps.sh
2366
2367 CLEANFILES += \
2368         src/udev/keymap/keys.txt \
2369         src/udev/keymap/keys-from-name.gperf \
2370         src/udev/keymap/keyboard-force-release.sh
2371
2372 udevkeymapdir = $(udevlibexecdir)/keymaps
2373 dist_udevkeymap_DATA = \
2374         keymaps/acer \
2375         keymaps/acer-aspire_5720 \
2376         keymaps/acer-aspire_8930 \
2377         keymaps/acer-aspire_5920g \
2378         keymaps/acer-aspire_6920 \
2379         keymaps/acer-travelmate_c300 \
2380         keymaps/asus \
2381         keymaps/compaq-e_evo \
2382         keymaps/dell \
2383         keymaps/dell-latitude-xt2 \
2384         keymaps/everex-xt5000 \
2385         keymaps/fujitsu-amilo_li_2732 \
2386         keymaps/fujitsu-amilo_pa_2548 \
2387         keymaps/fujitsu-amilo_pro_edition_v3505 \
2388         keymaps/fujitsu-amilo_pro_v3205 \
2389         keymaps/fujitsu-amilo_si_1520 \
2390         keymaps/fujitsu-esprimo_mobile_v5 \
2391         keymaps/fujitsu-esprimo_mobile_v6 \
2392         keymaps/genius-slimstar-320 \
2393         keymaps/hewlett-packard \
2394         keymaps/hewlett-packard-2510p_2530p \
2395         keymaps/hewlett-packard-compaq_elitebook \
2396         keymaps/hewlett-packard-pavilion \
2397         keymaps/hewlett-packard-presario-2100 \
2398         keymaps/hewlett-packard-tablet \
2399         keymaps/hewlett-packard-tx2 \
2400         keymaps/hewlett-packard_elitebook-8440p \
2401         keymaps/ibm-thinkpad-usb-keyboard-trackpoint \
2402         keymaps/inventec-symphony_6.0_7.0 \
2403         keymaps/lenovo-3000 \
2404         keymaps/lenovo-ideapad \
2405         keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \
2406         keymaps/lenovo-thinkpad_x6_tablet \
2407         keymaps/lenovo-thinkpad_x200_tablet \
2408         keymaps/lg-x110 \
2409         keymaps/logitech-wave \
2410         keymaps/logitech-wave-cordless \
2411         keymaps/logitech-wave-pro-cordless \
2412         keymaps/maxdata-pro_7000 \
2413         keymaps/medion-fid2060 \
2414         keymaps/medionnb-a555 \
2415         keymaps/micro-star \
2416         keymaps/module-asus-w3j \
2417         keymaps/module-ibm \
2418         keymaps/module-lenovo \
2419         keymaps/module-sony \
2420         keymaps/module-sony-old \
2421         keymaps/module-sony-vgn \
2422         keymaps/module-sony-vpc \
2423         keymaps/olpc-xo \
2424         keymaps/onkyo \
2425         keymaps/oqo-model2 \
2426         keymaps/samsung-other \
2427         keymaps/samsung-series-9 \
2428         keymaps/samsung-sq1us \
2429         keymaps/samsung-sx20s \
2430         keymaps/toshiba-satellite_a100 \
2431         keymaps/toshiba-satellite_a110 \
2432         keymaps/toshiba-satellite_m30x \
2433         keymaps/zepto-znote
2434
2435 udevkeymapforcereldir = $(udevlibexecdir)/keymaps/force-release
2436 dist_udevkeymapforcerel_DATA = \
2437         keymaps-force-release/dell-touchpad \
2438         keymaps-force-release/dell-xps \
2439         keymaps-force-release/hp-other \
2440         keymaps-force-release/samsung-other \
2441         keymaps-force-release/samsung-series-9 \
2442         keymaps-force-release/common-volume-keys
2443
2444 src/udev/keymap/keys.txt: Makefile
2445         $(AM_V_at)$(MKDIR_P) $(dir $@)
2446         $(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/' > $@
2447
2448 src/udev/keymap/keys-from-name.gperf: src/udev/keymap/keys.txt Makefile
2449         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
2450
2451 src/udev/keymap/keys-from-name.h: src/udev/keymap/keys-from-name.gperf Makefile
2452         $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@
2453
2454 src/udev/keymap/keys-to-name.h: src/udev/keymap/keys.txt Makefile
2455         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
2456 endif
2457
2458 EXTRA_DIST += \
2459         src/udev/keymap/check-keymaps.sh \
2460         src/udev/keymap/keyboard-force-release.sh.in
2461
2462 # ------------------------------------------------------------------------------
2463 mtd_probe_SOURCES =  \
2464         src/udev/mtd_probe/mtd_probe.c \
2465         src/udev/mtd_probe/mtd_probe.h \
2466         src/udev/mtd_probe/probe_smartmedia.c
2467
2468 mtd_probe_CPPFLAGS = \
2469         $(AM_CPPFLAGS)
2470
2471 dist_udevrules_DATA += \
2472         rules/75-probe_mtd.rules
2473
2474 udevlibexec_PROGRAMS += \
2475         mtd_probe
2476
2477 # ------------------------------------------------------------------------------
2478 libsystemd_id128_la_SOURCES = \
2479         src/libsystemd-id128/sd-id128.c
2480
2481 libsystemd_id128_la_CFLAGS = \
2482         $(AM_CFLAGS) \
2483         -fvisibility=hidden
2484
2485 libsystemd_id128_la_LDFLAGS = \
2486         $(AM_LDFLAGS) \
2487         -shared \
2488         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
2489         -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128/libsystemd-id128.sym
2490
2491 libsystemd_id128_la_LIBADD = \
2492         libsystemd-shared.la
2493
2494 libsystemd_id128_internal_la_SOURCES = \
2495         $(libsystemd_id128_la_SOURCES)
2496
2497 test_id128_SOURCES = \
2498         src/test/test-id128.c
2499
2500 test_id128_LDADD = \
2501         libsystemd-shared.la \
2502         libsystemd-id128-internal.la
2503
2504 noinst_PROGRAMS += \
2505         test-id128
2506
2507 TESTS += \
2508         test-id128
2509
2510 pkginclude_HEADERS += \
2511         src/systemd/sd-id128.h
2512
2513 lib_LTLIBRARIES += \
2514         libsystemd-id128.la
2515
2516 noinst_LTLIBRARIES += \
2517         libsystemd-id128-internal.la
2518
2519 pkgconfiglib_DATA += \
2520         src/libsystemd-id128/libsystemd-id128.pc
2521
2522 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2523 libsystemd-id128-install-hook:
2524         if test "$(libdir)" != "$(rootlibdir)"; then \
2525                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
2526                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-id128.so) && \
2527                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
2528                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-id128.so && \
2529                 mv $(DESTDIR)$(libdir)/libsystemd-id128.so.* $(DESTDIR)$(rootlibdir); \
2530         fi
2531
2532 INSTALL_EXEC_HOOKS += \
2533         libsystemd-id128-install-hook
2534
2535 libsystemd-id128-uninstall-hook:
2536         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
2537
2538 UNINSTALL_EXEC_HOOKS += \
2539         libsystemd-id128-uninstall-hook
2540
2541 EXTRA_DIST += \
2542         src/libsystemd-id128/libsystemd-id128.pc.in \
2543         src/libsystemd-id128/libsystemd-id128.sym
2544
2545 # ------------------------------------------------------------------------------
2546 systemd_journald_SOURCES = \
2547         src/journal/journald.c \
2548         src/journal/journald-server.h
2549
2550 systemd_journald_LDADD = \
2551         libsystemd-journal-internal.la \
2552         libsystemd-shared.la \
2553         libsystemd-id128-internal.la
2554
2555 systemd_cat_SOURCES = \
2556         src/journal/cat.c
2557
2558 systemd_cat_LDADD = \
2559         libsystemd-shared.la \
2560         libsystemd-journal-internal.la
2561
2562 journalctl_SOURCES = \
2563         src/journal/journalctl.c
2564
2565 journalctl_CFLAGS = \
2566         $(AM_CFLAGS)
2567
2568 journalctl_LDADD = \
2569         libsystemd-shared.la \
2570         libsystemd-journal-internal.la \
2571         libsystemd-id128-internal.la \
2572         libsystemd-logs.la
2573
2574 if HAVE_QRENCODE
2575 journalctl_SOURCES += \
2576         src/journal/journal-qrcode.c \
2577         src/journal/journal-qrcode.h
2578
2579 journalctl_CFLAGS += \
2580         $(QRENCODE_CFLAGS)
2581
2582 journalctl_LDADD += \
2583         $(QRENCODE_LIBS)
2584 endif
2585
2586 systemd_coredumpctl_SOURCES = \
2587         src/journal/coredumpctl.c
2588
2589 systemd_coredumpctl_LDADD = \
2590         libsystemd-shared.la \
2591         libsystemd-journal.la
2592
2593 test_journal_SOURCES = \
2594         src/journal/test-journal.c
2595
2596 test_journal_LDADD = \
2597         libsystemd-shared.la \
2598         libsystemd-journal-internal.la \
2599         libsystemd-id128-internal.la
2600
2601 test_journal_send_SOURCES = \
2602         src/journal/test-journal-send.c
2603
2604 test_journal_send_LDADD = \
2605         libsystemd-shared.la \
2606         libsystemd-journal-internal.la \
2607         libsystemd-id128-internal.la
2608
2609 test_journal_syslog_SOURCES = \
2610         src/journal/test-journal-syslog.c
2611
2612 test_journal_syslog_LDADD = \
2613         libsystemd-journal-internal.la \
2614         libsystemd-shared.la \
2615         libsystemd-id128-internal.la
2616
2617 test_journal_match_SOURCES = \
2618         src/journal/test-journal-match.c
2619
2620 test_journal_match_LDADD = \
2621         libsystemd-shared.la \
2622         libsystemd-journal-internal.la \
2623         libsystemd-id128-internal.la
2624
2625 test_journal_enum_SOURCES = \
2626         src/journal/test-journal-enum.c
2627
2628 test_journal_enum_LDADD = \
2629         libsystemd-shared.la \
2630         libsystemd-journal-internal.la \
2631         libsystemd-id128-internal.la
2632
2633 test_journal_stream_SOURCES = \
2634         src/journal/test-journal-stream.c
2635
2636 test_journal_stream_LDADD = \
2637         libsystemd-shared.la \
2638         libsystemd-journal-internal.la \
2639         libsystemd-id128-internal.la
2640
2641 test_journal_verify_SOURCES = \
2642         src/journal/test-journal-verify.c
2643
2644 test_journal_verify_LDADD = \
2645         libsystemd-shared.la \
2646         libsystemd-journal-internal.la \
2647         libsystemd-id128-internal.la
2648
2649 test_mmap_cache_SOURCES = \
2650         src/journal/test-mmap-cache.c
2651
2652 test_mmap_cache_LDADD = \
2653         libsystemd-shared.la \
2654         libsystemd-journal-internal.la
2655
2656 test_catalog_SOURCES = \
2657         src/journal/test-catalog.c
2658
2659 test_catalog_LDADD = \
2660         libsystemd-shared.la \
2661         libsystemd-label.la \
2662         libsystemd-journal-internal.la \
2663         libsystemd-id128-internal.la
2664
2665 libsystemd_journal_la_SOURCES = \
2666         src/journal/sd-journal.c \
2667         src/systemd/sd-journal.h \
2668         src/journal/journal-file.c \
2669         src/journal/journal-file.h \
2670         src/journal/journal-vacuum.c \
2671         src/journal/journal-vacuum.h \
2672         src/journal/journal-verify.c \
2673         src/journal/journal-verify.h \
2674         src/journal/lookup3.c \
2675         src/journal/lookup3.h \
2676         src/journal/journal-send.c \
2677         src/journal/journal-def.h \
2678         src/journal/compress.h \
2679         src/journal/catalog.c \
2680         src/journal/catalog.h \
2681         src/journal/mmap-cache.c \
2682         src/journal/mmap-cache.h
2683
2684 libsystemd_journal_la_CFLAGS = \
2685         $(AM_CFLAGS) \
2686         -fvisibility=hidden
2687
2688 libsystemd_journal_la_LDFLAGS = \
2689         $(AM_LDFLAGS) \
2690         -shared \
2691         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
2692         -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
2693
2694 libsystemd_journal_la_LIBADD = \
2695         libsystemd-shared.la \
2696         libsystemd-label.la \
2697         libsystemd-id128-internal.la
2698
2699 libsystemd_journal_internal_la_SOURCES = \
2700         $(libsystemd_journal_la_SOURCES) \
2701         src/journal/journald-kmsg.c \
2702         src/journal/journald-kmsg.h \
2703         src/journal/journald-syslog.c \
2704         src/journal/journald-syslog.h \
2705         src/journal/journald-stream.c \
2706         src/journal/journald-stream.h \
2707         src/journal/journald-server.c \
2708         src/journal/journald-server.h \
2709         src/journal/journald-console.c \
2710         src/journal/journald-console.h \
2711         src/journal/journald-native.c \
2712         src/journal/journald-native.h \
2713         src/journal/journald-rate-limit.c \
2714         src/journal/journald-rate-limit.h \
2715         src/journal/journal-internal.h
2716
2717 libsystemd_journal_internal_la_CFLAGS = \
2718         $(AM_CFLAGS)
2719
2720 libsystemd_journal_internal_la_LIBADD = \
2721         libsystemd-label.la \
2722         libsystemd-audit.la \
2723         libsystemd-daemon.la \
2724         libudev.la \
2725         libsystemd-shared.la \
2726         libsystemd-label.la
2727
2728 nodist_libsystemd_journal_internal_la_SOURCES = \
2729         src/journal/journald-gperf.c
2730
2731 if ENABLE_LOGIND
2732 libsystemd_journal_internal_la_LIBADD += \
2733         libsystemd-login-internal.la
2734 endif
2735
2736 if HAVE_ACL
2737 libsystemd_journal_internal_la_LIBADD += \
2738         libsystemd-acl.la
2739 endif
2740
2741 if HAVE_XZ
2742 libsystemd_journal_la_SOURCES += \
2743         src/journal/compress.c
2744
2745 libsystemd_journal_la_CFLAGS += \
2746         $(XZ_CFLAGS)
2747
2748 libsystemd_journal_la_LIBADD += \
2749         $(XZ_LIBS)
2750
2751 libsystemd_journal_internal_la_CFLAGS += \
2752         $(XZ_CFLAGS)
2753
2754 libsystemd_journal_internal_la_LIBADD += \
2755         $(XZ_LIBS)
2756
2757 endif
2758
2759 if HAVE_GCRYPT
2760 libsystemd_journal_la_SOURCES += \
2761         src/journal/journal-authenticate.c \
2762         src/journal/journal-authenticate.h \
2763         src/journal/fsprg.c \
2764         src/journal/fsprg.h
2765
2766 libsystemd_journal_la_CFLAGS += \
2767         $(GCRYPT_CFLAGS) \
2768         -Wno-pointer-arith
2769
2770 libsystemd_journal_la_LIBADD += \
2771         $(GCRYPT_LIBS)
2772
2773 libsystemd_journal_internal_la_CFLAGS += \
2774         $(GCRYPT_CFLAGS) \
2775         -Wno-pointer-arith
2776
2777 libsystemd_journal_internal_la_LIBADD += \
2778         $(GCRYPT_LIBS)
2779 endif
2780
2781 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2782 libsystemd-journal-install-hook:
2783         if test "$(libdir)" != "$(rootlibdir)"; then \
2784                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
2785                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-journal.so) && \
2786                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
2787                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-journal.so && \
2788                 mv $(DESTDIR)$(libdir)/libsystemd-journal.so.* $(DESTDIR)$(rootlibdir); \
2789         fi
2790
2791 INSTALL_EXEC_HOOKS += \
2792         libsystemd-journal-install-hook
2793
2794 libsystemd-journal-uninstall-hook:
2795         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
2796
2797 UNINSTALL_EXEC_HOOKS += \
2798         libsystemd-journal-uninstall-hook
2799
2800 # Update catalog on installation. Do not bother if installing
2801 # in DESTDIR, since this is likely for packaging purposes.
2802 catalog-update-hook:
2803         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
2804
2805 INSTALL_DATA_HOOKS += \
2806         catalog-update-hook
2807
2808 catalog-remove-hook:
2809         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
2810
2811 UNINSTALL_DATA_HOOKS += \
2812         catalog-remove-hook
2813
2814 noinst_PROGRAMS += \
2815         test-journal \
2816         test-journal-send \
2817         test-journal-syslog \
2818         test-journal-match \
2819         test-journal-enum \
2820         test-journal-stream \
2821         test-journal-verify \
2822         test-mmap-cache \
2823         test-catalog
2824
2825 TESTS += \
2826         test-journal \
2827         test-journal-send \
2828         test-journal-syslog \
2829         test-journal-match \
2830         test-journal-stream \
2831         test-journal-verify \
2832         test-mmap-cache
2833
2834 pkginclude_HEADERS += \
2835         src/systemd/sd-journal.h \
2836         src/systemd/sd-messages.h
2837
2838 lib_LTLIBRARIES += \
2839         libsystemd-journal.la
2840
2841 noinst_LTLIBRARIES += \
2842         libsystemd-journal-internal.la
2843
2844 rootlibexec_PROGRAMS += \
2845         systemd-journald
2846
2847 rootbin_PROGRAMS += \
2848         journalctl
2849
2850 bin_PROGRAMS += \
2851         systemd-coredumpctl \
2852         systemd-cat
2853
2854 dist_systemunit_DATA += \
2855         units/systemd-journald.socket
2856
2857 nodist_systemunit_DATA += \
2858         units/systemd-journald.service \
2859         units/systemd-journal-flush.service
2860
2861 dist_pkgsysconf_DATA += \
2862         src/journal/journald.conf
2863
2864 pkgconfiglib_DATA += \
2865         src/journal/libsystemd-journal.pc
2866
2867 dist_catalog_DATA = \
2868         catalog/systemd.catalog
2869
2870 journal-install-data-hook:
2871         $(MKDIR_P) -m 0755 \
2872                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
2873                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2874         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
2875                 rm -f systemd-journald.socket && \
2876                 $(LN_S) ../systemd-journald.socket )
2877         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2878                 rm -f systemd-journald.service systemd-journal-flush.service && \
2879                 $(LN_S) ../systemd-journald.service && \
2880                 $(LN_S) ../systemd-journal-flush.service )
2881
2882 INSTALL_DATA_HOOKS += \
2883         journal-install-data-hook
2884
2885 EXTRA_DIST += \
2886         src/journal/libsystemd-journal.pc.in \
2887         src/journal/libsystemd-journal.sym \
2888         units/systemd-journald.service.in \
2889         units/systemd-journal-flush.service.in \
2890         src/journal/journald-gperf.gperf
2891
2892 CLEANFILES += \
2893         src/journal/journald-gperf.c
2894
2895 if HAVE_MICROHTTPD
2896
2897 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
2898
2899 rootlibexec_PROGRAMS += \
2900         systemd-journal-gatewayd
2901
2902 systemd_journal_gatewayd_SOURCES = \
2903         src/journal/journal-gatewayd.c
2904
2905 systemd_journal_gatewayd_LDADD = \
2906         libsystemd-shared.la \
2907         libsystemd-logs.la \
2908         libsystemd-journal-internal.la \
2909         libsystemd-id128-internal.la \
2910         libsystemd-daemon.la \
2911         $(MICROHTTPD_LIBS)
2912
2913 systemd_journal_gatewayd_CFLAGS = \
2914         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\" \
2915         $(AM_CFLAGS) \
2916         $(MICROHTTPD_CFLAGS)
2917
2918 dist_systemunit_DATA += \
2919         units/systemd-journal-gatewayd.socket
2920
2921 nodist_systemunit_DATA += \
2922         units/systemd-journal-gatewayd.service
2923
2924 dist_gatewayddocumentroot_DATA = \
2925         src/journal/browse.html
2926
2927 endif
2928
2929 EXTRA_DIST += \
2930         units/systemd-journal-gatewayd.service.in
2931
2932 # ------------------------------------------------------------------------------
2933 if ENABLE_COREDUMP
2934 systemd_coredump_SOURCES = \
2935         src/journal/coredump.c
2936
2937 systemd_coredump_LDADD = \
2938         libsystemd-journal-internal.la \
2939         libsystemd-label.la \
2940         libsystemd-shared.la
2941
2942 if ENABLE_LOGIND
2943 systemd_coredump_LDADD += \
2944         libsystemd-login-internal.la
2945 endif
2946
2947 rootlibexec_PROGRAMS += \
2948         systemd-coredump
2949
2950 sysctl_DATA = \
2951         sysctl.d/coredump.conf
2952
2953 CLEANFILES += \
2954         sysctl.d/coredump.conf
2955 endif
2956
2957 EXTRA_DIST += \
2958         sysctl.d/coredump.conf.in
2959
2960 # ------------------------------------------------------------------------------
2961 if ENABLE_BINFMT
2962 systemd_binfmt_SOURCES = \
2963         src/binfmt/binfmt.c
2964
2965 systemd_binfmt_LDADD = \
2966         libsystemd-shared.la
2967
2968 rootlibexec_PROGRAMS += \
2969         systemd-binfmt
2970
2971 dist_systemunit_DATA += \
2972         units/proc-sys-fs-binfmt_misc.automount \
2973         units/proc-sys-fs-binfmt_misc.mount
2974
2975 nodist_systemunit_DATA += \
2976         units/systemd-binfmt.service
2977
2978 binfmt-install-data-hook:
2979         $(MKDIR_P) -m 0755 \
2980                 $(DESTDIR)$(prefix)/lib/binfmt.d \
2981                 $(DESTDIR)$(sysconfdir)/binfmt.d \
2982                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2983         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2984                 rm -f systemd-binfmt.service \
2985                         proc-sys-fs-binfmt_misc.automount && \
2986                 $(LN_S) ../systemd-binfmt.service systemd-binfmt.service && \
2987                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount )
2988
2989 INSTALL_DATA_HOOKS += \
2990         binfmt-install-data-hook
2991
2992 MANPAGES += \
2993         man/binfmt.d.5 \
2994         man/systemd-binfmt.service.8
2995
2996 MANPAGES_ALIAS +=  \
2997         man/systemd-binfmt.8
2998
2999 man/systemd-binfmt.8: man/systemd-binfmt.service.8
3000 endif
3001
3002 EXTRA_DIST += \
3003         units/systemd-binfmt.service.in
3004
3005 # ------------------------------------------------------------------------------
3006 if ENABLE_VCONSOLE
3007 systemd_vconsole_setup_SOURCES = \
3008         src/vconsole/vconsole-setup.c
3009
3010 systemd_vconsole_setup_LDADD = \
3011         libsystemd-shared.la
3012
3013 rootlibexec_PROGRAMS += \
3014         systemd-vconsole-setup
3015
3016 nodist_systemunit_DATA += \
3017         units/systemd-vconsole-setup.service
3018
3019 vconsole-install-data-hook:
3020         $(MKDIR_P) -m 0755 \
3021                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
3022         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
3023                 rm -f systemd-vconsole-setup.service && \
3024                 $(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service )
3025
3026 INSTALL_DATA_HOOKS += \
3027         vconsole-install-data-hook
3028
3029 MANPAGES += \
3030         man/vconsole.conf.5 \
3031         man/systemd-vconsole-setup.service.8
3032
3033 MANPAGES_ALIAS += \
3034         man/systemd-vconsole-setup.8
3035
3036 man/systemd-vconsole-setup.8: man/systemd-vconsole-setup.service.8
3037 endif
3038
3039 EXTRA_DIST += \
3040         units/systemd-vconsole-setup.service.in
3041
3042 # ------------------------------------------------------------------------------
3043 if ENABLE_READAHEAD
3044 systemd_readahead_SOURCES = \
3045         src/readahead/readahead.c \
3046         src/readahead/readahead-collect.c \
3047         src/readahead/readahead-replay.c \
3048         src/readahead/readahead-analyze.c \
3049         src/readahead/readahead-common.c \
3050         src/readahead/readahead-common.h
3051
3052 systemd_readahead_LDADD = \
3053         libsystemd-shared.la \
3054         libsystemd-daemon.la \
3055         libudev.la
3056
3057 dist_doc_DATA += \
3058         src/readahead/sd-readahead.c \
3059         src/systemd/sd-readahead.h
3060
3061 rootlibexec_PROGRAMS += \
3062         systemd-readahead
3063
3064 dist_systemunit_DATA += \
3065         units/systemd-readahead-drop.service \
3066         units/systemd-readahead-done.timer
3067
3068 nodist_systemunit_DATA += \
3069         units/systemd-readahead-collect.service \
3070         units/systemd-readahead-replay.service \
3071         units/systemd-readahead-done.service
3072
3073 MANPAGES += \
3074         man/sd_readahead.3 \
3075         man/sd-readahead.3 \
3076         man/systemd-readahead-replay.service.8
3077
3078 MANPAGES_ALIAS += \
3079         man/systemd-readahead-collect.service.8 \
3080         man/systemd-readahead-done.service.8 \
3081         man/systemd-readahead-done.timer.8 \
3082         man/systemd-readahead.8
3083
3084 man/systemd-readahead-collect.service.8: man/systemd-readahead-replay.service.8
3085 man/systemd-readahead-done.service.8: man/systemd-readahead-replay.service.8
3086 man/systemd-readahead-done.timer.8: man/systemd-readahead-replay.service.8
3087 man/systemd-readahead.8: man/systemd-readahead-replay.service.8
3088
3089 endif
3090
3091 EXTRA_DIST += \
3092         units/systemd-readahead-collect.service.in \
3093         units/systemd-readahead-replay.service.in \
3094         units/systemd-readahead-done.service.in
3095
3096 # ------------------------------------------------------------------------------
3097 if ENABLE_QUOTACHECK
3098 rootlibexec_PROGRAMS += \
3099         systemd-quotacheck
3100
3101 nodist_systemunit_DATA += \
3102         units/systemd-quotacheck.service
3103
3104 systemd_quotacheck_SOURCES = \
3105         src/quotacheck/quotacheck.c
3106
3107 systemd_quotacheck_LDADD = \
3108         libsystemd-shared.la
3109
3110 MANPAGES += \
3111         man/systemd-quotacheck.service.8
3112
3113 MANPAGES_ALIAS += \
3114         man/systemd-quotacheck.8
3115
3116 man/systemd-quotacheck.8: man/systemd-quotacheck.service.8
3117
3118 endif
3119
3120 EXTRA_DIST += \
3121         units/systemd-quotacheck.service.in
3122
3123 nodist_systemunit_DATA += \
3124         units/quotaon.service
3125
3126 # ------------------------------------------------------------------------------
3127 if ENABLE_RANDOMSEED
3128 rootlibexec_PROGRAMS += \
3129         systemd-random-seed
3130
3131 nodist_systemunit_DATA += \
3132         units/systemd-random-seed-save.service \
3133         units/systemd-random-seed-load.service
3134
3135 systemd_random_seed_SOURCES = \
3136         src/random-seed/random-seed.c
3137
3138 systemd_random_seed_LDADD = \
3139         libsystemd-label.la \
3140         libsystemd-shared.la
3141
3142 randomseed-install-data-hook:
3143         $(MKDIR_P) -m 0755 \
3144                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
3145                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
3146         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
3147                 rm -f systemd-random-seed-save.service && \
3148                 $(LN_S) ../systemd-random-seed-save.service systemd-random-seed-save.service )
3149         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
3150                 rm -f systemd-random-seed-load.service && \
3151                 $(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service )
3152
3153 INSTALL_DATA_HOOKS += \
3154         randomseed-install-data-hook
3155
3156 MANPAGES += \
3157         man/systemd-random-seed-load.service.8
3158
3159 MANPAGES_ALIAS +=  \
3160         man/systemd-random-seed-save.service.8 \
3161         man/systemd-random-seed.8
3162
3163 man/systemd-random-seed-save.service.8: man/systemd-random-seed-load.service.8
3164 man/systemd-random-seed.8: man/systemd-random-seed-load.service.8
3165
3166 endif
3167
3168 EXTRA_DIST += \
3169         units/systemd-random-seed-save.service.in \
3170         units/systemd-random-seed-load.service.in
3171
3172 # ------------------------------------------------------------------------------
3173 if HAVE_LIBCRYPTSETUP
3174 rootlibexec_PROGRAMS += \
3175         systemd-cryptsetup
3176
3177 systemgenerator_PROGRAMS += \
3178         systemd-cryptsetup-generator
3179
3180 dist_systemunit_DATA += \
3181         units/cryptsetup.target
3182
3183 systemd_cryptsetup_SOURCES = \
3184         src/cryptsetup/cryptsetup.c
3185
3186 systemd_cryptsetup_CFLAGS = \
3187         $(AM_CFLAGS) \
3188         $(LIBCRYPTSETUP_CFLAGS)
3189
3190 systemd_cryptsetup_LDADD = \
3191         libsystemd-label.la \
3192         libsystemd-shared.la \
3193         libudev.la \
3194         $(LIBCRYPTSETUP_LIBS)
3195
3196 systemd_cryptsetup_generator_SOURCES = \
3197         src/cryptsetup/cryptsetup-generator.c
3198
3199 systemd_cryptsetup_generator_LDADD = \
3200         libsystemd-label.la \
3201         libsystemd-shared.la
3202
3203 cryptsetup-install-data-hook:
3204         $(MKDIR_P) -m 0755 \
3205                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
3206         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
3207                 rm -f cryptsetup.target && \
3208                 $(LN_S) ../cryptsetup.target cryptsetup.target )
3209
3210 INSTALL_DATA_HOOKS += \
3211         cryptsetup-install-data-hook
3212
3213 MANPAGES += \
3214         man/systemd-cryptsetup@.service.8 \
3215         man/systemd-cryptsetup-generator.8 \
3216         man/crypttab.5
3217
3218 MANPAGES_ALIAS += \
3219         man/systemd-cryptsetup.8
3220
3221 man/systemd-cryptsetup.8: man/systemd-cryptsetup@.service.8
3222
3223 endif
3224
3225 # ------------------------------------------------------------------------------
3226 if ENABLE_HOSTNAMED
3227 systemd_hostnamed_SOURCES = \
3228         src/hostname/hostnamed.c
3229
3230 systemd_hostnamed_CFLAGS = \
3231         $(AM_CFLAGS) \
3232         $(DBUS_CFLAGS)
3233
3234 systemd_hostnamed_LDADD = \
3235         libsystemd-shared.la \
3236         libsystemd-daemon.la \
3237         libsystemd-dbus.la
3238
3239 rootlibexec_PROGRAMS += \
3240         systemd-hostnamed
3241
3242 nodist_systemunit_DATA += \
3243         units/systemd-hostnamed.service
3244
3245 dist_dbuspolicy_DATA += \
3246         src/hostname/org.freedesktop.hostname1.conf
3247
3248 dist_dbussystemservice_DATA += \
3249         src/hostname/org.freedesktop.hostname1.service
3250
3251 polkitpolicy_files += \
3252         src/hostname/org.freedesktop.hostname1.policy
3253
3254 dbusinterface_DATA += \
3255         org.freedesktop.hostname1.xml
3256
3257 org.freedesktop.hostname1.xml: systemd-hostnamed
3258         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.hostname1 $< $@.tmp && \
3259                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
3260                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
3261
3262 hostnamed-install-data-hook:
3263         ( cd $(DESTDIR)$(systemunitdir) && \
3264                 rm -f dbus-org.freedesktop.hostname1.service && \
3265                 $(LN_S) systemd-hostnamed.service dbus-org.freedesktop.hostname1.service )
3266
3267 INSTALL_DATA_HOOKS += \
3268         hostnamed-install-data-hook
3269
3270 MANPAGES += \
3271         man/systemd-hostnamed.service.8
3272
3273 MANPAGES_ALIAS += \
3274         man/systemd-hostnamed.8
3275
3276 man/systemd-hostnamed.8: man/systemd-hostnamed.service.8
3277
3278 hostnamectl_SOURCES = \
3279         src/hostname/hostnamectl.c
3280
3281 hostnamectl_CFLAGS = \
3282         $(AM_CFLAGS) \
3283         $(DBUS_CFLAGS)
3284
3285 hostnamectl_LDADD = \
3286         libsystemd-shared.la \
3287         libsystemd-dbus.la \
3288         libsystemd-id128-internal.la
3289
3290 bin_PROGRAMS += \
3291         hostnamectl
3292
3293 MANPAGES += \
3294         man/hostnamectl.1
3295
3296 endif
3297
3298 polkitpolicy_in_files += \
3299         src/hostname/org.freedesktop.hostname1.policy.in
3300
3301 EXTRA_DIST += \
3302         units/systemd-hostnamed.service.in
3303
3304 # ------------------------------------------------------------------------------
3305 if ENABLE_LOCALED
3306 systemd_localed_SOURCES = \
3307         src/locale/localed.c
3308
3309 systemd_localed_CFLAGS = \
3310         $(AM_CFLAGS) \
3311         $(DBUS_CFLAGS)
3312
3313 systemd_localed_LDADD = \
3314         libsystemd-label.la \
3315         libsystemd-shared.la \
3316         libsystemd-daemon.la \
3317         libsystemd-dbus.la
3318
3319 nodist_systemunit_DATA += \
3320         units/systemd-localed.service
3321
3322 rootlibexec_PROGRAMS += \
3323         systemd-localed
3324
3325 dist_dbuspolicy_DATA += \
3326         src/locale/org.freedesktop.locale1.conf
3327
3328 dist_dbussystemservice_DATA += \
3329         src/locale/org.freedesktop.locale1.service
3330
3331 polkitpolicy_files += \
3332         src/locale/org.freedesktop.locale1.policy
3333
3334 dbusinterface_DATA += \
3335         org.freedesktop.locale1.xml
3336
3337 org.freedesktop.locale1.xml: systemd-localed
3338         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.locale1 $< $@.tmp && \
3339                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
3340                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
3341
3342 localed-install-data-hook:
3343         ( cd $(DESTDIR)$(systemunitdir) && \
3344                 rm -f dbus-org.freedesktop.locale1.service && \
3345                 $(LN_S) systemd-localed.service dbus-org.freedesktop.locale1.service )
3346
3347 INSTALL_DATA_HOOKS += \
3348         localed-install-data-hook
3349
3350 MANPAGES += \
3351         man/systemd-localed.service.8
3352
3353 MANPAGES_ALIAS += \
3354         man/systemd-localed.8
3355
3356 man/systemd-localed.8: man/systemd-localed.service.8
3357
3358 dist_pkgdata_DATA += \
3359         src/locale/kbd-model-map
3360
3361 dist_noinst_SCRIPT = \
3362         src/locale/generate-kbd-model-map
3363
3364 update-kbd-model-map:
3365         src/locale/generate-kbd-model-map > src/locale/kbd-model-map
3366
3367 localectl_SOURCES = \
3368         src/locale/localectl.c
3369
3370 localectl_CFLAGS = \
3371         $(AM_CFLAGS) \
3372         $(DBUS_CFLAGS)
3373
3374 localectl_LDADD = \
3375         libsystemd-shared.la \
3376         libsystemd-dbus.la \
3377         libsystemd-id128-internal.la
3378
3379 bin_PROGRAMS += \
3380         localectl
3381
3382 MANPAGES += \
3383         man/localectl.1
3384
3385 endif
3386
3387 polkitpolicy_in_files += \
3388         src/locale/org.freedesktop.locale1.policy.in
3389
3390 EXTRA_DIST += \
3391         units/systemd-localed.service.in
3392
3393 # ------------------------------------------------------------------------------
3394 if ENABLE_TIMEDATED
3395 systemd_timedated_SOURCES = \
3396         src/timedate/timedated.c
3397
3398 systemd_timedated_CFLAGS = \
3399         $(AM_CFLAGS) \
3400         $(DBUS_CFLAGS)
3401
3402 systemd_timedated_LDADD = \
3403         libsystemd-shared.la \
3404         libsystemd-daemon.la \
3405         libsystemd-dbus.la
3406
3407 rootlibexec_PROGRAMS += \
3408         systemd-timedated
3409
3410 dist_dbussystemservice_DATA += \
3411         src/timedate/org.freedesktop.timedate1.service
3412
3413 dist_dbuspolicy_DATA += \
3414         src/timedate/org.freedesktop.timedate1.conf
3415
3416 nodist_systemunit_DATA += \
3417         units/systemd-timedated.service
3418
3419 polkitpolicy_files += \
3420         src/timedate/org.freedesktop.timedate1.policy
3421
3422 org.freedesktop.timedate1.xml: systemd-timedated
3423         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.timedate1 $< $@.tmp && \
3424                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
3425                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
3426
3427 dbusinterface_DATA += \
3428         org.freedesktop.timedate1.xml
3429
3430 timedated-install-data-hook:
3431         $(MKDIR_P) -m 0755 \
3432                 $(DESTDIR)$(prefix)/lib/systemd/ntp-units.d \
3433                 $(DESTDIR)$(sysconfdir)/systemd/ntp-units.d
3434         ( cd $(DESTDIR)$(systemunitdir) && \
3435                 rm -f dbus-org.freedesktop.timedate1.service  && \
3436                 $(LN_S) systemd-timedated.service dbus-org.freedesktop.timedate1.service )
3437
3438 INSTALL_DATA_HOOKS += \
3439         timedated-install-data-hook
3440
3441 MANPAGES += \
3442         man/systemd-timedated.service.8
3443
3444 MANPAGES_ALIAS += \
3445         man/systemd-timedated.8
3446
3447 man/systemd-timedated.8: man/systemd-timedated.service.8
3448
3449 timedatectl_SOURCES = \
3450         src/timedate/timedatectl.c
3451
3452 timedatectl_CFLAGS = \
3453         $(AM_CFLAGS) \
3454         $(DBUS_CFLAGS)
3455
3456 timedatectl_LDADD = \
3457         libsystemd-shared.la \
3458         libsystemd-dbus.la
3459
3460 bin_PROGRAMS += \
3461         timedatectl
3462
3463 MANPAGES += \
3464         man/timedatectl.1
3465
3466 endif
3467
3468 polkitpolicy_in_files += \
3469         src/timedate/org.freedesktop.timedate1.policy.in
3470
3471 EXTRA_DIST += \
3472         units/systemd-timedated.service.in
3473
3474 # ------------------------------------------------------------------------------
3475 if ENABLE_LOGIND
3476 systemd_logind_SOURCES = \
3477         src/login/logind.c \
3478         src/login/logind.h \
3479         src/login/logind-dbus.c \
3480         src/login/logind-device.c \
3481         src/login/logind-device.h \
3482         src/login/logind-button.c \
3483         src/login/logind-button.h \
3484         src/login/logind-action.c \
3485         src/login/logind-action.h \
3486         src/login/logind-seat.c \
3487         src/login/logind-seat.h \
3488         src/login/logind-session.c \
3489         src/login/logind-session.h \
3490         src/login/logind-user.c \
3491         src/login/logind-user.h \
3492         src/login/logind-inhibit.c \
3493         src/login/logind-inhibit.h \
3494         src/login/logind-session-dbus.c \
3495         src/login/logind-seat-dbus.c \
3496         src/login/logind-user-dbus.c \
3497         src/login/logind-acl.h
3498
3499 nodist_systemd_logind_SOURCES = \
3500         src/login/logind-gperf.c
3501
3502 systemd_logind_CFLAGS = \
3503         $(AM_CFLAGS) \
3504         $(DBUS_CFLAGS)
3505
3506 systemd_logind_LDADD = \
3507         libsystemd-label.la \
3508         libsystemd-shared.la \
3509         libsystemd-audit.la \
3510         libsystemd-daemon.la \
3511         libsystemd-dbus.la \
3512         libudev.la
3513
3514 if HAVE_ACL
3515 systemd_logind_SOURCES += \
3516         src/login/logind-acl.c
3517
3518 systemd_logind_LDADD += \
3519         libsystemd-acl.la
3520 endif
3521
3522 systemd_user_sessions_SOURCES = \
3523         src/login/user-sessions.c
3524
3525 systemd_user_sessions_LDADD = \
3526         libsystemd-shared.la
3527
3528 rootlibexec_PROGRAMS += \
3529         systemd-logind \
3530         systemd-user-sessions
3531
3532 loginctl_SOURCES = \
3533         src/login/loginctl.c \
3534         src/login/sysfs-show.c
3535
3536 loginctl_CFLAGS = \
3537         $(AM_CFLAGS) \
3538         $(DBUS_CFLAGS)
3539
3540 loginctl_LDADD = \
3541         libsystemd-shared.la \
3542         libsystemd-dbus.la \
3543         libudev.la
3544
3545 rootbin_PROGRAMS += \
3546         loginctl
3547
3548 systemd_inhibit_SOURCES = \
3549         src/login/inhibit.c
3550
3551 systemd_inhibit_CFLAGS = \
3552         $(AM_CFLAGS) \
3553         $(DBUS_CFLAGS)
3554
3555 systemd_inhibit_LDADD = \
3556         libsystemd-shared.la \
3557         libsystemd-dbus.la
3558
3559 rootbin_PROGRAMS += \
3560         systemd-inhibit
3561
3562 test_login_SOURCES = \
3563         src/login/test-login.c
3564
3565 test_login_LDADD = \
3566         libsystemd-login-internal.la \
3567         libsystemd-shared.la
3568
3569 test_inhibit_SOURCES = \
3570         src/login/test-inhibit.c
3571
3572 test_inhibit_LDADD = \
3573         libsystemd-shared.la \
3574         libsystemd-dbus.la
3575
3576 test_inhibit_CFLAGS = \
3577         $(AM_CFLAGS) \
3578         $(DBUS_CFLAGS)
3579
3580 noinst_PROGRAMS += \
3581         test-login \
3582         test-inhibit
3583
3584 libsystemd_login_la_SOURCES = \
3585         src/login/sd-login.c
3586
3587 libsystemd_login_la_CFLAGS = \
3588         $(AM_CFLAGS) \
3589         -fvisibility=hidden
3590
3591 libsystemd_login_la_LDFLAGS = \
3592         $(AM_LDFLAGS) \
3593         -shared \
3594         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
3595         -Wl,--version-script=$(top_srcdir)/src/login/libsystemd-login.sym
3596
3597 libsystemd_login_la_LIBADD = \
3598         libsystemd-shared.la
3599
3600 libsystemd_login_internal_la_SOURCES = \
3601         $(libsystemd_login_la_SOURCES)
3602
3603 if HAVE_PAM
3604 pam_systemd_la_SOURCES = \
3605         src/login/pam-module.c
3606
3607 pam_systemd_la_CFLAGS = \
3608         $(AM_CFLAGS) \
3609         $(PAM_CFLAGS) \
3610         $(DBUS_CFLAGS) \
3611         -fvisibility=hidden
3612
3613 pam_systemd_la_LDFLAGS = \
3614         $(AM_LDFLAGS) \
3615         -module \
3616         -export-dynamic \
3617         -avoid-version \
3618         -shared \
3619         -export-symbols-regex '^pam_sm_.*'
3620
3621 pam_systemd_la_LIBADD = \
3622         libsystemd-daemon.la \
3623         libsystemd-audit.la \
3624         libsystemd-dbus.la \
3625         libsystemd-shared.la \
3626         $(PAM_LIBS)
3627
3628 pamlib_LTLIBRARIES = \
3629         pam_systemd.la
3630 endif
3631
3632 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3633 libsystemd-login-install-hook:
3634         if test "$(libdir)" != "$(rootlibdir)"; then \
3635                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
3636                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-login.so) && \
3637                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
3638                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-login.so && \
3639                 mv $(DESTDIR)$(libdir)/libsystemd-login.so.* $(DESTDIR)$(rootlibdir); \
3640         fi
3641
3642 INSTALL_EXEC_HOOKS += \
3643         libsystemd-login-install-hook
3644
3645 libsystemd-login-uninstall-hook:
3646         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
3647
3648 UNINSTALL_EXEC_HOOKS += \
3649         libsystemd-login-uninstall-hook
3650
3651 nodist_systemunit_DATA += \
3652         units/systemd-logind.service \
3653         units/systemd-user-sessions.service
3654
3655 dist_dbussystemservice_DATA += \
3656         src/login/org.freedesktop.login1.service
3657
3658 dist_dbuspolicy_DATA += \
3659         src/login/org.freedesktop.login1.conf
3660
3661 dist_pkgsysconf_DATA += \
3662         src/login/logind.conf
3663
3664 pkginclude_HEADERS += \
3665         src/systemd/sd-login.h
3666
3667 lib_LTLIBRARIES += \
3668         libsystemd-login.la
3669
3670 noinst_LTLIBRARIES += \
3671         libsystemd-login-internal.la
3672
3673 pkgconfiglib_DATA += \
3674         src/login/libsystemd-login.pc
3675
3676 polkitpolicy_files += \
3677         src/login/org.freedesktop.login1.policy
3678
3679 logind-install-data-hook:
3680         $(MKDIR_P) -m 0755 \
3681                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
3682                 $(DESTDIR)$(systemdstatedir)
3683         ( cd $(DESTDIR)$(systemunitdir) && \
3684                 rm -f dbus-org.freedesktop.login1.service && \
3685                 $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service)
3686         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
3687                 rm -f systemd-logind.service systemd-user-sessions.service && \
3688                 $(LN_S) ../systemd-logind.service systemd-logind.service && \
3689                 $(LN_S) ../systemd-user-sessions.service systemd-user-sessions.service )
3690
3691 INSTALL_DATA_HOOKS += \
3692         logind-install-data-hook
3693
3694 systemd_multi_seat_x_SOURCES = \
3695         src/login/multi-seat-x.c
3696
3697 systemd_multi_seat_x_LDADD = \
3698         libsystemd-label.la \
3699         libsystemd-shared.la
3700
3701 rootlibexec_PROGRAMS += \
3702         systemd-multi-seat-x
3703
3704 dist_udevrules_DATA += \
3705         src/login/70-uaccess.rules \
3706         src/login/70-power-switch.rules
3707
3708 nodist_udevrules_DATA += \
3709         src/login/71-seat.rules \
3710         src/login/73-seat-late.rules
3711
3712 MANPAGES += \
3713         man/systemd-logind.service.8 \
3714         man/logind.conf.5 \
3715         man/sd-login.3 \
3716         man/loginctl.1 \
3717         man/sd_login_monitor_new.3 \
3718         man/sd_pid_get_session.3 \
3719         man/sd_uid_get_state.3 \
3720         man/sd_session_is_active.3 \
3721         man/sd_seat_get_active.3 \
3722         man/sd_get_seats.3 \
3723         man/systemd-user-sessions.service.8
3724
3725 MANPAGES_ALIAS += \
3726         man/sd_login_monitor_unref.3 \
3727         man/sd_login_monitor_flush.3 \
3728         man/sd_login_monitor_get_fd.3 \
3729         man/sd_login_monitor.3 \
3730         man/sd_session_get_uid.3 \
3731         man/sd_session_get_seat.3 \
3732         man/sd_session_get_service.3 \
3733         man/sd_session_get_state.3 \
3734         man/sd_session_get_type.3 \
3735         man/sd_session_get_class.3 \
3736         man/sd_session_get_display.3 \
3737         man/sd_pid_get_owner_uid.3 \
3738         man/sd_pid_get_unit.3 \
3739         man/sd_uid_is_on_seat.3 \
3740         man/sd_uid_get_sessions.3 \
3741         man/sd_uid_get_seats.3 \
3742         man/sd_seat_get_sessions.3 \
3743         man/sd_seat_can_multi_session.3 \
3744         man/sd_get_sessions.3 \
3745         man/sd_get_uids.3 \
3746         man/systemd-logind.8 \
3747         man/systemd-user-sessions.8
3748
3749 man/systemd-logind.8: man/systemd-logind.service.8
3750 man/sd_login_monitor_unref.3: man/sd_login_monitor_new.3
3751 man/sd_login_monitor_flush.3: man/sd_login_monitor_new.3
3752 man/sd_login_monitor_get_fd.3: man/sd_login_monitor_new.3
3753 man/sd_login_monitor.3: man/sd_login_monitor_new.3
3754 man/sd_session_get_uid.3: man/sd_session_is_active.3
3755 man/sd_session_get_seat.3: man/sd_session_is_active.3
3756 man/sd_session_get_service.3: man/sd_session_is_active.3
3757 man/sd_session_get_state.3: man/sd_session_is_active.3
3758 man/sd_session_get_type.3: man/sd_session_is_active.3
3759 man/sd_session_get_class.3: man/sd_session_is_active.3
3760 man/sd_session_get_display.3: man/sd_session_is_active.3
3761 man/sd_pid_get_owner_uid.3: man/sd_pid_get_session.3
3762 man/sd_pid_get_unit.3: man/sd_pid_get_session.3
3763 man/sd_uid_is_on_seat.3: man/sd_uid_get_state.3
3764 man/sd_uid_get_sessions.3: man/sd_uid_get_state.3
3765 man/sd_uid_get_seats.3: man/sd_uid_get_state.3
3766 man/sd_seat_get_sessions.3: man/sd_seat_get_active.3
3767 man/sd_seat_can_multi_session.3: man/sd_seat_get_active.3
3768 man/sd_get_sessions.3: man/sd_get_seats.3
3769 man/sd_get_uids.3: man/sd_get_seats.3
3770 man/systemd-user-sessions.8: man/systemd-user-sessions.service.8
3771
3772 CLEANFILES += \
3773         src/login/logind-gperf.c \
3774         src/login/71-seat.rules \
3775         src/login/73-seat-late.rules
3776 endif
3777
3778 polkitpolicy_in_files += \
3779         src/login/org.freedesktop.login1.policy.in
3780
3781 EXTRA_DIST += \
3782         src/login/logind-gperf.gperf \
3783         src/login/libsystemd-login.pc.in \
3784         src/login/libsystemd-login.sym \
3785         src/login/71-seat.rules.in \
3786         src/login/73-seat-late.rules.in \
3787         units/systemd-logind.service.in \
3788         units/systemd-user-sessions.service.in
3789
3790 # ------------------------------------------------------------------------------
3791
3792 if HAVE_PYTHON_DEVEL
3793
3794 pkgpyexec_LTLIBRARIES = \
3795         _journal.la
3796
3797 _journal_la_SOURCES = \
3798         src/python-systemd/_journal.c
3799
3800 _journal_la_CFLAGS = \
3801         $(AM_CFLAGS) \
3802         -fvisibility=default \
3803         $(PYTHON_CFLAGS)
3804
3805 _journal_la_LDFLAGS = \
3806         $(AM_LDFLAGS) \
3807         -shared \
3808         -module \
3809         -avoid-version
3810
3811 _journal_la_LIBADD = \
3812         $(PYTHON_LIBS) \
3813         libsystemd-journal.la
3814
3815 dist_pkgpyexec_PYTHON = \
3816         src/python-systemd/journal.py \
3817         src/python-systemd/__init__.py
3818
3819 endif
3820
3821 # ------------------------------------------------------------------------------
3822
3823 SED_PROCESS = \
3824         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3825         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
3826                 -e 's,@rootbindir\@,$(rootbindir),g' \
3827                 -e 's,@bindir\@,$(bindir),g' \
3828                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
3829                 -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
3830                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
3831                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
3832                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
3833                 -e 's,@userunitdir\@,$(userunitdir),g' \
3834                 -e 's,@systempresetdir\@,$(systempresetdir),g' \
3835                 -e 's,@userpresetdir\@,$(userpresetdir),g' \
<