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