chiark / gitweb /
ask-password: add minimal framework to allow services query SSL/harddisk passphrases...
[elogind.git] / Makefile.am
1 #  This file is part of systemd.
2 #
3 #  Copyright 2010 Lennart Poettering
4 #
5 #  systemd is free software; you can redistribute it and/or modify it
6 #  under the terms of the GNU General Public License as published by
7 #  the Free Software Foundation; either version 2 of the License, or
8 #  (at your option) any later version.
9 #
10 #  systemd is distributed in the hope that it will be useful, but
11 #  WITHOUT ANY WARRANTY; without even the implied warranty of
12 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 #  General Public License for more details.
14 #
15 #  You should have received a copy of the GNU General Public License
16 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
17
18 ACLOCAL_AMFLAGS = -I m4
19
20 # Dirs of external packages
21 dbuspolicydir=@dbuspolicydir@
22 dbussessionservicedir=@dbussessionservicedir@
23 dbussystemservicedir=@dbussystemservicedir@
24 dbusinterfacedir=@dbusinterfacedir@
25 udevrulesdir=@udevrulesdir@
26 pamlibdir=@pamlibdir@
27 pkgconfigdatadir=$(datadir)/pkgconfig
28 polkitpolicydir=$(datadir)/polkit-1/actions
29
30 # Our own, non-special dirs
31 pkgsysconfdir=$(sysconfdir)/systemd
32 sessionunitdir=$(pkgdatadir)/session
33
34 # And these are the special ones for /
35 rootdir=@rootdir@
36 rootbindir=$(rootdir)/bin
37 rootlibexecdir=$(rootdir)/lib/systemd
38 systemunitdir=$(rootdir)/lib/systemd/system
39
40 AM_CPPFLAGS = \
41         -include $(top_builddir)/config.h \
42         -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
43         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
44         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
45         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
46         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
47         -DSESSION_CONFIG_FILE=\"$(pkgsysconfdir)/session.conf\" \
48         -DSESSION_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/session\" \
49         -DSESSION_DATA_UNIT_PATH=\"$(sessionunitdir)\" \
50         -DCGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
51         -DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \
52         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
53         -DRUNTIME_DIR=\"$(localstatedir)/run\" \
54         -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
55         -I $(top_srcdir)/src
56
57 rootbin_PROGRAMS = \
58         systemd \
59         systemctl \
60         systemd-notify \
61         systemd-ask-password
62
63 bin_PROGRAMS = \
64         systemd-cgls
65
66 if HAVE_GTK
67 bin_PROGRAMS += \
68         systemadm \
69         systemd-ask-password-agent
70 endif
71
72 rootlibexec_PROGRAMS = \
73         systemd-logger \
74         systemd-cgroups-agent \
75         systemd-initctl \
76         systemd-update-utmp \
77         systemd-random-seed \
78         systemd-shutdownd \
79         systemd-modules-load \
80         systemd-remount-api-vfs \
81         systemd-kmsg-syslogd \
82         systemd-vconsole-setup \
83         systemd-reply-password
84
85 noinst_PROGRAMS = \
86         test-engine \
87         test-job-type \
88         test-ns \
89         test-loopback \
90         test-hostname \
91         test-daemon \
92         test-cgroup \
93         test-env-replace
94
95 if HAVE_PAM
96 pamlib_LTLIBRARIES = \
97         pam_systemd.la
98 endif
99
100 dist_pkgsysconf_DATA = \
101         src/system.conf
102
103 dist_dbuspolicy_DATA = \
104         src/org.freedesktop.systemd1.conf
105
106 dist_dbussystemservice_DATA = \
107         src/org.freedesktop.systemd1.service
108
109 dist_udevrules_DATA = \
110         src/99-systemd.rules
111
112 dbusinterface_DATA = \
113         org.freedesktop.systemd1.Manager.xml \
114         org.freedesktop.systemd1.Job.xml \
115         org.freedesktop.systemd1.Unit.xml \
116         org.freedesktop.systemd1.Service.xml \
117         org.freedesktop.systemd1.Socket.xml \
118         org.freedesktop.systemd1.Timer.xml \
119         org.freedesktop.systemd1.Target.xml \
120         org.freedesktop.systemd1.Device.xml \
121         org.freedesktop.systemd1.Mount.xml \
122         org.freedesktop.systemd1.Automount.xml \
123         org.freedesktop.systemd1.Snapshot.xml \
124         org.freedesktop.systemd1.Swap.xml \
125         org.freedesktop.systemd1.Path.xml
126
127 dist_systemunit_DATA = \
128         units/emergency.service \
129         units/emergency.target \
130         units/basic.target \
131         units/getty.target \
132         units/halt.target \
133         units/local-fs.target \
134         units/network.target \
135         units/nss-lookup.target \
136         units/mail-transfer-agent.target \
137         units/http-daemon.target \
138         units/poweroff.target \
139         units/reboot.target \
140         units/rescue.target \
141         units/rpcbind.target \
142         units/rtc-set.target \
143         units/shutdown.target \
144         units/umount.target \
145         units/sigpwr.target \
146         units/sockets.target \
147         units/swap.target \
148         units/dbus.target \
149         units/systemd-initctl.socket \
150         units/systemd-logger.socket \
151         units/systemd-shutdownd.socket \
152         units/systemd-kmsg-syslogd.socket \
153         units/dev-hugepages.automount \
154         units/dev-hugepages.mount \
155         units/dev-mqueue.automount \
156         units/dev-mqueue.mount \
157         units/proc-sys-fs-binfmt_misc.automount \
158         units/proc-sys-fs-binfmt_misc.mount \
159         units/sys-kernel-debug.automount \
160         units/sys-kernel-debug.mount \
161         units/sys-kernel-security.automount \
162         units/sys-kernel-security.mount \
163         units/tmp.mount \
164         units/var-lock.mount \
165         units/var-lock.service \
166         units/var-run.mount \
167         units/var-run.service \
168         units/hwclock-load.service \
169         units/hwclock-save.service \
170         units/sysctl.service \
171         units/remount-rootfs.service \
172         units/printer.target \
173         units/bluetooth.target \
174         units/smartcard.target
175
176 nodist_systemunit_DATA = \
177         units/sysinit.target \
178         units/getty@.service \
179         units/serial-getty@.service \
180         units/graphical.target \
181         units/remote-fs.target \
182         units/multi-user.target \
183         units/systemd-initctl.service \
184         units/systemd-logger.service \
185         units/systemd-shutdownd.service \
186         units/systemd-kmsg-syslogd.service \
187         units/systemd-modules-load.service \
188         units/systemd-vconsole-setup.service \
189         units/systemd-remount-api-vfs.service \
190         units/systemd-update-utmp-runlevel.service \
191         units/systemd-update-utmp-shutdown.service \
192         units/systemd-random-seed-save.service \
193         units/systemd-random-seed-load.service \
194         units/syslog.target
195
196 dist_sessionunit_DATA = \
197         units/session/default.target
198
199 nodist_sessionunit_DATA = \
200         units/session/remote-fs.target \
201         units/session/exit.service
202
203 EXTRA_DIST = \
204         units/sysinit.target.m4 \
205         units/getty@.service.m4 \
206         units/serial-getty@.service.m4 \
207         units/graphical.target.m4 \
208         units/multi-user.target.m4 \
209         units/remote-fs.target.m4 \
210         units/systemd-initctl.service.in \
211         units/systemd-logger.service.in \
212         units/systemd-shutdownd.service.in \
213         units/systemd-kmsg-syslogd.service.in \
214         units/systemd-modules-load.service.in \
215         units/systemd-vconsole-setup.service.in \
216         units/systemd-remount-api-vfs.service.in \
217         units/systemd-update-utmp-runlevel.service.in \
218         units/systemd-update-utmp-shutdown.service.in \
219         units/systemd-random-seed-save.service.in \
220         units/systemd-random-seed-load.service.in \
221         units/syslog.target.in \
222         units/session/exit.service.in \
223         systemd.pc.in
224
225 if TARGET_FEDORA
226 dist_systemunit_DATA += \
227         units/fedora/halt.service \
228         units/fedora/killall.service \
229         units/fedora/poweroff.service \
230         units/fedora/prefdm.service \
231         units/fedora/rc-local.service \
232         units/fedora/reboot.service \
233         units/fedora/sysinit.service \
234         units/fedora/single.service \
235         units/fedora/plymouth-quit.service \
236         units/fedora/plymouth-reboot.service \
237         units/fedora/plymouth-poweroff.service \
238         units/fedora/plymouth-halt.service
239 endif
240
241 if TARGET_DEBIAN
242 dist_systemunit_DATA += \
243         units/debian/halt.service \
244         units/debian/killall.service \
245         units/debian/poweroff.service \
246         units/debian/reboot.service \
247         units/debian/fsck.target \
248         units/debian/umountfs.service \
249         units/debian/umountnfs.service \
250         units/debian/umountroot.service
251 endif
252
253 if TARGET_SUSE
254 dist_systemunit_DATA += \
255         units/suse/halt.service \
256         units/suse/poweroff.service \
257         units/suse/reboot.service \
258         units/suse/fsck.target
259 endif
260
261 if TARGET_GENTOO
262 dist_systemunit_DATA += \
263         units/gentoo/halt.service \
264         units/gentoo/killall.service \
265         units/gentoo/poweroff.service \
266         units/gentoo/reboot.service \
267         units/gentoo/xdm.service
268 endif
269
270 if TARGET_ARCH
271 dist_systemunit_DATA += \
272         units/arch/sysinit.service \
273         units/arch/rc-local.service \
274         units/arch/halt.service \
275         units/arch/poweroff.service \
276         units/arch/reboot.service
277 endif
278
279 dist_doc_DATA = \
280         README \
281         LICENSE \
282         DISTRO_PORTING \
283         src/sd-daemon.h \
284         src/sd-daemon.c
285
286 pkgconfigdata_DATA = \
287         systemd.pc
288
289 dist_polkitpolicy_DATA = \
290         src/org.freedesktop.systemd1.policy
291
292 noinst_LTLIBRARIES = \
293         libsystemd-basic.la \
294         libsystemd-core.la
295
296 libsystemd_basic_la_SOURCES = \
297         src/util.c \
298         src/label.c \
299         src/hashmap.c \
300         src/set.c \
301         src/strv.c \
302         src/conf-parser.c \
303         src/socket-util.c \
304         src/log.c \
305         src/ratelimit.c
306
307 libsystemd_basic_la_CFLAGS = \
308         $(AM_CFLAGS) \
309         $(SELINUX_CFLAGS)
310
311 libsystemd_basic_la_LIBADD = \
312         $(SELINUX_LIBS)
313
314 libsystemd_core_la_SOURCES = \
315         src/unit.c \
316         src/job.c \
317         src/manager.c \
318         src/path-lookup.c \
319         src/load-fragment.c \
320         src/service.c \
321         src/automount.c \
322         src/mount.c \
323         src/swap.c \
324         src/device.c \
325         src/target.c \
326         src/snapshot.c \
327         src/socket.c \
328         src/timer.c \
329         src/path.c \
330         src/load-dropin.c \
331         src/execute.c \
332         src/exit-status.c \
333         src/dbus.c \
334         src/dbus-manager.c \
335         src/dbus-unit.c \
336         src/dbus-job.c \
337         src/dbus-service.c \
338         src/dbus-socket.c \
339         src/dbus-timer.c \
340         src/dbus-target.c \
341         src/dbus-mount.c \
342         src/dbus-automount.c \
343         src/dbus-swap.c \
344         src/dbus-snapshot.c \
345         src/dbus-device.c \
346         src/dbus-execute.c \
347         src/dbus-path.c \
348         src/cgroup.c \
349         src/mount-setup.c \
350         src/hostname-setup.c \
351         src/loopback-setup.c \
352         src/kmod-setup.c \
353         src/locale-setup.c \
354         src/specifier.c \
355         src/unit-name.c \
356         src/fdset.c \
357         src/namespace.c \
358         src/tcpwrap.c \
359         src/cgroup-util.c
360
361 libsystemd_core_la_CFLAGS = \
362         $(AM_CFLAGS) \
363         $(DBUS_CFLAGS) \
364         $(UDEV_CFLAGS) \
365         $(LIBWRAP_CFLAGS) \
366         $(PAM_CFLAGS) \
367         $(AUDIT_CFLAGS)
368
369 libsystemd_core_la_LIBADD = \
370         libsystemd-basic.la \
371         $(DBUS_LIBS) \
372         $(UDEV_LIBS) \
373         $(LIBWRAP_LIBS) \
374         $(PAM_LIBS) \
375         $(AUDIT_LIBS)
376
377 # This is needed because automake is buggy in how it generates the
378 # rules for C programs, but not Vala programs.  We therefore can't
379 # list the .h files as dependencies if we want make dist to work.
380
381 EXTRA_DIST += \
382         ${libsystemd_basic_la_SOURCES:.c=.h} \
383         ${libsystemd_core_la_SOURCES:.c=.h} \
384         src/macro.h \
385         src/ioprio.h \
386         src/missing.h \
387         src/list.h \
388         src/securebits.h \
389         src/linux/auto_dev-ioctl.h \
390         src/initreq.h \
391         src/sd-daemon.h \
392         src/special.h \
393         src/dbus-common.h \
394         src/bus-errors.h \
395         src/cgroup-show.h \
396         src/utmp-wtmp.h \
397         src/build.h \
398         src/shutdownd.h
399
400 MANPAGES = \
401         man/systemd.1 \
402         man/systemctl.1 \
403         man/systemadm.1 \
404         man/systemd-cgls.1 \
405         man/systemd-notify.1 \
406         man/sd_notify.3 \
407         man/sd_booted.3 \
408         man/sd_listen_fds.3 \
409         man/sd_is_fifo.3 \
410         man/systemd.unit.5 \
411         man/systemd.service.5 \
412         man/systemd.socket.5 \
413         man/systemd.mount.5 \
414         man/systemd.automount.5 \
415         man/systemd.swap.5 \
416         man/systemd.timer.5 \
417         man/systemd.path.5 \
418         man/systemd.target.5 \
419         man/systemd.device.5 \
420         man/systemd.snapshot.5 \
421         man/systemd.exec.5 \
422         man/daemon.7 \
423         man/sd-daemon.7 \
424         man/runlevel.8 \
425         man/telinit.8 \
426         man/halt.8 \
427         man/shutdown.8 \
428         man/pam_systemd.8 \
429         man/systemd.conf.5
430
431 MANPAGES_ALIAS = \
432         man/reboot.8 \
433         man/poweroff.8 \
434         man/sd_is_socket.3 \
435         man/sd_is_socket_unix.3 \
436         man/sd_is_socket_inet.3 \
437         man/sd_notifyf.3 \
438         man/init.1
439
440 man/reboot.8: man/halt.8
441 man/poweroff.8: man/halt.8
442 man/sd_is_socket.3: man/sd_is_fifo.3
443 man/sd_is_socket_unix.3: man/sd_is_fifo.3
444 man/sd_is_socket_inet.3: man/sd_is_fifo.3
445 man/sd_notifyf.3: man/sd_notify.3
446 man/init.1: man/systemd.1
447
448 dist_man_MANS = \
449         $(MANPAGES) \
450         $(MANPAGES_ALIAS)
451
452 nodist_man_MANS = \
453         man/systemd.special.7
454
455 XML_FILES = \
456         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
457
458 XML_IN_FILES = \
459         ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}}
460
461 dist_noinst_DATA = \
462         ${XML_FILES:.xml=.html}
463
464 nodist_noinst_DATA = \
465         ${XML_IN_FILES:.xml.in=.html}
466
467 EXTRA_DIST += \
468         $(XML_FILES) \
469         $(XML_IN_FILES) \
470         ${nodist_man_MANS:=.in} \
471         ${XML_IN_FILES:.xml.in=.html.in}
472
473 systemd_SOURCES = \
474         src/main.c
475
476 systemd_CFLAGS = \
477         $(AM_CFLAGS) \
478         $(DBUS_CFLAGS) \
479         $(UDEV_CFLAGS)
480
481 systemd_LDADD = \
482         libsystemd-core.la
483
484 test_engine_SOURCES = \
485         src/test-engine.c
486
487 test_engine_CFLAGS = $(systemd_CFLAGS)
488 test_engine_LDADD = $(systemd_LDADD)
489
490 test_job_type_SOURCES = \
491         src/test-job-type.c
492
493 test_job_type_CFLAGS = $(systemd_CFLAGS)
494 test_job_type_LDADD = $(systemd_LDADD)
495
496 test_ns_SOURCES = \
497         src/test-ns.c
498
499 test_ns_CFLAGS = $(systemd_CFLAGS)
500 test_ns_LDADD = $(systemd_LDADD)
501
502 test_loopback_SOURCES = \
503         src/test-loopback.c \
504         src/loopback-setup.c
505
506 test_loopback_LDADD = \
507         libsystemd-basic.la
508
509 test_hostname_SOURCES = \
510         src/test-hostname.c \
511         src/hostname-setup.c
512
513 test_hostname_LDADD = \
514         libsystemd-basic.la
515
516 test_daemon_SOURCES = \
517         src/test-daemon.c \
518         src/sd-daemon.c
519
520 test_daemon_LDADD = \
521         libsystemd-basic.la
522
523 test_cgroup_SOURCES = \
524         src/test-cgroup.c \
525         src/cgroup-util.c
526
527 test_cgroup_CFLAGS = \
528         $(AM_CFLAGS)
529
530 test_cgroup_LDADD = \
531         libsystemd-basic.la
532
533 test_env_replace_SOURCES = \
534         src/test-env-replace.c
535
536 test_env_replace_CFLAGS = \
537         $(AM_CFLAGS)
538
539 test_env_replace_LDADD = \
540         libsystemd-basic.la
541
542 systemd_logger_SOURCES = \
543         src/logger.c \
544         src/sd-daemon.c \
545         src/tcpwrap.c
546
547 systemd_logger_LDADD = \
548         libsystemd-basic.la \
549         $(LIBWRAP_LIBS)
550
551 systemd_initctl_SOURCES = \
552         src/initctl.c \
553         src/sd-daemon.c \
554         src/dbus-common.c
555
556 systemd_initctl_CFLAGS = \
557         $(AM_CFLAGS) \
558         $(DBUS_CFLAGS)
559
560 systemd_initctl_LDADD = \
561         libsystemd-basic.la \
562         $(DBUS_LIBS)
563
564 systemd_update_utmp_SOURCES = \
565         src/update-utmp.c \
566         src/dbus-common.c \
567         src/utmp-wtmp.c
568
569 systemd_update_utmp_CFLAGS = \
570         $(AM_CFLAGS) \
571         $(DBUS_CFLAGS) \
572         $(AUDIT_CFLAGS)
573
574 systemd_update_utmp_LDADD = \
575         libsystemd-basic.la \
576         $(DBUS_LIBS) \
577         $(AUDIT_LIBS)
578
579 systemd_random_seed_SOURCES = \
580         src/random-seed.c
581
582 systemd_random_seed_CFLAGS = \
583         $(AM_CFLAGS)
584
585 systemd_random_seed_LDADD = \
586         libsystemd-basic.la
587
588 systemd_shutdownd_SOURCES = \
589         src/utmp-wtmp.c \
590         src/sd-daemon.c \
591         src/shutdownd.c
592
593 systemd_shutdownd_CFLAGS = \
594         $(AM_CFLAGS)
595
596 systemd_shutdownd_LDADD = \
597         libsystemd-basic.la
598
599 systemd_modules_load_SOURCES = \
600         src/modules-load.c
601
602 systemd_modules_load_CFLAGS = \
603         $(AM_CFLAGS)
604
605 systemd_modules_load_LDADD = \
606         libsystemd-basic.la
607
608 systemd_vconsole_setup_SOURCES = \
609         src/vconsole-setup.c
610
611 systemd_vconsole_setup_CFLAGS = \
612         $(AM_CFLAGS)
613
614 systemd_vconsole_setup_LDADD = \
615         libsystemd-basic.la
616
617 systemd_remount_api_vfs_SOURCES = \
618         src/remount-api-vfs.c \
619         src/mount-setup.c
620
621 systemd_remount_api_vfs_CFLAGS = \
622         $(AM_CFLAGS)
623
624 systemd_remount_api_vfs_LDADD = \
625         libsystemd-basic.la
626
627 systemd_cgroups_agent_SOURCES = \
628         src/cgroups-agent.c \
629         src/dbus-common.c
630
631 systemd_cgroups_agent_CFLAGS = \
632         $(AM_CFLAGS) \
633         $(DBUS_CFLAGS)
634
635 systemd_cgroups_agent_LDADD = \
636         libsystemd-basic.la \
637         $(DBUS_LIBS)
638
639 systemd_kmsg_syslogd_SOURCES = \
640         src/kmsg-syslogd.c \
641         src/sd-daemon.c \
642         src/fdset.c
643
644 systemd_kmsg_syslogd_CFLAGS = \
645         $(AM_CFLAGS)
646
647 systemd_kmsg_syslogd_LDADD = \
648         libsystemd-basic.la
649
650 systemctl_SOURCES = \
651         src/systemctl.c \
652         src/utmp-wtmp.c \
653         src/dbus-common.c \
654         src/path-lookup.c \
655         src/sd-daemon.c \
656         src/cgroup-show.c \
657         src/cgroup-util.c \
658         src/exit-status.c
659
660 systemctl_CFLAGS = \
661         $(AM_CFLAGS) \
662         $(DBUS_CFLAGS)
663
664 systemctl_LDADD = \
665         libsystemd-basic.la \
666         $(DBUS_LIBS)
667
668 systemd_notify_SOURCES = \
669         src/notify.c \
670         src/sd-daemon.c
671
672 systemd_notify_LDADD = \
673         libsystemd-basic.la
674
675 systemd_ask_password_SOURCES = \
676         src/ask-password.c
677
678 systemd_ask_password_LDADD = \
679         libsystemd-basic.la
680
681 systemd_reply_password_SOURCES = \
682         src/reply-password.c
683
684 systemd_reply_password_LDADD = \
685         libsystemd-basic.la
686
687 systemd_cgls_SOURCES = \
688         src/cgls.c \
689         src/cgroup-show.c \
690         src/cgroup-util.c
691
692 systemd_cgls_CFLAGS = \
693         $(AM_CFLAGS)
694
695 systemd_cgls_LDADD = \
696         libsystemd-basic.la
697
698 systemadm_SOURCES = \
699         src/systemadm.vala \
700         src/systemd-interfaces.vala
701
702 systemadm_CFLAGS = \
703         $(AM_CFLAGS) \
704         $(DBUSGLIB_CFLAGS) \
705         $(GTK_CFLAGS) \
706         -Wno-unused-variable \
707         -Wno-unused-function \
708         -Wno-shadow \
709         -Wno-format-nonliteral
710
711 systemadm_VALAFLAGS = \
712         --pkg=dbus-glib-1 \
713         --pkg=posix \
714         --pkg=gtk+-2.0 \
715         -g
716
717 systemadm_LDADD = \
718         $(DBUSGLIB_LIBS) \
719         $(GTK_LIBS)
720
721 systemd_ask_password_agent_SOURCES = \
722         src/ask-password-agent.vala
723
724 systemd_ask_password_agent_CFLAGS = \
725         $(AM_CFLAGS) \
726         $(DBUSGLIB_CFLAGS) \
727         $(GTK_CFLAGS) \
728         -Wno-unused-variable \
729         -Wno-unused-function \
730         -Wno-shadow \
731         -Wno-format-nonliteral
732
733 systemd_ask_password_agent_VALAFLAGS = \
734         --pkg=dbus-glib-1 \
735         --pkg=posix \
736         --pkg=gtk+-2.0 \
737         --pkg=linux \
738         --pkg=gio-unix-2.0 \
739         -g
740
741 systemd_ask_password_agent_LDADD = \
742         $(DBUSGLIB_LIBS) \
743         $(GTK_LIBS)
744
745 pam_systemd_la_SOURCES = \
746         src/pam-module.c \
747         src/cgroup-util.c \
748         src/sd-daemon.c
749
750 pam_systemd_la_CFLAGS = \
751         $(AM_CFLAGS)
752         -fvisibility=hidden
753
754 pam_systemd_la_LDFLAGS = \
755         -module \
756         -export-dynamic \
757         -avoid-version \
758         -shared \
759         -export-symbols-regex '^pam_sm_.*'
760
761 pam_systemd_la_LIBADD = \
762         libsystemd-basic.la \
763         $(PAM_LIBS)
764
765 SED_PROCESS = \
766         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
767         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
768                 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
769                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
770                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
771                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
772                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
773                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
774                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
775                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
776                 -e 's,@prefix\@,$(prefix),g' \
777                 < $< > $@
778
779 units/%: units/%.in Makefile
780         $(SED_PROCESS)
781
782 man/%: man/%.in Makefile
783         $(SED_PROCESS)
784
785 %.pc: %.pc.in Makefile
786         $(SED_PROCESS)
787
788 M4_PROCESS_SYSTEM = \
789         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
790         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@
791
792 M4_PROCESS_SESSION = \
793         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
794         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@
795
796 units/%: units/%.m4 Makefile
797         $(M4_PROCESS_SYSTEM)
798
799 units/session/%: units/%.m4 Makefile
800         $(M4_PROCESS_SESSION)
801
802 CLEANFILES = \
803         $(nodist_systemunit_DATA) \
804         $(nodist_sessionunit_DATA) \
805         $(nodist_man_MANS) \
806         ${XML_IN_FILES:.xml.in=.html} \
807         $(pkgconfigdata_DATA)
808
809 if HAVE_VALAC
810 CLEANFILES += \
811         ${systemadm_SOURCES:.vala=.c}
812 endif
813
814 if HAVE_XSLTPROC
815 XSLTPROC_FLAGS = \
816         --nonet \
817         --param funcsynopsis.style "'ansi'"
818
819 XSLTPROC_PROCESS_MAN = \
820         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
821         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
822
823 XSLTPROC_PROCESS_MAN_IN = \
824         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
825         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
826         mv ${@:.in=} $@
827
828 XSLTPROC_PROCESS_HTML = \
829         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
830         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
831
832 XSLTPROC_PROCESS_HTML_IN = \
833         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
834         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
835         mv ${@:.in=} $@
836
837 man/%.1: man/%.xml
838         $(XSLTPROC_PROCESS_MAN)
839
840 man/%.1.in: man/%.xml.in
841         $(XSLTPROC_PROCESS_MAN)
842
843 man/%.3: man/%.xml
844         $(XSLTPROC_PROCESS_MAN)
845
846 man/%.3.in: man/%.xml.in
847         $(XSLTPROC_PROCESS_MAN)
848
849 man/%.5: man/%.xml
850         $(XSLTPROC_PROCESS_MAN)
851
852 man/%.5.in: man/%.xml.in
853         $(XSLTPROC_PROCESS_MAN)
854
855 man/%.7: man/%.xml
856         $(XSLTPROC_PROCESS_MAN)
857
858 man/%.7.in: man/%.xml.in
859         $(XSLTPROC_PROCESS_MAN_IN)
860
861 man/%.8: man/%.xml
862         $(XSLTPROC_PROCESS_MAN)
863
864 man/%.8.in: man/%.xml.in
865         $(XSLTPROC_PROCESS_MAN_IN)
866
867 man/%.html: man/%.xml
868         $(XSLTPROC_PROCESS_HTML)
869
870 man/%.html.in: man/%.xml.in
871         $(XSLTPROC_PROCESS_HTML_IN)
872
873 CLEANFILES += \
874         $(dist_man_MANS) \
875         ${nodist_man_MANS:=.in} \
876         ${XML_FILES:.xml=.html} \
877         ${XML_IN_FILES:.xml.in=.html.in}
878 endif
879
880 org.freedesktop.systemd1.%.xml: systemd
881         $(AM_V_GEN)SYSTEMD_SKIP_API_MOUNTS=1 ./systemd --introspect=${@:.xml=} > $@
882
883 CLEANFILES += \
884         $(dbusinterface_DATA)
885
886 install-data-hook:
887         $(MKDIR_P) -m 0755 \
888                 $(DESTDIR)$(systemunitdir) \
889                 $(DESTDIR)$(sessionunitdir) \
890                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
891                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
892                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
893                 $(DESTDIR)$(systemunitdir)/runlevel1.target.wants \
894                 $(DESTDIR)$(systemunitdir)/runlevel2.target.wants \
895                 $(DESTDIR)$(systemunitdir)/runlevel3.target.wants \
896                 $(DESTDIR)$(systemunitdir)/runlevel4.target.wants \
897                 $(DESTDIR)$(systemunitdir)/runlevel5.target.wants \
898                 $(DESTDIR)$(pkgsysconfdir)/system \
899                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
900                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
901                 $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
902                 $(DESTDIR)$(pkgsysconfdir)/session \
903                 $(DESTDIR)$(sysconfdir)/xdg/systemd
904         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
905                 rm -f session && \
906                 $(LN_S) $(pkgsysconfdir)/session session )
907         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
908                 rm -f systemd-initctl.socket systemd-logger.socket systemd-shutdownd.socket && \
909                 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
910                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
911                 $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket )
912         ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
913                 rm -f systemd-update-utmp-runlevel.service && \
914                 $(LN_S) ../systemd-update-utmp-runlevel.service )
915         ( cd $(DESTDIR)$(systemunitdir)/runlevel2.target.wants && \
916                 rm -f systemd-update-utmp-runlevel.service && \
917                 $(LN_S) ../systemd-update-utmp-runlevel.service )
918         ( cd $(DESTDIR)$(systemunitdir)/runlevel3.target.wants && \
919                 rm -f systemd-update-utmp-runlevel.service && \
920                 $(LN_S) ../systemd-update-utmp-runlevel.service )
921         ( cd $(DESTDIR)$(systemunitdir)/runlevel4.target.wants && \
922                 rm -f systemd-update-utmp-runlevel.service && \
923                 $(LN_S) ../systemd-update-utmp-runlevel.service )
924         ( cd $(DESTDIR)$(systemunitdir)/runlevel5.target.wants && \
925                 rm -f systemd-update-utmp-runlevel.service && \
926                 $(LN_S) ../systemd-update-utmp-runlevel.service )
927         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
928                 rm -f systemd-update-utmp-shutdown.service && \
929                 $(LN_S) ../systemd-update-utmp-shutdown.service )
930         ( cd $(DESTDIR)$(sessionunitdir) && \
931                 rm -f shutdown.target sockets.target local-fs.target swap.target bluetooth.target printer.target && \
932                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
933                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
934                 $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \
935                 $(LN_S) $(systemunitdir)/swap.target swap.target && \
936                 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
937                 $(LN_S) $(systemunitdir)/printer.target printer.target)
938         ( cd $(DESTDIR)$(systemunitdir) && \
939                 rm -f runlevel0.target runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target runlevel6.target && \
940                 $(LN_S) poweroff.target runlevel0.target && \
941                 $(LN_S) rescue.target runlevel1.target && \
942                 $(LN_S) multi-user.target runlevel2.target && \
943                 $(LN_S) multi-user.target runlevel3.target && \
944                 $(LN_S) multi-user.target runlevel4.target && \
945                 $(LN_S) graphical.target runlevel5.target && \
946                 $(LN_S) reboot.target runlevel6.target )
947         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
948                 rm -f default.target ctrl-alt-del.target kbrequest.target && \
949                 $(LN_S) $(systemunitdir)/graphical.target default.target && \
950                 $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \
951                 $(LN_S) $(systemunitdir)/rescue.target kbrequest.target )
952         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
953                 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
954                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
955                 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
956                 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
957                 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
958                 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
959                 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
960         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
961                 rm -f getty.target remote-fs.target && \
962                 $(LN_S) $(systemunitdir)/getty.target getty.target && \
963                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
964         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
965                 rm -f dev-hugepages.automount \
966                         dev-mqueue.automount \
967                         proc-sys-fs-binfmt_misc.automount \
968                         sys-kernel-debug.automount \
969                         sys-kernel-security.automount && \
970                 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
971                 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
972                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
973                 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
974                 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount )
975         ( cd $(DESTDIR)$(dbussessionservicedir) && \
976                 rm -f org.freedesktop.systemd1.service && \
977                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
978 if TARGET_FEDORA
979         $(MKDIR_P) -m 0755 \
980                 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \
981                 $(DESTDIR)$(systemunitdir)/reboot.target.wants \
982                 $(DESTDIR)$(systemunitdir)/poweroff.target.wants \
983                 $(DESTDIR)$(systemunitdir)/halt.target.wants \
984                 $(DESTDIR)$(systemunitdir)/rescue.target.wants \
985                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants
986         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
987                 rm -f display-manager.service && \
988                 $(LN_S) $(systemunitdir)/prefdm.service display-manager.service )
989         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
990                 rm -f prefdm.service && \
991                 $(LN_S) $(systemunitdir)/prefdm.service prefdm.service )
992         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
993                 rm -f rc-local.service && \
994                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
995         ( cd $(DESTDIR)$(systemunitdir)/rescue.target.wants && \
996                 rm -f single.service && \
997                 $(LN_S) $(systemunitdir)/single.service single.service )
998         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
999                 rm -f plymouth-quit.service && \
1000                 $(LN_S) ../plymouth-quit.service plymouth-quit.service )
1001         ( cd $(DESTDIR)$(systemunitdir)/reboot.target.wants && \
1002                 rm -f plymouth-reboot.service && \
1003                 $(LN_S) ../plymouth-reboot.service plymouth-reboot.service )
1004         ( cd $(DESTDIR)$(systemunitdir)/poweroff.target.wants && \
1005                 rm -f plymouth-poweroff.service && \
1006                 $(LN_S) ../plymouth-poweroff.service plymouth-poweroff.service )
1007         ( cd $(DESTDIR)$(systemunitdir)/halt.target.wants && \
1008                 rm -f plymouth-halt.service && \
1009                 $(LN_S) ../plymouth-halt.service plymouth-halt.service )
1010         ( cd $(DESTDIR)$(systemunitdir) && \
1011                 rm -f local.service && \
1012                 $(LN_S) rc-local.service local.service )
1013         ( cd $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) && \
1014                 $(LN_S) halt reboot > /dev/null 2>&1 || true )
1015 endif
1016 if TARGET_GENTOO
1017         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
1018                 rm -f display-manager.service && \
1019                 $(LN_S) $(systemunitdir)/xdm.service display-manager.service )
1020         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
1021                 rm -f xdm.service && \
1022                 $(LN_S) $(systemunitdir)/xdm.service xdm.service )
1023 endif
1024 if TARGET_DEBIAN
1025         $(MKDIR_P) -m 0755 \
1026                 $(DESTDIR)$(systemunitdir)/umount.target.wants
1027         ( cd $(DESTDIR)$(systemunitdir)/umount.target.wants && \
1028                 rm -f umountfs.service umountnfs.service umountroot.service && \
1029                 $(LN_S) ../umountfs.service umountfs.service && \
1030                 $(LN_S) ../umountnfs.service umountnfs.service && \
1031                 $(LN_S) ../umountroot.service umountroot.service )
1032         ( cd $(DESTDIR)$(systemunitdir) && \
1033                 rm -f runlevel5.target && \
1034                 $(LN_S) multi-user.target runlevel5.target )
1035 endif
1036 if !TARGET_SUSE
1037 if !TARGET_DEBIAN
1038         ( cd $(DESTDIR)$(systemunitdir) && \
1039                 rm -f fsck.target && \
1040                 $(LN_S) sysinit.target fsck.target )
1041 endif
1042 endif
1043
1044 DISTCHECK_CONFIGURE_FLAGS = \
1045         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
1046         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
1047         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
1048         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
1049         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
1050         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
1051         --with-rootdir=$$dc_install_base/$(rootdir)
1052
1053 upload: all distcheck
1054         cp -v systemd-$(VERSION).tar.bz2 /home/lennart/git.fedora/systemd/
1055         scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
1056         scp man/*.html tango:public/systemd-man/
1057
1058 git-tag:
1059         git tag "v$(VERSION)" -m "systemd $(VERSION)"