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