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 \
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 \
119 units/local-fs.target \
120 units/network.target \
121 units/nss-lookup.target \
122 units/mail-transfer-agent.target \
123 units/poweroff.target \
124 units/reboot.target \
125 units/rescue.target \
126 units/rpcbind.target \
127 units/rtc-set.target \
128 units/shutdown.target \
129 units/umount.target \
130 units/sigpwr.target \
131 units/sockets.target \
134 units/systemd-initctl.socket \
135 units/systemd-logger.socket \
136 units/dev-hugepages.automount \
137 units/dev-hugepages.mount \
138 units/dev-mqueue.automount \
139 units/dev-mqueue.mount \
140 units/proc-sys-fs-binfmt_misc.automount \
141 units/proc-sys-fs-binfmt_misc.mount \
142 units/sys-kernel-debug.automount \
143 units/sys-kernel-debug.mount \
144 units/sys-kernel-security.automount \
145 units/sys-kernel-security.mount \
146 units/var-lock.mount \
149 nodist_systemunit_DATA = \
150 units/sysinit.target \
151 units/getty@.service \
152 units/graphical.target \
153 units/remote-fs.target \
154 units/multi-user.target \
155 units/systemd-initctl.service \
156 units/systemd-logger.service \
159 dist_sessionunit_DATA = \
160 units/session/default.target
162 nodist_sessionunit_DATA = \
163 units/session/remote-fs.target \
164 units/session/exit.service
167 units/sysinit.target.m4 \
168 units/getty@.service.m4 \
169 units/graphical.target.m4 \
170 units/multi-user.target.m4 \
171 units/remote-fs.target.m4 \
172 units/systemd-initctl.service.in \
173 units/systemd-logger.service.in \
174 units/syslog.target.in \
175 units/session/exit.service.in \
179 dist_systemunit_DATA += \
180 units/fedora/halt.service \
181 units/fedora/killall.service \
182 units/fedora/poweroff.service \
183 units/fedora/prefdm.service \
184 units/fedora/rc-local.service \
185 units/fedora/reboot.service \
186 units/fedora/sysinit.service
190 dist_systemunit_DATA += \
191 units/suse/halt.service \
192 units/suse/poweroff.service \
193 units/suse/reboot.service
197 dist_systemunit_DATA += \
198 units/gentoo/halt.service \
199 units/gentoo/killall.service \
200 units/gentoo/poweroff.service \
201 units/gentoo/reboot.service \
202 units/gentoo/xdm.service
206 dist_systemunit_DATA += \
207 units/arch/sysinit.service \
208 units/arch/rc-local.service \
209 units/arch/halt.service \
210 units/arch/poweroff.service \
211 units/arch/reboot.service
221 pkgconfigdata_DATA = \
224 noinst_LTLIBRARIES = \
225 libsystemd-basic.la \
228 libsystemd_basic_la_SOURCES = \
238 libsystemd_core_la_SOURCES = \
243 src/load-fragment.c \
265 src/dbus-automount.c \
267 src/dbus-snapshot.c \
273 src/hostname-setup.c \
274 src/loopback-setup.c \
276 src/modprobe-setup.c \
285 libsystemd_core_la_CFLAGS = \
290 libsystemd_core_la_LIBADD = \
291 libsystemd-basic.la \
297 # This is needed because automake is buggy in how it generates the
298 # rules for C programs, but not Vala programs. We therefore can't
299 # list the .h files as dependencies if we want make dist to work.
302 ${libsystemd_basic_la_SOURCES:.c=.h} \
303 ${libsystemd_core_la_SOURCES:.c=.h} \
309 src/linux/auto_dev-ioctl.h \
321 man/systemd-install.1 \
323 man/systemd-notify.1 \
326 man/sd_listen_fds.3 \
329 man/systemd.service.5 \
330 man/systemd.socket.5 \
331 man/systemd.mount.5 \
332 man/systemd.automount.5 \
334 man/systemd.timer.5 \
336 man/systemd.target.5 \
337 man/systemd.device.5 \
338 man/systemd.snapshot.5 \
353 man/sd_is_socket_unix.3 \
354 man/sd_is_socket_inet.3 \
358 man/reboot.8: man/halt.8
359 man/poweroff.8: man/halt.8
360 man/sd_is_socket.3: man/sd_is_fifo.3
361 man/sd_is_socket_unix.3: man/sd_is_fifo.3
362 man/sd_is_socket_inet.3: man/sd_is_fifo.3
363 man/sd_notifyf.3: man/sd_notify.3
364 man/init.1: man/systemd.1
371 man/systemd.special.7
374 ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
377 ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}}
380 ${XML_FILES:.xml=.html}
382 nodist_noinst_DATA = \
383 ${XML_IN_FILES:.xml.in=.html}
388 ${nodist_man_MANS:=.in} \
389 ${XML_IN_FILES:.xml.in=.html.in}
402 test_engine_SOURCES = \
405 test_engine_CFLAGS = $(systemd_CFLAGS)
406 test_engine_LDADD = $(systemd_LDADD)
408 test_job_type_SOURCES = \
411 test_job_type_CFLAGS = $(systemd_CFLAGS)
412 test_job_type_LDADD = $(systemd_LDADD)
417 test_ns_CFLAGS = $(systemd_CFLAGS)
418 test_ns_LDADD = $(systemd_LDADD)
420 test_loopback_SOURCES = \
421 src/test-loopback.c \
424 test_loopback_LDADD = \
427 test_daemon_SOURCES = \
431 test_daemon_LDADD = \
434 test_cgroup_SOURCES = \
438 test_cgroup_CFLAGS = \
441 test_cgroup_LDADD = \
444 systemd_logger_SOURCES = \
449 systemd_logger_LDADD = \
450 libsystemd-basic.la \
453 systemd_initctl_SOURCES = \
458 systemd_initctl_CFLAGS = \
462 systemd_initctl_LDADD = \
463 libsystemd-basic.la \
466 systemd_cgroups_agent_SOURCES = \
469 systemd_cgroups_agent_CFLAGS = \
473 systemd_cgroups_agent_LDADD = \
474 libsystemd-basic.la \
477 systemctl_SOURCES = \
489 libsystemd-basic.la \
492 systemd_notify_SOURCES = \
496 systemd_notify_LDADD = \
499 systemd_install_SOURCES = \
505 systemd_install_LDADD = \
506 libsystemd-basic.la \
509 systemd_install_CFLAGS = \
513 systemd_cgls_SOURCES = \
518 systemd_cgls_CFLAGS = \
521 systemd_cgls_LDADD = \
524 systemadm_SOURCES = \
526 src/systemd-interfaces.vala
532 -Wno-unused-variable \
533 -Wno-unused-function \
535 -Wno-format-nonliteral
537 systemadm_VALAFLAGS = \
547 pam_systemd_la_SOURCES = \
552 pam_systemd_la_CFLAGS = \
556 pam_systemd_la_LDFLAGS = \
561 -export-symbols-regex '^pam_sm_.*'
563 pam_systemd_la_LIBADD = \
564 libsystemd-basic.la \
568 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
569 $(SED) -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
570 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
571 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
572 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
573 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
574 -e 's,@systemunitdir\@,$(systemunitdir),g' \
575 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
576 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
577 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
578 -e 's,@prefix\@,$(prefix),g' \
581 units/%: units/%.in Makefile
584 man/%: man/%.in Makefile
587 %.pc: %.pc.in Makefile
590 M4_PROCESS_SYSTEM = \
591 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
592 $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@
594 M4_PROCESS_SESSION = \
595 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
596 $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@
598 units/%: units/%.m4 Makefile
601 units/session/%: units/%.m4 Makefile
602 $(M4_PROCESS_SESSION)
605 $(nodist_systemunit_DATA) \
606 $(nodist_sessionunit_DATA) \
608 ${XML_IN_FILES:.xml.in=.html} \
609 $(pkgconfigdata_DATA)
613 ${systemadm_SOURCES:.vala=.c}
619 --param funcsynopsis.style "'ansi'"
621 XSLTPROC_PROCESS_MAN = \
622 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
623 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
625 XSLTPROC_PROCESS_MAN_IN = \
626 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
627 $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
630 XSLTPROC_PROCESS_HTML = \
631 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
632 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
634 XSLTPROC_PROCESS_HTML_IN = \
635 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
636 $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
640 $(XSLTPROC_PROCESS_MAN)
642 man/%.1.in: man/%.xml.in
643 $(XSLTPROC_PROCESS_MAN)
646 $(XSLTPROC_PROCESS_MAN)
648 man/%.3.in: man/%.xml.in
649 $(XSLTPROC_PROCESS_MAN)
652 $(XSLTPROC_PROCESS_MAN)
654 man/%.5.in: man/%.xml.in
655 $(XSLTPROC_PROCESS_MAN)
658 $(XSLTPROC_PROCESS_MAN)
660 man/%.7.in: man/%.xml.in
661 $(XSLTPROC_PROCESS_MAN_IN)
664 $(XSLTPROC_PROCESS_MAN)
666 man/%.8.in: man/%.xml.in
667 $(XSLTPROC_PROCESS_MAN_IN)
669 man/%.html: man/%.xml
670 $(XSLTPROC_PROCESS_HTML)
672 man/%.html.in: man/%.xml.in
673 $(XSLTPROC_PROCESS_HTML_IN)
677 ${nodist_man_MANS:=.in} \
678 ${XML_FILES:.xml=.html} \
679 ${XML_IN_FILES:.xml.in=.html.in}
682 org.freedesktop.systemd1.%.xml: systemd
683 $(AM_V_GEN)SYSTEMD_SKIP_API_MOUNTS=1 ./systemd --introspect=${@:.xml=} > $@
686 $(dbusinterface_DATA)
690 $(DESTDIR)$(systemunitdir) \
691 $(DESTDIR)$(sessionunitdir) \
692 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
693 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
694 $(DESTDIR)$(pkgsysconfdir)/system \
695 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
696 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
697 $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
698 $(DESTDIR)$(pkgsysconfdir)/session \
699 $(DESTDIR)$(sysconfdir)/xdg/systemd
700 $(MKDIR_P) -m 0755 $(DESTDIR)/cgroup || \
701 echo "Don't forget to create /cgroup! Couldn't create it for you, continuing anyway."
702 ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
704 $(LN_S) $(pkgsysconfdir)/session session )
705 ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
706 rm -f systemd-initctl.socket systemd-logger.socket && \
707 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
708 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket )
709 ( cd $(DESTDIR)$(sessionunitdir) && \
710 rm -f shutdown.target sockets.target local-fs.target swap.target && \
711 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
712 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
713 $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \
714 $(LN_S) $(systemunitdir)/swap.target swap.target )
715 ( cd $(DESTDIR)$(systemunitdir) && \
716 rm -f runlevel0.target runlevel1.target runlevel6.target && \
717 $(LN_S) poweroff.target runlevel0.target && \
718 $(LN_S) rescue.target runlevel1.target && \
719 $(LN_S) reboot.target runlevel6.target )
720 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
721 rm -f default.target ctrl-alt-del.target kbrequest.target && \
722 $(LN_S) $(systemunitdir)/graphical.target default.target && \
723 $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \
724 $(LN_S) $(systemunitdir)/rescue.target kbrequest.target && \
725 rm -f runlevel2.target runlevel3.target runlevel4.target runlevel5.target && \
726 $(LN_S) $(systemunitdir)/multi-user.target runlevel2.target && \
727 $(LN_S) $(systemunitdir)/multi-user.target runlevel3.target && \
728 $(LN_S) $(systemunitdir)/multi-user.target runlevel4.target && \
729 $(LN_S) $(systemunitdir)/graphical.target runlevel5.target )
730 ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
731 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
732 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
733 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
734 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
735 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
736 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
737 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
738 ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
739 rm -f getty.target remote-fs.target && \
740 $(LN_S) $(systemunitdir)/getty.target getty.target && \
741 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
742 ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
743 rm -f dev-hugepages.automount \
744 dev-mqueue.automount \
745 proc-sys-fs-binfmt_misc.automount \
746 sys-kernel-debug.automount \
747 sys-kernel-security.automount && \
748 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
749 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
750 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
751 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
752 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount )
753 ( cd $(DESTDIR)$(dbussessionservicedir) && \
754 rm -f org.freedesktop.systemd1.service && \
755 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
758 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH)
759 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
760 rm -f display-manager.service && \
761 $(LN_S) $(systemunitdir)/prefdm.service display-manager.service )
762 ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
763 rm -f prefdm.service && \
764 $(LN_S) $(systemunitdir)/prefdm.service prefdm.service )
765 ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
766 rm -f rc-local.service && \
767 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
768 ( cd $(DESTDIR)$(systemunitdir) && \
769 rm -f local.service && \
770 $(LN_S) rc-local.service local.service )
771 ( cd $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) && \
772 $(LN_S) halt reboot > /dev/null 2>&1 || true )
775 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
776 rm -f display-manager.service && \
777 $(LN_S) $(systemunitdir)/xdm.service display-manager.service )
778 ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
779 rm -f xdm.service && \
780 $(LN_S) $(systemunitdir)/xdm.service xdm.service )
783 DISTCHECK_CONFIGURE_FLAGS = \
784 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
785 --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
786 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
787 --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
788 --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
789 --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
790 --with-rootdir=$$dc_install_base/$(rootdir)
792 upload: all distcheck
793 cp -v systemd-$(VERSION).tar.bz2 /home/lennart/cvs.fedora/systemd/devel/
794 scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
795 scp man/*.html tango:public/systemd-man/
798 git tag "v$(VERSION)" -m "systemd $(VERSION)"