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