1 # This file is part of systemd.
3 # Copyright 2010 Lennart Poettering
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.
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.
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/>.
18 ACLOCAL_AMFLAGS = -I m4
20 # Dirs of external packages
21 dbuspolicydir=@dbuspolicydir@
22 dbussessionservicedir=@dbussessionservicedir@
23 dbussystemservicedir=@dbussystemservicedir@
24 dbusinterfacedir=@dbusinterfacedir@
25 udevrulesdir=@udevrulesdir@
27 pkgconfigdatadir=$(datadir)/pkgconfig
29 # Our own, non-special dirs
30 pkgsysconfdir=$(sysconfdir)/systemd
31 sessionunitdir=$(pkgdatadir)/session
33 # And these are the special ones for /
35 rootbindir=$(rootdir)/bin
36 rootlibexecdir=$(rootdir)/lib/systemd
37 systemunitdir=$(rootdir)/lib/systemd/system
40 -include $(top_builddir)/config.h \
41 -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
42 -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
43 -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
44 -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
45 -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
46 -DSESSION_CONFIG_FILE=\"$(pkgsysconfdir)/session.conf\" \
47 -DSESSION_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/session\" \
48 -DSESSION_DATA_UNIT_PATH=\"$(sessionunitdir)\" \
49 -DCGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
50 -DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \
51 -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
52 -DRUNTIME_DIR=\"$(localstatedir)/run\" \
68 rootlibexec_PROGRAMS = \
70 systemd-cgroups-agent \
83 pamlib_LTLIBRARIES = \
87 dist_pkgsysconf_DATA = \
90 dist_dbuspolicy_DATA = \
91 src/org.freedesktop.systemd1.conf
93 dist_dbussystemservice_DATA = \
94 src/org.freedesktop.systemd1.service
96 dist_udevrules_DATA = \
99 dbusinterface_DATA = \
100 org.freedesktop.systemd1.Manager.xml \
101 org.freedesktop.systemd1.Job.xml \
102 org.freedesktop.systemd1.Unit.xml \
103 org.freedesktop.systemd1.Service.xml \
104 org.freedesktop.systemd1.Socket.xml \
105 org.freedesktop.systemd1.Timer.xml \
106 org.freedesktop.systemd1.Target.xml \
107 org.freedesktop.systemd1.Device.xml \
108 org.freedesktop.systemd1.Mount.xml \
109 org.freedesktop.systemd1.Automount.xml \
110 org.freedesktop.systemd1.Snapshot.xml \
111 org.freedesktop.systemd1.Swap.xml \
112 org.freedesktop.systemd1.Path.xml
114 dist_systemunit_DATA = \
115 units/emergency.service \
116 units/emergency.target \
120 units/local-fs.target \
121 units/network.target \
122 units/nss-lookup.target \
123 units/mail-transfer-agent.target \
124 units/poweroff.target \
125 units/reboot.target \
126 units/rescue.target \
127 units/rpcbind.target \
128 units/rtc-set.target \
129 units/shutdown.target \
130 units/umount.target \
131 units/sigpwr.target \
132 units/sockets.target \
135 units/systemd-initctl.socket \
136 units/systemd-logger.socket \
137 units/dev-hugepages.automount \
138 units/dev-hugepages.mount \
139 units/dev-mqueue.automount \
140 units/dev-mqueue.mount \
141 units/proc-sys-fs-binfmt_misc.automount \
142 units/proc-sys-fs-binfmt_misc.mount \
143 units/sys-kernel-debug.automount \
144 units/sys-kernel-debug.mount \
145 units/sys-kernel-security.automount \
146 units/sys-kernel-security.mount \
147 units/var-lock.mount \
148 units/var-run.mount \
149 units/printer.target \
150 units/bluetooth.target \
151 units/smartcard.target
153 nodist_systemunit_DATA = \
154 units/sysinit.target \
155 units/getty@.service \
156 units/graphical.target \
157 units/remote-fs.target \
158 units/multi-user.target \
159 units/systemd-initctl.service \
160 units/systemd-logger.service \
163 dist_sessionunit_DATA = \
164 units/session/default.target
166 nodist_sessionunit_DATA = \
167 units/session/remote-fs.target \
168 units/session/exit.service
171 units/sysinit.target.m4 \
172 units/getty@.service.m4 \
173 units/graphical.target.m4 \
174 units/multi-user.target.m4 \
175 units/remote-fs.target.m4 \
176 units/systemd-initctl.service.in \
177 units/systemd-logger.service.in \
178 units/syslog.target.in \
179 units/session/exit.service.in \
183 dist_systemunit_DATA += \
184 units/fedora/halt.service \
185 units/fedora/killall.service \
186 units/fedora/poweroff.service \
187 units/fedora/prefdm.service \
188 units/fedora/rc-local.service \
189 units/fedora/reboot.service \
190 units/fedora/sysinit.service \
191 units/fedora/single.service \
192 units/fedora/plymouth-quit.service \
193 units/fedora/plymouth-shutdown.service
197 dist_systemunit_DATA += \
198 units/suse/halt.service \
199 units/suse/poweroff.service \
200 units/suse/reboot.service \
201 units/suse/fsck.target
205 dist_systemunit_DATA += \
206 units/gentoo/halt.service \
207 units/gentoo/killall.service \
208 units/gentoo/poweroff.service \
209 units/gentoo/reboot.service \
210 units/gentoo/xdm.service
214 dist_systemunit_DATA += \
215 units/arch/sysinit.service \
216 units/arch/rc-local.service \
217 units/arch/halt.service \
218 units/arch/poweroff.service \
219 units/arch/reboot.service
229 pkgconfigdata_DATA = \
232 noinst_LTLIBRARIES = \
233 libsystemd-basic.la \
236 libsystemd_basic_la_SOURCES = \
246 libsystemd_core_la_SOURCES = \
251 src/load-fragment.c \
273 src/dbus-automount.c \
275 src/dbus-snapshot.c \
281 src/hostname-setup.c \
282 src/loopback-setup.c \
284 src/modprobe-setup.c \
293 libsystemd_core_la_CFLAGS = \
298 libsystemd_core_la_LIBADD = \
299 libsystemd-basic.la \
306 # This is needed because automake is buggy in how it generates the
307 # rules for C programs, but not Vala programs. We therefore can't
308 # list the .h files as dependencies if we want make dist to work.
311 ${libsystemd_basic_la_SOURCES:.c=.h} \
312 ${libsystemd_core_la_SOURCES:.c=.h} \
318 src/linux/auto_dev-ioctl.h \
331 man/systemd-notify.1 \
334 man/sd_listen_fds.3 \
337 man/systemd.service.5 \
338 man/systemd.socket.5 \
339 man/systemd.mount.5 \
340 man/systemd.automount.5 \
342 man/systemd.timer.5 \
344 man/systemd.target.5 \
345 man/systemd.device.5 \
346 man/systemd.snapshot.5 \
361 man/sd_is_socket_unix.3 \
362 man/sd_is_socket_inet.3 \
366 man/reboot.8: man/halt.8
367 man/poweroff.8: man/halt.8
368 man/sd_is_socket.3: man/sd_is_fifo.3
369 man/sd_is_socket_unix.3: man/sd_is_fifo.3
370 man/sd_is_socket_inet.3: man/sd_is_fifo.3
371 man/sd_notifyf.3: man/sd_notify.3
372 man/init.1: man/systemd.1
379 man/systemd.special.7
382 ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
385 ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}}
388 ${XML_FILES:.xml=.html}
390 nodist_noinst_DATA = \
391 ${XML_IN_FILES:.xml.in=.html}
396 ${nodist_man_MANS:=.in} \
397 ${XML_IN_FILES:.xml.in=.html.in}
410 test_engine_SOURCES = \
413 test_engine_CFLAGS = $(systemd_CFLAGS)
414 test_engine_LDADD = $(systemd_LDADD)
416 test_job_type_SOURCES = \
419 test_job_type_CFLAGS = $(systemd_CFLAGS)
420 test_job_type_LDADD = $(systemd_LDADD)
425 test_ns_CFLAGS = $(systemd_CFLAGS)
426 test_ns_LDADD = $(systemd_LDADD)
428 test_loopback_SOURCES = \
429 src/test-loopback.c \
432 test_loopback_LDADD = \
435 test_daemon_SOURCES = \
439 test_daemon_LDADD = \
442 test_cgroup_SOURCES = \
446 test_cgroup_CFLAGS = \
449 test_cgroup_LDADD = \
452 test_env_replace_SOURCES = \
453 src/test-env-replace.c
455 test_env_replace_CFLAGS = \
458 test_env_replace_LDADD = \
461 systemd_logger_SOURCES = \
466 systemd_logger_LDADD = \
467 libsystemd-basic.la \
470 systemd_initctl_SOURCES = \
475 systemd_initctl_CFLAGS = \
479 systemd_initctl_LDADD = \
480 libsystemd-basic.la \
483 systemd_cgroups_agent_SOURCES = \
484 src/cgroups-agent.c \
487 systemd_cgroups_agent_CFLAGS = \
491 systemd_cgroups_agent_LDADD = \
492 libsystemd-basic.la \
495 systemctl_SOURCES = \
509 libsystemd-basic.la \
512 systemd_notify_SOURCES = \
516 systemd_notify_LDADD = \
519 systemd_cgls_SOURCES = \
524 systemd_cgls_CFLAGS = \
527 systemd_cgls_LDADD = \
530 systemadm_SOURCES = \
532 src/systemd-interfaces.vala
538 -Wno-unused-variable \
539 -Wno-unused-function \
541 -Wno-format-nonliteral
543 systemadm_VALAFLAGS = \
553 pam_systemd_la_SOURCES = \
558 pam_systemd_la_CFLAGS = \
562 pam_systemd_la_LDFLAGS = \
567 -export-symbols-regex '^pam_sm_.*'
569 pam_systemd_la_LIBADD = \
570 libsystemd-basic.la \
574 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
575 $(SED) -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
576 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
577 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
578 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
579 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
580 -e 's,@systemunitdir\@,$(systemunitdir),g' \
581 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
582 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
583 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
584 -e 's,@prefix\@,$(prefix),g' \
587 units/%: units/%.in Makefile
590 man/%: man/%.in Makefile
593 %.pc: %.pc.in Makefile
596 M4_PROCESS_SYSTEM = \
597 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
598 $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@
600 M4_PROCESS_SESSION = \
601 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
602 $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@
604 units/%: units/%.m4 Makefile
607 units/session/%: units/%.m4 Makefile
608 $(M4_PROCESS_SESSION)
611 $(nodist_systemunit_DATA) \
612 $(nodist_sessionunit_DATA) \
614 ${XML_IN_FILES:.xml.in=.html} \
615 $(pkgconfigdata_DATA)
619 ${systemadm_SOURCES:.vala=.c}
625 --param funcsynopsis.style "'ansi'"
627 XSLTPROC_PROCESS_MAN = \
628 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
629 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
631 XSLTPROC_PROCESS_MAN_IN = \
632 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
633 $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
636 XSLTPROC_PROCESS_HTML = \
637 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
638 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
640 XSLTPROC_PROCESS_HTML_IN = \
641 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
642 $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
646 $(XSLTPROC_PROCESS_MAN)
648 man/%.1.in: man/%.xml.in
649 $(XSLTPROC_PROCESS_MAN)
652 $(XSLTPROC_PROCESS_MAN)
654 man/%.3.in: man/%.xml.in
655 $(XSLTPROC_PROCESS_MAN)
658 $(XSLTPROC_PROCESS_MAN)
660 man/%.5.in: man/%.xml.in
661 $(XSLTPROC_PROCESS_MAN)
664 $(XSLTPROC_PROCESS_MAN)
666 man/%.7.in: man/%.xml.in
667 $(XSLTPROC_PROCESS_MAN_IN)
670 $(XSLTPROC_PROCESS_MAN)
672 man/%.8.in: man/%.xml.in
673 $(XSLTPROC_PROCESS_MAN_IN)
675 man/%.html: man/%.xml
676 $(XSLTPROC_PROCESS_HTML)
678 man/%.html.in: man/%.xml.in
679 $(XSLTPROC_PROCESS_HTML_IN)
683 ${nodist_man_MANS:=.in} \
684 ${XML_FILES:.xml=.html} \
685 ${XML_IN_FILES:.xml.in=.html.in}
688 org.freedesktop.systemd1.%.xml: systemd
689 $(AM_V_GEN)SYSTEMD_SKIP_API_MOUNTS=1 ./systemd --introspect=${@:.xml=} > $@
692 $(dbusinterface_DATA)
696 $(DESTDIR)$(systemunitdir) \
697 $(DESTDIR)$(sessionunitdir) \
698 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
699 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
700 $(DESTDIR)$(pkgsysconfdir)/system \
701 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
702 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
703 $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
704 $(DESTDIR)$(pkgsysconfdir)/session \
705 $(DESTDIR)$(sysconfdir)/xdg/systemd
706 $(MKDIR_P) -m 0755 $(DESTDIR)/cgroup || \
707 echo "Don't forget to create /cgroup! Couldn't create it for you, continuing anyway."
708 ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
710 $(LN_S) $(pkgsysconfdir)/session session )
711 ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
712 rm -f systemd-initctl.socket systemd-logger.socket && \
713 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
714 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket )
715 ( cd $(DESTDIR)$(sessionunitdir) && \
716 rm -f shutdown.target sockets.target local-fs.target swap.target bluetooth.target printer.target && \
717 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
718 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
719 $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \
720 $(LN_S) $(systemunitdir)/swap.target swap.target && \
721 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
722 $(LN_S) $(systemunitdir)/printer.target printer.target)
723 ( cd $(DESTDIR)$(systemunitdir) && \
724 rm -f runlevel0.target runlevel1.target runlevel6.target && \
725 $(LN_S) poweroff.target runlevel0.target && \
726 $(LN_S) rescue.target runlevel1.target && \
727 $(LN_S) reboot.target runlevel6.target )
728 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
729 rm -f default.target ctrl-alt-del.target kbrequest.target && \
730 $(LN_S) $(systemunitdir)/graphical.target default.target && \
731 $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \
732 $(LN_S) $(systemunitdir)/rescue.target kbrequest.target && \
733 rm -f runlevel2.target runlevel3.target runlevel4.target runlevel5.target && \
734 $(LN_S) $(systemunitdir)/multi-user.target runlevel2.target && \
735 $(LN_S) $(systemunitdir)/multi-user.target runlevel3.target && \
736 $(LN_S) $(systemunitdir)/multi-user.target runlevel4.target && \
737 $(LN_S) $(systemunitdir)/graphical.target runlevel5.target )
738 ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
739 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
740 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
741 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
742 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
743 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
744 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
745 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
746 ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
747 rm -f getty.target remote-fs.target && \
748 $(LN_S) $(systemunitdir)/getty.target getty.target && \
749 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
750 ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
751 rm -f dev-hugepages.automount \
752 dev-mqueue.automount \
753 proc-sys-fs-binfmt_misc.automount \
754 sys-kernel-debug.automount \
755 sys-kernel-security.automount && \
756 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
757 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
758 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
759 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
760 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount )
761 ( cd $(DESTDIR)$(dbussessionservicedir) && \
762 rm -f org.freedesktop.systemd1.service && \
763 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
766 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \
767 $(DESTDIR)$(systemunitdir)/rescue.target.wants \
768 $(DESTDIR)$(pkgsysconfdir)/system/shutdown.target.wants
769 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
770 rm -f display-manager.service && \
771 $(LN_S) $(systemunitdir)/prefdm.service display-manager.service )
772 ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
773 rm -f prefdm.service && \
774 $(LN_S) $(systemunitdir)/prefdm.service prefdm.service )
775 ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
776 rm -f rc-local.service plymouth-quit.service && \
777 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service && \
778 $(LN_S) $(systemunitdir)/plymouth-quit.service plymouth-quit.service )
779 ( cd $(DESTDIR)$(systemunitdir)/rescue.target.wants && \
780 rm -f single.service && \
781 $(LN_S) $(systemunitdir)/single.service single.service )
782 ( cd $(DESTDIR)$(pkgsysconfdir)/system/shutdown.target.wants && \
783 rm -f plymouth-shutdown.service && \
784 $(LN_S) $(systemunitdir)/plymouth-shutdown.service plymouth-shutdown.service )
785 ( cd $(DESTDIR)$(systemunitdir) && \
786 rm -f local.service && \
787 $(LN_S) rc-local.service local.service )
788 ( cd $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) && \
789 $(LN_S) halt reboot > /dev/null 2>&1 || true )
792 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
793 rm -f display-manager.service && \
794 $(LN_S) $(systemunitdir)/xdm.service display-manager.service )
795 ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
796 rm -f xdm.service && \
797 $(LN_S) $(systemunitdir)/xdm.service xdm.service )
800 ( cd $(DESTDIR)$(systemunitdir) && \
801 rm -f fsck.target && \
802 $(LN_S) sysinit.target fsck.target )
805 DISTCHECK_CONFIGURE_FLAGS = \
806 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
807 --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
808 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
809 --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
810 --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
811 --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
812 --with-rootdir=$$dc_install_base/$(rootdir)
814 upload: all distcheck
815 cp -v systemd-$(VERSION).tar.bz2 /home/lennart/cvs.fedora/systemd/devel/
816 scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
817 scp man/*.html tango:public/systemd-man/
820 git tag "v$(VERSION)" -m "systemd $(VERSION)"