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
195 dist_systemunit_DATA += \
196 units/suse/halt.service \
197 units/suse/poweroff.service \
198 units/suse/reboot.service \
199 units/suse/fsck.target
203 dist_systemunit_DATA += \
204 units/gentoo/halt.service \
205 units/gentoo/killall.service \
206 units/gentoo/poweroff.service \
207 units/gentoo/reboot.service \
208 units/gentoo/xdm.service
212 dist_systemunit_DATA += \
213 units/arch/sysinit.service \
214 units/arch/rc-local.service \
215 units/arch/halt.service \
216 units/arch/poweroff.service \
217 units/arch/reboot.service
227 pkgconfigdata_DATA = \
230 noinst_LTLIBRARIES = \
231 libsystemd-basic.la \
234 libsystemd_basic_la_SOURCES = \
244 libsystemd_core_la_SOURCES = \
249 src/load-fragment.c \
271 src/dbus-automount.c \
273 src/dbus-snapshot.c \
279 src/hostname-setup.c \
280 src/loopback-setup.c \
282 src/modprobe-setup.c \
291 libsystemd_core_la_CFLAGS = \
296 libsystemd_core_la_LIBADD = \
297 libsystemd-basic.la \
304 # This is needed because automake is buggy in how it generates the
305 # rules for C programs, but not Vala programs. We therefore can't
306 # list the .h files as dependencies if we want make dist to work.
309 ${libsystemd_basic_la_SOURCES:.c=.h} \
310 ${libsystemd_core_la_SOURCES:.c=.h} \
316 src/linux/auto_dev-ioctl.h \
329 man/systemd-notify.1 \
332 man/sd_listen_fds.3 \
335 man/systemd.service.5 \
336 man/systemd.socket.5 \
337 man/systemd.mount.5 \
338 man/systemd.automount.5 \
340 man/systemd.timer.5 \
342 man/systemd.target.5 \
343 man/systemd.device.5 \
344 man/systemd.snapshot.5 \
359 man/sd_is_socket_unix.3 \
360 man/sd_is_socket_inet.3 \
364 man/reboot.8: man/halt.8
365 man/poweroff.8: man/halt.8
366 man/sd_is_socket.3: man/sd_is_fifo.3
367 man/sd_is_socket_unix.3: man/sd_is_fifo.3
368 man/sd_is_socket_inet.3: man/sd_is_fifo.3
369 man/sd_notifyf.3: man/sd_notify.3
370 man/init.1: man/systemd.1
377 man/systemd.special.7
380 ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
383 ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}}
386 ${XML_FILES:.xml=.html}
388 nodist_noinst_DATA = \
389 ${XML_IN_FILES:.xml.in=.html}
394 ${nodist_man_MANS:=.in} \
395 ${XML_IN_FILES:.xml.in=.html.in}
408 test_engine_SOURCES = \
411 test_engine_CFLAGS = $(systemd_CFLAGS)
412 test_engine_LDADD = $(systemd_LDADD)
414 test_job_type_SOURCES = \
417 test_job_type_CFLAGS = $(systemd_CFLAGS)
418 test_job_type_LDADD = $(systemd_LDADD)
423 test_ns_CFLAGS = $(systemd_CFLAGS)
424 test_ns_LDADD = $(systemd_LDADD)
426 test_loopback_SOURCES = \
427 src/test-loopback.c \
430 test_loopback_LDADD = \
433 test_daemon_SOURCES = \
437 test_daemon_LDADD = \
440 test_cgroup_SOURCES = \
444 test_cgroup_CFLAGS = \
447 test_cgroup_LDADD = \
450 test_env_replace_SOURCES = \
451 src/test-env-replace.c
453 test_env_replace_CFLAGS = \
456 test_env_replace_LDADD = \
459 systemd_logger_SOURCES = \
464 systemd_logger_LDADD = \
465 libsystemd-basic.la \
468 systemd_initctl_SOURCES = \
473 systemd_initctl_CFLAGS = \
477 systemd_initctl_LDADD = \
478 libsystemd-basic.la \
481 systemd_cgroups_agent_SOURCES = \
484 systemd_cgroups_agent_CFLAGS = \
488 systemd_cgroups_agent_LDADD = \
489 libsystemd-basic.la \
492 systemctl_SOURCES = \
506 libsystemd-basic.la \
509 systemd_notify_SOURCES = \
513 systemd_notify_LDADD = \
516 systemd_cgls_SOURCES = \
521 systemd_cgls_CFLAGS = \
524 systemd_cgls_LDADD = \
527 systemadm_SOURCES = \
529 src/systemd-interfaces.vala
535 -Wno-unused-variable \
536 -Wno-unused-function \
538 -Wno-format-nonliteral
540 systemadm_VALAFLAGS = \
550 pam_systemd_la_SOURCES = \
555 pam_systemd_la_CFLAGS = \
559 pam_systemd_la_LDFLAGS = \
564 -export-symbols-regex '^pam_sm_.*'
566 pam_systemd_la_LIBADD = \
567 libsystemd-basic.la \
571 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
572 $(SED) -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
573 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
574 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
575 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
576 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
577 -e 's,@systemunitdir\@,$(systemunitdir),g' \
578 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
579 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
580 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
581 -e 's,@prefix\@,$(prefix),g' \
584 units/%: units/%.in Makefile
587 man/%: man/%.in Makefile
590 %.pc: %.pc.in Makefile
593 M4_PROCESS_SYSTEM = \
594 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
595 $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@
597 M4_PROCESS_SESSION = \
598 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
599 $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@
601 units/%: units/%.m4 Makefile
604 units/session/%: units/%.m4 Makefile
605 $(M4_PROCESS_SESSION)
608 $(nodist_systemunit_DATA) \
609 $(nodist_sessionunit_DATA) \
611 ${XML_IN_FILES:.xml.in=.html} \
612 $(pkgconfigdata_DATA)
616 ${systemadm_SOURCES:.vala=.c}
622 --param funcsynopsis.style "'ansi'"
624 XSLTPROC_PROCESS_MAN = \
625 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
626 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
628 XSLTPROC_PROCESS_MAN_IN = \
629 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
630 $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
633 XSLTPROC_PROCESS_HTML = \
634 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
635 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
637 XSLTPROC_PROCESS_HTML_IN = \
638 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
639 $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
643 $(XSLTPROC_PROCESS_MAN)
645 man/%.1.in: man/%.xml.in
646 $(XSLTPROC_PROCESS_MAN)
649 $(XSLTPROC_PROCESS_MAN)
651 man/%.3.in: man/%.xml.in
652 $(XSLTPROC_PROCESS_MAN)
655 $(XSLTPROC_PROCESS_MAN)
657 man/%.5.in: man/%.xml.in
658 $(XSLTPROC_PROCESS_MAN)
661 $(XSLTPROC_PROCESS_MAN)
663 man/%.7.in: man/%.xml.in
664 $(XSLTPROC_PROCESS_MAN_IN)
667 $(XSLTPROC_PROCESS_MAN)
669 man/%.8.in: man/%.xml.in
670 $(XSLTPROC_PROCESS_MAN_IN)
672 man/%.html: man/%.xml
673 $(XSLTPROC_PROCESS_HTML)
675 man/%.html.in: man/%.xml.in
676 $(XSLTPROC_PROCESS_HTML_IN)
680 ${nodist_man_MANS:=.in} \
681 ${XML_FILES:.xml=.html} \
682 ${XML_IN_FILES:.xml.in=.html.in}
685 org.freedesktop.systemd1.%.xml: systemd
686 $(AM_V_GEN)SYSTEMD_SKIP_API_MOUNTS=1 ./systemd --introspect=${@:.xml=} > $@
689 $(dbusinterface_DATA)
693 $(DESTDIR)$(systemunitdir) \
694 $(DESTDIR)$(sessionunitdir) \
695 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
696 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
697 $(DESTDIR)$(pkgsysconfdir)/system \
698 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
699 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
700 $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
701 $(DESTDIR)$(pkgsysconfdir)/session \
702 $(DESTDIR)$(sysconfdir)/xdg/systemd
703 $(MKDIR_P) -m 0755 $(DESTDIR)/cgroup || \
704 echo "Don't forget to create /cgroup! Couldn't create it for you, continuing anyway."
705 ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
707 $(LN_S) $(pkgsysconfdir)/session session )
708 ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
709 rm -f systemd-initctl.socket systemd-logger.socket && \
710 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
711 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket )
712 ( cd $(DESTDIR)$(sessionunitdir) && \
713 rm -f shutdown.target sockets.target local-fs.target swap.target bluetooth.target printer.target && \
714 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
715 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
716 $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \
717 $(LN_S) $(systemunitdir)/swap.target swap.target && \
718 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
719 $(LN_S) $(systemunitdir)/printer.target printer.target)
720 ( cd $(DESTDIR)$(systemunitdir) && \
721 rm -f runlevel0.target runlevel1.target runlevel6.target && \
722 $(LN_S) poweroff.target runlevel0.target && \
723 $(LN_S) rescue.target runlevel1.target && \
724 $(LN_S) reboot.target runlevel6.target )
725 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
726 rm -f default.target ctrl-alt-del.target kbrequest.target && \
727 $(LN_S) $(systemunitdir)/graphical.target default.target && \
728 $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \
729 $(LN_S) $(systemunitdir)/rescue.target kbrequest.target && \
730 rm -f runlevel2.target runlevel3.target runlevel4.target runlevel5.target && \
731 $(LN_S) $(systemunitdir)/multi-user.target runlevel2.target && \
732 $(LN_S) $(systemunitdir)/multi-user.target runlevel3.target && \
733 $(LN_S) $(systemunitdir)/multi-user.target runlevel4.target && \
734 $(LN_S) $(systemunitdir)/graphical.target runlevel5.target )
735 ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
736 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
737 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
738 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
739 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
740 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
741 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
742 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
743 ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
744 rm -f getty.target remote-fs.target && \
745 $(LN_S) $(systemunitdir)/getty.target getty.target && \
746 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
747 ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
748 rm -f dev-hugepages.automount \
749 dev-mqueue.automount \
750 proc-sys-fs-binfmt_misc.automount \
751 sys-kernel-debug.automount \
752 sys-kernel-security.automount && \
753 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
754 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
755 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
756 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
757 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount )
758 ( cd $(DESTDIR)$(dbussessionservicedir) && \
759 rm -f org.freedesktop.systemd1.service && \
760 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
763 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \
764 $(DESTDIR)$(systemunitdir)/rescue.target.wants
765 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
766 rm -f display-manager.service && \
767 $(LN_S) $(systemunitdir)/prefdm.service display-manager.service )
768 ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
769 rm -f prefdm.service && \
770 $(LN_S) $(systemunitdir)/prefdm.service prefdm.service )
771 ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
772 rm -f rc-local.service && \
773 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
774 ( cd $(DESTDIR)$(systemunitdir)/rescue.target.wants && \
775 rm -f single.service && \
776 $(LN_S) $(systemunitdir)/single.service single.service )
777 ( cd $(DESTDIR)$(systemunitdir) && \
778 rm -f local.service && \
779 $(LN_S) rc-local.service local.service )
780 ( cd $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) && \
781 $(LN_S) halt reboot > /dev/null 2>&1 || true )
784 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
785 rm -f display-manager.service && \
786 $(LN_S) $(systemunitdir)/xdm.service display-manager.service )
787 ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
788 rm -f xdm.service && \
789 $(LN_S) $(systemunitdir)/xdm.service xdm.service )
792 ( cd $(DESTDIR)$(systemunitdir) && \
793 rm -f fsck.target && \
794 $(LN_S) sysinit.target fsck.target )
797 DISTCHECK_CONFIGURE_FLAGS = \
798 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
799 --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
800 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
801 --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
802 --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
803 --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
804 --with-rootdir=$$dc_install_base/$(rootdir)
806 upload: all distcheck
807 cp -v systemd-$(VERSION).tar.bz2 /home/lennart/cvs.fedora/systemd/devel/
808 scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
809 scp man/*.html tango:public/systemd-man/
812 git tag "v$(VERSION)" -m "systemd $(VERSION)"