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