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 dbuspolicydir=$(sysconfdir)/dbus-1/system.d
21 udevrulesdir=@udevrulesdir@
23 pkgsysconfdir=$(sysconfdir)/systemd
24 systemunitdir=$(pkgdatadir)/system
25 sessionunitdir=$(pkgdatadir)/session
28 -include $(top_builddir)/config.h \
29 -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
30 -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
31 -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
32 -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
33 -DSESSION_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/session\" \
34 -DSESSION_DATA_UNIT_PATH=\"$(sessionunitdir)\" \
35 -DCGROUP_AGENT_PATH=\"$(pkglibexecdir)/systemd-cgroups-agent\" \
36 -DSYSTEMD_BINARY_PATH=\"$(sbindir)/systemd\" \
50 pkglibexec_PROGRAMS = \
52 systemd-cgroups-agent \
61 dist_dbuspolicy_DATA = \
62 src/org.freedesktop.systemd1.conf
64 dist_udevrules_DATA = \
67 dist_systemunit_DATA = \
68 units/emergency.service \
71 units/local-fs.target \
72 units/network.target \
73 units/nss-lookup.target \
74 units/poweroff.target \
76 units/remote-fs.target \
78 units/rpcbind.target \
79 units/rtc-set.target \
80 units/shutdown.target \
82 units/sockets.target \
84 units/systemd-initctl.socket \
85 units/systemd-logger.socket \
86 units/dev-hugepages.automount \
87 units/dev-hugepages.mount \
88 units/dev-mqueue.automount \
89 units/dev-mqueue.mount \
90 units/proc-sys-fs-binfmt_misc.automount \
91 units/proc-sys-fs-binfmt_misc.mount \
92 units/sys-kernel-debug.automount \
93 units/sys-kernel-debug.mount \
98 units/getty@.service \
99 units/graphical.target \
100 units/multi-user.target \
101 units/systemd-initctl.service \
102 units/systemd-logger.service \
105 dist_sessionunit_DATA = \
106 units/session/default.target
109 units/session/remote-fs.target
112 units/basic.target.m4 \
113 units/getty@.service.m4 \
114 units/graphical.target.m4 \
115 units/multi-user.target.m4 \
116 units/remote-fs.target.m4 \
117 units/systemd-initctl.service.in \
118 units/systemd-logger.service.in \
119 units/syslog.target.in \
125 dist_systemunit_DATA += \
126 units/fedora/halt.service \
127 units/fedora/killall.service \
128 units/fedora/poweroff.service \
129 units/fedora/prefdm.service \
130 units/fedora/rc-local.service \
131 units/fedora/reboot.service \
132 units/fedora/sysinit.service
135 # This is needed because automake is buggy in how it generates the
136 # rules for C programs, but not Vala programs. We therefore can't
137 # list the .h files as dependencies if we want make dist to work.
153 src/load-fragment.c \
173 src/dbus-automount.c \
175 src/dbus-snapshot.c \
180 src/hostname-setup.c \
181 src/loopback-setup.c \
189 ${COMMON_SOURCES:.c=.h} \
195 src/linux/auto_dev-ioctl.h \
201 man/systemd.service.5
204 man/systemd.special.7
207 man/systemd.unit.html \
208 man/systemd.service.html
210 nodist_noinst_DATA = \
211 man/systemd.special.html
214 man/systemd.unit.xml \
215 man/systemd.service.xml \
216 man/systemd.special.xml.in \
217 man/systemd.special.7.in \
218 man/systemd.special.html.in
235 test_engine_SOURCES = \
239 test_engine_CPPFLAGS = $(systemd_CPPFLAGS)
240 test_engine_LDADD = $(systemd_LDADD)
242 test_job_type_SOURCES = \
246 test_job_type_CPPFLAGS = $(systemd_CPPFLAGS)
247 test_job_type_LDADD = $(systemd_LDADD)
254 test_ns_CPPFLAGS = $(systemd_CPPFLAGS)
255 test_ns_LDADD = $(systemd_LDADD)
257 test_loopback_SOURCES = \
259 src/test-loopback.c \
262 test_loopback_CPPFLAGS = $(systemd_CPPFLAGS)
263 test_loopback_LDADD = $(systemd_LDADD)
265 systemd_logger_SOURCES = \
270 systemd_initctl_SOURCES = \
275 systemd_initctl_CPPFLAGS = \
279 systemd_initctl_LDADD = \
282 systemd_cgroups_agent_SOURCES = \
286 systemd_cgroups_agent_CPPFLAGS = \
290 systemd_cgroups_agent_LDADD = \
305 -Wno-unused-variable \
308 systemctl_SOURCES = \
310 src/systemd-interfaces.vala
312 systemctl_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(VALA_CFLAGS)
313 systemctl_LDADD = $(DBUSGLIB_LIBS)
315 systemadm_SOURCES = \
317 src/systemd-interfaces.vala
319 systemadm_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(VALA_CFLAGS)
320 systemadm_LDADD = $(DBUSGLIB_LIBS) $(GTK_LIBS)
323 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
324 $(SED) -e 's,@libexecdir\@,$(libexecdir),g' \
325 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
326 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
329 units/%: units/%.in Makefile
332 man/%: man/%.in Makefile
335 M4_PROCESS_SYSTEM = \
336 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
337 $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@
339 M4_PROCESS_SESSION = \
340 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
341 $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@
343 units/%: units/%.m4 Makefile
346 units/session/%: units/%.m4 Makefile
347 $(M4_PROCESS_SESSION)
350 units/systemd-initctl.service \
351 units/systemd-logger.service \
352 units/syslog.target \
354 units/getty@.service \
355 units/graphical.target \
356 units/multi-user.target \
357 units/remote-fs.target \
358 units/session/remote-fs.target \
359 man/systemd.special.7 \
360 man/systemd.special.html
364 src/systemd-interfaces.c \
370 XSLTPROC_PROCESS_MAN = \
371 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
372 $(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
374 XSLTPROC_PROCESS_MAN_IN = \
375 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
376 $(XSLTPROC) -o ${@:.in=} -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
379 XSLTPROC_PROCESS_HTML = \
380 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
381 $(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
383 XSLTPROC_PROCESS_HTML_IN = \
384 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
385 $(XSLTPROC) -o ${@:.in=} -nonet http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
389 $(XSLTPROC_PROCESS_MAN)
391 man/%.5.in: man/%.xml.in
392 $(XSLTPROC_PROCESS_MAN)
395 $(XSLTPROC_PROCESS_MAN)
397 man/%.7.in: man/%.xml.in
398 $(XSLTPROC_PROCESS_MAN_IN)
400 man/%.html: man/%.xml
401 $(XSLTPROC_PROCESS_HTML)
403 man/%.html.in: man/%.xml.in
404 $(XSLTPROC_PROCESS_HTML_IN)
408 man/systemd.special.7.in \
409 man/systemd.unit.html \
410 man/systemd.service.html \
411 man/systemd.special.html.in
416 $(DESTDIR)$(systemunitdir) \
417 $(DESTDIR)$(sessionunitdir) \
418 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
419 $(DESTDIR)$(systemunitdir)/basic.target.wants \
420 $(DESTDIR)$(pkgsysconfdir)/system \
421 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
422 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
423 $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
424 $(DESTDIR)$(pkgsysconfdir)/session \
425 $(DESTDIR)$(sysconfdir)/xdg/systemd
426 $(MKDIR_P) -m 0755 $(DESTDIR)/cgroup/systemd || \
427 echo "Don't forget to create /cgroup/systemd! Couldn't create it for you, continuing anyway."
428 ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
430 $(LN_S) $(pkgsysconfdir)/session session )
431 ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
432 rm -f systemd-initctl.socket systemd-logger.socket && \
433 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
434 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket )
435 ( cd $(DESTDIR)$(sessionunitdir) && \
436 rm -f shutdown.target sockets.target local-fs.target swap.target && \
437 $(LN_S) ../system/shutdown.target shutdown.target && \
438 $(LN_S) ../system/sockets.target sockets.target && \
439 $(LN_S) ../system/local-fs.target local-fs.target && \
440 $(LN_S) ../system/swap.target swap.target )
441 ( cd $(DESTDIR)$(systemunitdir) && \
442 rm -f runlevel0.target runlevel1.target runlevel6.target && \
443 $(LN_S) poweroff.target runlevel0.target && \
444 $(LN_S) rescue.target runlevel1.target && \
445 $(LN_S) reboot.target runlevel6.target )
446 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
447 rm -f default.target ctrl-alt-del.target kbrequest.target && \
448 $(LN_S) $(systemunitdir)/graphical.target default.target && \
449 $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \
450 $(LN_S) $(systemunitdir)/rescue.target kbrequest.target && \
451 rm -f runlevel2.target runlevel3.target runlevel4.target runlevel5.target && \
452 $(LN_S) $(systemunitdir)/multi-user.target runlevel2.target && \
453 $(LN_S) $(systemunitdir)/multi-user.target runlevel3.target && \
454 $(LN_S) $(systemunitdir)/multi-user.target runlevel4.target && \
455 $(LN_S) $(systemunitdir)/graphical.target runlevel5.target )
456 ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
457 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
458 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
459 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
460 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
461 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
462 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
463 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
464 ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
465 rm -f getty.target && \
466 $(LN_S) $(systemunitdir)/getty.target getty.target )
467 ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
468 rm -f dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount && \
469 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
470 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
471 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
472 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount )
474 ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
475 rm -f prefdm.service && \
476 $(LN_S) $(systemunitdir)/prefdm.service prefdm.service )
477 ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
478 rm -f rc-local.service && \
479 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
480 ( cd $(DESTDIR)$(systemunitdir) && \
481 rm -f local.service && \
482 $(LN_S) rc-local.service local.service )
483 ( cd $(DESTDIR)/etc/init.d && \
484 $(LN_S) halt reboot > /dev/null 2>&1 || true )
487 DISTCHECK_CONFIGURE_FLAGS = \
488 --with-udevrulesdir=$$dc_install_base/$(udevrulesdir)