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