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\" \
69 rootlibexec_PROGRAMS = \
71 systemd-cgroups-agent \
84 pamlib_LTLIBRARIES = \
88 dist_pkgsysconf_DATA = \
91 dist_dbuspolicy_DATA = \
92 src/org.freedesktop.systemd1.conf
94 dist_dbussystemservice_DATA = \
95 src/org.freedesktop.systemd1.service
97 dist_udevrules_DATA = \
100 dbusinterface_DATA = \
101 org.freedesktop.systemd1.Manager.xml \
102 org.freedesktop.systemd1.Job.xml \
103 org.freedesktop.systemd1.Unit.xml \
104 org.freedesktop.systemd1.Service.xml \
105 org.freedesktop.systemd1.Socket.xml \
106 org.freedesktop.systemd1.Timer.xml \
107 org.freedesktop.systemd1.Target.xml \
108 org.freedesktop.systemd1.Device.xml \
109 org.freedesktop.systemd1.Mount.xml \
110 org.freedesktop.systemd1.Automount.xml \
111 org.freedesktop.systemd1.Snapshot.xml \
112 org.freedesktop.systemd1.Swap.xml \
113 org.freedesktop.systemd1.Path.xml
115 dist_systemunit_DATA = \
116 units/emergency.service \
117 units/emergency.target \
121 units/local-fs.target \
122 units/network.target \
123 units/nss-lookup.target \
124 units/mail-transfer-agent.target \
125 units/poweroff.target \
126 units/reboot.target \
127 units/rescue.target \
128 units/rpcbind.target \
129 units/rtc-set.target \
130 units/shutdown.target \
131 units/umount.target \
132 units/sigpwr.target \
133 units/sockets.target \
136 units/systemd-initctl.socket \
137 units/systemd-logger.socket \
138 units/dev-hugepages.automount \
139 units/dev-hugepages.mount \
140 units/dev-mqueue.automount \
141 units/dev-mqueue.mount \
142 units/proc-sys-fs-binfmt_misc.automount \
143 units/proc-sys-fs-binfmt_misc.mount \
144 units/sys-kernel-debug.automount \
145 units/sys-kernel-debug.mount \
146 units/sys-kernel-security.automount \
147 units/sys-kernel-security.mount \
148 units/var-lock.mount \
149 units/var-run.mount \
150 units/printer.target \
151 units/bluetooth.target \
152 units/smartcard.target
154 nodist_systemunit_DATA = \
155 units/sysinit.target \
156 units/getty@.service \
157 units/graphical.target \
158 units/remote-fs.target \
159 units/multi-user.target \
160 units/systemd-initctl.service \
161 units/systemd-logger.service \
164 dist_sessionunit_DATA = \
165 units/session/default.target
167 nodist_sessionunit_DATA = \
168 units/session/remote-fs.target \
169 units/session/exit.service
172 units/sysinit.target.m4 \
173 units/getty@.service.m4 \
174 units/graphical.target.m4 \
175 units/multi-user.target.m4 \
176 units/remote-fs.target.m4 \
177 units/systemd-initctl.service.in \
178 units/systemd-logger.service.in \
179 units/syslog.target.in \
180 units/session/exit.service.in \
184 dist_systemunit_DATA += \
185 units/fedora/halt.service \
186 units/fedora/killall.service \
187 units/fedora/poweroff.service \
188 units/fedora/prefdm.service \
189 units/fedora/rc-local.service \
190 units/fedora/reboot.service \
191 units/fedora/sysinit.service \
192 units/fedora/single.service
196 dist_systemunit_DATA += \
197 units/suse/halt.service \
198 units/suse/poweroff.service \
199 units/suse/reboot.service
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 \
303 # This is needed because automake is buggy in how it generates the
304 # rules for C programs, but not Vala programs. We therefore can't
305 # list the .h files as dependencies if we want make dist to work.
308 ${libsystemd_basic_la_SOURCES:.c=.h} \
309 ${libsystemd_core_la_SOURCES:.c=.h} \
315 src/linux/auto_dev-ioctl.h \
327 man/systemd-install.1 \
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 = \
504 libsystemd-basic.la \
507 systemd_notify_SOURCES = \
511 systemd_notify_LDADD = \
514 systemd_install_SOURCES = \
520 systemd_install_LDADD = \
521 libsystemd-basic.la \
524 systemd_install_CFLAGS = \
528 systemd_cgls_SOURCES = \
533 systemd_cgls_CFLAGS = \
536 systemd_cgls_LDADD = \
539 systemadm_SOURCES = \
541 src/systemd-interfaces.vala
547 -Wno-unused-variable \
548 -Wno-unused-function \
550 -Wno-format-nonliteral
552 systemadm_VALAFLAGS = \
562 pam_systemd_la_SOURCES = \
567 pam_systemd_la_CFLAGS = \
571 pam_systemd_la_LDFLAGS = \
576 -export-symbols-regex '^pam_sm_.*'
578 pam_systemd_la_LIBADD = \
579 libsystemd-basic.la \
583 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
584 $(SED) -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
585 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
586 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
587 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
588 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
589 -e 's,@systemunitdir\@,$(systemunitdir),g' \
590 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
591 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
592 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
593 -e 's,@prefix\@,$(prefix),g' \
596 units/%: units/%.in Makefile
599 man/%: man/%.in Makefile
602 %.pc: %.pc.in Makefile
605 M4_PROCESS_SYSTEM = \
606 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
607 $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@
609 M4_PROCESS_SESSION = \
610 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
611 $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@
613 units/%: units/%.m4 Makefile
616 units/session/%: units/%.m4 Makefile
617 $(M4_PROCESS_SESSION)
620 $(nodist_systemunit_DATA) \
621 $(nodist_sessionunit_DATA) \
623 ${XML_IN_FILES:.xml.in=.html} \
624 $(pkgconfigdata_DATA)
628 ${systemadm_SOURCES:.vala=.c}
634 --param funcsynopsis.style "'ansi'"
636 XSLTPROC_PROCESS_MAN = \
637 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
638 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
640 XSLTPROC_PROCESS_MAN_IN = \
641 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
642 $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
645 XSLTPROC_PROCESS_HTML = \
646 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
647 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
649 XSLTPROC_PROCESS_HTML_IN = \
650 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
651 $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
655 $(XSLTPROC_PROCESS_MAN)
657 man/%.1.in: man/%.xml.in
658 $(XSLTPROC_PROCESS_MAN)
661 $(XSLTPROC_PROCESS_MAN)
663 man/%.3.in: man/%.xml.in
664 $(XSLTPROC_PROCESS_MAN)
667 $(XSLTPROC_PROCESS_MAN)
669 man/%.5.in: man/%.xml.in
670 $(XSLTPROC_PROCESS_MAN)
673 $(XSLTPROC_PROCESS_MAN)
675 man/%.7.in: man/%.xml.in
676 $(XSLTPROC_PROCESS_MAN_IN)
679 $(XSLTPROC_PROCESS_MAN)
681 man/%.8.in: man/%.xml.in
682 $(XSLTPROC_PROCESS_MAN_IN)
684 man/%.html: man/%.xml
685 $(XSLTPROC_PROCESS_HTML)
687 man/%.html.in: man/%.xml.in
688 $(XSLTPROC_PROCESS_HTML_IN)
692 ${nodist_man_MANS:=.in} \
693 ${XML_FILES:.xml=.html} \
694 ${XML_IN_FILES:.xml.in=.html.in}
697 org.freedesktop.systemd1.%.xml: systemd
698 $(AM_V_GEN)SYSTEMD_SKIP_API_MOUNTS=1 ./systemd --introspect=${@:.xml=} > $@
701 $(dbusinterface_DATA)
705 $(DESTDIR)$(systemunitdir) \
706 $(DESTDIR)$(sessionunitdir) \
707 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
708 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
709 $(DESTDIR)$(pkgsysconfdir)/system \
710 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
711 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
712 $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
713 $(DESTDIR)$(pkgsysconfdir)/session \
714 $(DESTDIR)$(sysconfdir)/xdg/systemd
715 $(MKDIR_P) -m 0755 $(DESTDIR)/cgroup || \
716 echo "Don't forget to create /cgroup! Couldn't create it for you, continuing anyway."
717 ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
719 $(LN_S) $(pkgsysconfdir)/session session )
720 ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
721 rm -f systemd-initctl.socket systemd-logger.socket && \
722 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
723 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket )
724 ( cd $(DESTDIR)$(sessionunitdir) && \
725 rm -f shutdown.target sockets.target local-fs.target swap.target bluetooth.target printer.target && \
726 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
727 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
728 $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \
729 $(LN_S) $(systemunitdir)/swap.target swap.target && \
730 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
731 $(LN_S) $(systemunitdir)/printer.target printer.target)
732 ( cd $(DESTDIR)$(systemunitdir) && \
733 rm -f runlevel0.target runlevel1.target runlevel6.target && \
734 $(LN_S) poweroff.target runlevel0.target && \
735 $(LN_S) rescue.target runlevel1.target && \
736 $(LN_S) reboot.target runlevel6.target )
737 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
738 rm -f default.target ctrl-alt-del.target kbrequest.target && \
739 $(LN_S) $(systemunitdir)/graphical.target default.target && \
740 $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \
741 $(LN_S) $(systemunitdir)/rescue.target kbrequest.target && \
742 rm -f runlevel2.target runlevel3.target runlevel4.target runlevel5.target && \
743 $(LN_S) $(systemunitdir)/multi-user.target runlevel2.target && \
744 $(LN_S) $(systemunitdir)/multi-user.target runlevel3.target && \
745 $(LN_S) $(systemunitdir)/multi-user.target runlevel4.target && \
746 $(LN_S) $(systemunitdir)/graphical.target runlevel5.target )
747 ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
748 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
749 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
750 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
751 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
752 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
753 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
754 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
755 ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
756 rm -f getty.target remote-fs.target && \
757 $(LN_S) $(systemunitdir)/getty.target getty.target && \
758 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
759 ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
760 rm -f dev-hugepages.automount \
761 dev-mqueue.automount \
762 proc-sys-fs-binfmt_misc.automount \
763 sys-kernel-debug.automount \
764 sys-kernel-security.automount && \
765 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
766 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
767 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
768 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
769 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount )
770 ( cd $(DESTDIR)$(dbussessionservicedir) && \
771 rm -f org.freedesktop.systemd1.service && \
772 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
775 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \
776 $(DESTDIR)$(systemunitdir)/rescue.target.wants
777 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
778 rm -f display-manager.service && \
779 $(LN_S) $(systemunitdir)/prefdm.service display-manager.service )
780 ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
781 rm -f prefdm.service && \
782 $(LN_S) $(systemunitdir)/prefdm.service prefdm.service )
783 ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
784 rm -f rc-local.service && \
785 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
786 ( cd $(DESTDIR)$(systemunitdir)/rescue.target.wants && \
787 rm -f single.service && \
788 $(LN_S) $(systemunitdir)/single.service single.service )
789 ( cd $(DESTDIR)$(systemunitdir) && \
790 rm -f local.service && \
791 $(LN_S) rc-local.service local.service )
792 ( cd $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) && \
793 $(LN_S) halt reboot > /dev/null 2>&1 || true )
796 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
797 rm -f display-manager.service && \
798 $(LN_S) $(systemunitdir)/xdm.service display-manager.service )
799 ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
800 rm -f xdm.service && \
801 $(LN_S) $(systemunitdir)/xdm.service xdm.service )
804 DISTCHECK_CONFIGURE_FLAGS = \
805 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
806 --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
807 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
808 --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
809 --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
810 --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
811 --with-rootdir=$$dc_install_base/$(rootdir)
813 upload: all distcheck
814 cp -v systemd-$(VERSION).tar.bz2 /home/lennart/cvs.fedora/systemd/devel/
815 scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
816 scp man/*.html tango:public/systemd-man/
819 git tag "v$(VERSION)" -m "systemd $(VERSION)"