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