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