chiark / gitweb /
aa4798d83e1fec4be72933782dd0506d9a9221cd
[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         --pkg=libnotify \
740         -g
741
742 systemd_ask_password_agent_LDADD = \
743         $(DBUSGLIB_LIBS) \
744         $(GTK_LIBS)
745
746 pam_systemd_la_SOURCES = \
747         src/pam-module.c \
748         src/cgroup-util.c \
749         src/sd-daemon.c
750
751 pam_systemd_la_CFLAGS = \
752         $(AM_CFLAGS)
753         -fvisibility=hidden
754
755 pam_systemd_la_LDFLAGS = \
756         -module \
757         -export-dynamic \
758         -avoid-version \
759         -shared \
760         -export-symbols-regex '^pam_sm_.*'
761
762 pam_systemd_la_LIBADD = \
763         libsystemd-basic.la \
764         $(PAM_LIBS)
765
766 SED_PROCESS = \
767         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
768         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
769                 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
770                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
771                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
772                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
773                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
774                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
775                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
776                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
777                 -e 's,@prefix\@,$(prefix),g' \
778                 < $< > $@
779
780 units/%: units/%.in Makefile
781         $(SED_PROCESS)
782
783 man/%: man/%.in Makefile
784         $(SED_PROCESS)
785
786 %.pc: %.pc.in Makefile
787         $(SED_PROCESS)
788
789 M4_PROCESS_SYSTEM = \
790         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
791         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@
792
793 M4_PROCESS_SESSION = \
794         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
795         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@
796
797 units/%: units/%.m4 Makefile
798         $(M4_PROCESS_SYSTEM)
799
800 units/session/%: units/%.m4 Makefile
801         $(M4_PROCESS_SESSION)
802
803 CLEANFILES = \
804         $(nodist_systemunit_DATA) \
805         $(nodist_sessionunit_DATA) \
806         $(nodist_man_MANS) \
807         ${XML_IN_FILES:.xml.in=.html} \
808         $(pkgconfigdata_DATA)
809
810 if HAVE_VALAC
811 CLEANFILES += \
812         ${systemadm_SOURCES:.vala=.c}
813 endif
814
815 if HAVE_XSLTPROC
816 XSLTPROC_FLAGS = \
817         --nonet \
818         --param funcsynopsis.style "'ansi'"
819
820 XSLTPROC_PROCESS_MAN = \
821         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
822         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
823
824 XSLTPROC_PROCESS_MAN_IN = \
825         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
826         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
827         mv ${@:.in=} $@
828
829 XSLTPROC_PROCESS_HTML = \
830         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
831         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
832
833 XSLTPROC_PROCESS_HTML_IN = \
834         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
835         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
836         mv ${@:.in=} $@
837
838 man/%.1: man/%.xml
839         $(XSLTPROC_PROCESS_MAN)
840
841 man/%.1.in: man/%.xml.in
842         $(XSLTPROC_PROCESS_MAN)
843
844 man/%.3: man/%.xml
845         $(XSLTPROC_PROCESS_MAN)
846
847 man/%.3.in: man/%.xml.in
848         $(XSLTPROC_PROCESS_MAN)
849
850 man/%.5: man/%.xml
851         $(XSLTPROC_PROCESS_MAN)
852
853 man/%.5.in: man/%.xml.in
854         $(XSLTPROC_PROCESS_MAN)
855
856 man/%.7: man/%.xml
857         $(XSLTPROC_PROCESS_MAN)
858
859 man/%.7.in: man/%.xml.in
860         $(XSLTPROC_PROCESS_MAN_IN)
861
862 man/%.8: man/%.xml
863         $(XSLTPROC_PROCESS_MAN)
864
865 man/%.8.in: man/%.xml.in
866         $(XSLTPROC_PROCESS_MAN_IN)
867
868 man/%.html: man/%.xml
869         $(XSLTPROC_PROCESS_HTML)
870
871 man/%.html.in: man/%.xml.in
872         $(XSLTPROC_PROCESS_HTML_IN)
873
874 CLEANFILES += \
875         $(dist_man_MANS) \
876         ${nodist_man_MANS:=.in} \
877         ${XML_FILES:.xml=.html} \
878         ${XML_IN_FILES:.xml.in=.html.in}
879 endif
880
881 org.freedesktop.systemd1.%.xml: systemd
882         $(AM_V_GEN)SYSTEMD_SKIP_API_MOUNTS=1 ./systemd --introspect=${@:.xml=} > $@
883
884 CLEANFILES += \
885         $(dbusinterface_DATA)
886
887 install-data-hook:
888         $(MKDIR_P) -m 0755 \
889                 $(DESTDIR)$(systemunitdir) \
890                 $(DESTDIR)$(sessionunitdir) \
891                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
892                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
893                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
894                 $(DESTDIR)$(systemunitdir)/runlevel1.target.wants \
895                 $(DESTDIR)$(systemunitdir)/runlevel2.target.wants \
896                 $(DESTDIR)$(systemunitdir)/runlevel3.target.wants \
897                 $(DESTDIR)$(systemunitdir)/runlevel4.target.wants \
898                 $(DESTDIR)$(systemunitdir)/runlevel5.target.wants \
899                 $(DESTDIR)$(pkgsysconfdir)/system \
900                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
901                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
902                 $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
903                 $(DESTDIR)$(pkgsysconfdir)/session \
904                 $(DESTDIR)$(sysconfdir)/xdg/systemd
905         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
906                 rm -f session && \
907                 $(LN_S) $(pkgsysconfdir)/session session )
908         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
909                 rm -f systemd-initctl.socket systemd-logger.socket systemd-shutdownd.socket && \
910                 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
911                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
912                 $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket )
913         ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
914                 rm -f systemd-update-utmp-runlevel.service && \
915                 $(LN_S) ../systemd-update-utmp-runlevel.service )
916         ( cd $(DESTDIR)$(systemunitdir)/runlevel2.target.wants && \
917                 rm -f systemd-update-utmp-runlevel.service && \
918                 $(LN_S) ../systemd-update-utmp-runlevel.service )
919         ( cd $(DESTDIR)$(systemunitdir)/runlevel3.target.wants && \
920                 rm -f systemd-update-utmp-runlevel.service && \
921                 $(LN_S) ../systemd-update-utmp-runlevel.service )
922         ( cd $(DESTDIR)$(systemunitdir)/runlevel4.target.wants && \
923                 rm -f systemd-update-utmp-runlevel.service && \
924                 $(LN_S) ../systemd-update-utmp-runlevel.service )
925         ( cd $(DESTDIR)$(systemunitdir)/runlevel5.target.wants && \
926                 rm -f systemd-update-utmp-runlevel.service && \
927                 $(LN_S) ../systemd-update-utmp-runlevel.service )
928         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
929                 rm -f systemd-update-utmp-shutdown.service && \
930                 $(LN_S) ../systemd-update-utmp-shutdown.service )
931         ( cd $(DESTDIR)$(sessionunitdir) && \
932                 rm -f shutdown.target sockets.target local-fs.target swap.target bluetooth.target printer.target && \
933                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
934                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
935                 $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \
936                 $(LN_S) $(systemunitdir)/swap.target swap.target && \
937                 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
938                 $(LN_S) $(systemunitdir)/printer.target printer.target)
939         ( cd $(DESTDIR)$(systemunitdir) && \
940                 rm -f runlevel0.target runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target runlevel6.target && \
941                 $(LN_S) poweroff.target runlevel0.target && \
942                 $(LN_S) rescue.target runlevel1.target && \
943                 $(LN_S) multi-user.target runlevel2.target && \
944                 $(LN_S) multi-user.target runlevel3.target && \
945                 $(LN_S) multi-user.target runlevel4.target && \
946                 $(LN_S) graphical.target runlevel5.target && \
947                 $(LN_S) reboot.target runlevel6.target )
948         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
949                 rm -f default.target ctrl-alt-del.target kbrequest.target && \
950                 $(LN_S) $(systemunitdir)/graphical.target default.target && \
951                 $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \
952                 $(LN_S) $(systemunitdir)/rescue.target kbrequest.target )
953         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
954                 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
955                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
956                 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
957                 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
958                 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
959                 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
960                 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
961         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
962                 rm -f getty.target remote-fs.target && \
963                 $(LN_S) $(systemunitdir)/getty.target getty.target && \
964                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
965         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
966                 rm -f dev-hugepages.automount \
967                         dev-mqueue.automount \
968                         proc-sys-fs-binfmt_misc.automount \
969                         sys-kernel-debug.automount \
970                         sys-kernel-security.automount && \
971                 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
972                 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
973                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
974                 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
975                 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount )
976         ( cd $(DESTDIR)$(dbussessionservicedir) && \
977                 rm -f org.freedesktop.systemd1.service && \
978                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
979 if TARGET_FEDORA
980         $(MKDIR_P) -m 0755 \
981                 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \
982                 $(DESTDIR)$(systemunitdir)/reboot.target.wants \
983                 $(DESTDIR)$(systemunitdir)/poweroff.target.wants \
984                 $(DESTDIR)$(systemunitdir)/halt.target.wants \
985                 $(DESTDIR)$(systemunitdir)/rescue.target.wants \
986                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants
987         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
988                 rm -f display-manager.service && \
989                 $(LN_S) $(systemunitdir)/prefdm.service display-manager.service )
990         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
991                 rm -f prefdm.service && \
992                 $(LN_S) $(systemunitdir)/prefdm.service prefdm.service )
993         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
994                 rm -f rc-local.service && \
995                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
996         ( cd $(DESTDIR)$(systemunitdir)/rescue.target.wants && \
997                 rm -f single.service && \
998                 $(LN_S) $(systemunitdir)/single.service single.service )
999         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1000                 rm -f plymouth-quit.service && \
1001                 $(LN_S) ../plymouth-quit.service plymouth-quit.service )
1002         ( cd $(DESTDIR)$(systemunitdir)/reboot.target.wants && \
1003                 rm -f plymouth-reboot.service && \
1004                 $(LN_S) ../plymouth-reboot.service plymouth-reboot.service )
1005         ( cd $(DESTDIR)$(systemunitdir)/poweroff.target.wants && \
1006                 rm -f plymouth-poweroff.service && \
1007                 $(LN_S) ../plymouth-poweroff.service plymouth-poweroff.service )
1008         ( cd $(DESTDIR)$(systemunitdir)/halt.target.wants && \
1009                 rm -f plymouth-halt.service && \
1010                 $(LN_S) ../plymouth-halt.service plymouth-halt.service )
1011         ( cd $(DESTDIR)$(systemunitdir) && \
1012                 rm -f local.service && \
1013                 $(LN_S) rc-local.service local.service )
1014         ( cd $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) && \
1015                 $(LN_S) halt reboot > /dev/null 2>&1 || true )
1016 endif
1017 if TARGET_GENTOO
1018         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
1019                 rm -f display-manager.service && \
1020                 $(LN_S) $(systemunitdir)/xdm.service display-manager.service )
1021         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
1022                 rm -f xdm.service && \
1023                 $(LN_S) $(systemunitdir)/xdm.service xdm.service )
1024 endif
1025 if TARGET_DEBIAN
1026         $(MKDIR_P) -m 0755 \
1027                 $(DESTDIR)$(systemunitdir)/umount.target.wants
1028         ( cd $(DESTDIR)$(systemunitdir)/umount.target.wants && \
1029                 rm -f umountfs.service umountnfs.service umountroot.service && \
1030                 $(LN_S) ../umountfs.service umountfs.service && \
1031                 $(LN_S) ../umountnfs.service umountnfs.service && \
1032                 $(LN_S) ../umountroot.service umountroot.service )
1033         ( cd $(DESTDIR)$(systemunitdir) && \
1034                 rm -f runlevel5.target && \
1035                 $(LN_S) multi-user.target runlevel5.target )
1036 endif
1037 if !TARGET_SUSE
1038 if !TARGET_DEBIAN
1039         ( cd $(DESTDIR)$(systemunitdir) && \
1040                 rm -f fsck.target && \
1041                 $(LN_S) sysinit.target fsck.target )
1042 endif
1043 endif
1044
1045 DISTCHECK_CONFIGURE_FLAGS = \
1046         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
1047         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
1048         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
1049         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
1050         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
1051         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
1052         --with-rootdir=$$dc_install_base/$(rootdir)
1053
1054 upload: all distcheck
1055         cp -v systemd-$(VERSION).tar.bz2 /home/lennart/git.fedora/systemd/
1056         scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
1057         scp man/*.html tango:public/systemd-man/
1058
1059 git-tag:
1060         git tag "v$(VERSION)" -m "systemd $(VERSION)"