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