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