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