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