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