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 \
106 units/session/remote-fs.target
109 units/basic.target.m4 \
110 units/getty@.service.m4 \
111 units/graphical.target.m4 \
112 units/multi-user.target.m4 \
113 units/remote-fs.target.m4 \
114 units/systemd-initctl.service.in \
115 units/systemd-logger.service.in \
116 units/syslog.target.in \
122 dist_systemunit_DATA += \
123 units/fedora/halt.service \
124 units/fedora/killall.service \
125 units/fedora/poweroff.service \
126 units/fedora/prefdm.service \
127 units/fedora/rc-local.service \
128 units/fedora/reboot.service \
129 units/fedora/sysinit.service
132 # This is needed because automake is buggy in how it generates the
133 # rules for C programs, but not Vala programs. We therefore can't
134 # list the .h files as dependencies if we want make dist to work.
150 src/load-fragment.c \
170 src/dbus-automount.c \
172 src/dbus-snapshot.c \
177 src/hostname-setup.c \
178 src/loopback-setup.c \
186 ${COMMON_SOURCES:.c=.h} \
192 src/linux/auto_dev-ioctl.h \
198 man/systemd.service.5
201 man/systemd.special.7
204 man/systemd.unit.html \
205 man/systemd.service.html
207 nodist_noinst_DATA = \
208 man/systemd.special.html
211 man/systemd.unit.xml \
212 man/systemd.service.xml \
213 man/systemd.special.xml.in \
214 man/systemd.special.7.in \
215 man/systemd.special.html.in
232 test_engine_SOURCES = \
236 test_engine_CPPFLAGS = $(systemd_CPPFLAGS)
237 test_engine_LDADD = $(systemd_LDADD)
239 test_job_type_SOURCES = \
243 test_job_type_CPPFLAGS = $(systemd_CPPFLAGS)
244 test_job_type_LDADD = $(systemd_LDADD)
251 test_ns_CPPFLAGS = $(systemd_CPPFLAGS)
252 test_ns_LDADD = $(systemd_LDADD)
254 test_loopback_SOURCES = \
256 src/test-loopback.c \
259 test_loopback_CPPFLAGS = $(systemd_CPPFLAGS)
260 test_loopback_LDADD = $(systemd_LDADD)
262 systemd_logger_SOURCES = \
267 systemd_initctl_SOURCES = \
272 systemd_initctl_CPPFLAGS = \
276 systemd_initctl_LDADD = \
279 systemd_cgroups_agent_SOURCES = \
283 systemd_cgroups_agent_CPPFLAGS = \
287 systemd_cgroups_agent_LDADD = \
302 -Wno-unused-variable \
305 systemctl_SOURCES = \
307 src/systemd-interfaces.vala
309 systemctl_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(VALA_CFLAGS)
310 systemctl_LDADD = $(DBUSGLIB_LIBS)
312 systemadm_SOURCES = \
314 src/systemd-interfaces.vala
316 systemadm_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(VALA_CFLAGS)
317 systemadm_LDADD = $(DBUSGLIB_LIBS) $(GTK_LIBS)
320 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
321 $(SED) -e 's,@libexecdir\@,$(libexecdir),g' \
322 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
323 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
326 units/%: units/%.in Makefile
329 man/%: man/%.in Makefile
332 M4_PROCESS_SYSTEM = \
333 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
334 $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@
336 M4_PROCESS_SESSION = \
337 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
338 $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@
340 units/%: units/%.m4 Makefile
343 units/session/%: units/%.m4 Makefile
344 $(M4_PROCESS_SESSION)
347 units/systemd-initctl.service \
348 units/systemd-logger.service \
349 units/syslog.target \
351 units/getty@.service \
352 units/graphical.target \
353 units/multi-user.target \
354 units/remote-fs.target \
355 units/session/remote-fs.target \
356 man/systemd.special.7 \
357 man/systemd.special.html
361 src/systemd-interfaces.c \
367 XSLTPROC_PROCESS_MAN = \
368 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
369 $(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
371 XSLTPROC_PROCESS_MAN_IN = \
372 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
373 $(XSLTPROC) -o ${@:.in=} -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
376 XSLTPROC_PROCESS_HTML = \
377 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
378 $(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
380 XSLTPROC_PROCESS_HTML_IN = \
381 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
382 $(XSLTPROC) -o ${@:.in=} -nonet http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
386 $(XSLTPROC_PROCESS_MAN)
388 man/%.5.in: man/%.xml.in
389 $(XSLTPROC_PROCESS_MAN)
392 $(XSLTPROC_PROCESS_MAN)
394 man/%.7.in: man/%.xml.in
395 $(XSLTPROC_PROCESS_MAN_IN)
397 man/%.html: man/%.xml
398 $(XSLTPROC_PROCESS_HTML)
400 man/%.html.in: man/%.xml.in
401 $(XSLTPROC_PROCESS_HTML_IN)
405 man/systemd.special.7.in \
406 man/systemd.unit.html \
407 man/systemd.service.html \
408 man/systemd.special.html.in
413 $(DESTDIR)$(systemunitdir) \
414 $(DESTDIR)$(sessionunitdir) \
415 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
416 $(DESTDIR)$(systemunitdir)/basic.target.wants \
417 $(DESTDIR)$(pkgsysconfdir)/system \
418 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
419 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
420 $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
421 $(DESTDIR)$(pkgsysconfdir)/session \
422 $(DESTDIR)$(sysconfdir)/xdg/systemd
423 $(MKDIR_P) -m 0755 $(DESTDIR)/cgroup/systemd || \
424 echo "Don't forget to create /cgroup/systemd! Couldn't create it for you, continuing anyway."
425 ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
427 $(LN_S) $(pkgsysconfdir)/session session )
428 ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
429 rm -f systemd-initctl.socket systemd-logger.socket && \
430 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
431 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket )
432 ( cd $(DESTDIR)$(sessionunitdir) && \
433 rm -f shutdown.target sockets.target local-fs.target swap.target && \
434 $(LN_S) ../system/shutdown.target shutdown.target && \
435 $(LN_S) ../system/sockets.target sockets.target && \
436 $(LN_S) ../system/local-fs.target local-fs.target && \
437 $(LN_S) ../system/swap.target swap.target )
438 ( cd $(DESTDIR)$(systemunitdir) && \
439 rm -f runlevel0.target runlevel1.target runlevel6.target && \
440 $(LN_S) poweroff.target runlevel0.target && \
441 $(LN_S) rescue.target runlevel1.target && \
442 $(LN_S) reboot.target runlevel6.target )
443 ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
444 rm -f default.target ctrl-alt-del.target kbrequest.target && \
445 $(LN_S) $(systemunitdir)/graphical.target default.target && \
446 $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \
447 $(LN_S) $(systemunitdir)/rescue.target kbrequest.target && \
448 rm -f runlevel2.target runlevel3.target runlevel4.target runlevel5.target && \
449 $(LN_S) $(systemunitdir)/multi-user.target runlevel2.target && \
450 $(LN_S) $(systemunitdir)/multi-user.target runlevel3.target && \
451 $(LN_S) $(systemunitdir)/multi-user.target runlevel4.target && \
452 $(LN_S) $(systemunitdir)/graphical.target runlevel5.target )
453 ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
454 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
455 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
456 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
457 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
458 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
459 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
460 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
461 ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
462 rm -f getty.target && \
463 $(LN_S) $(systemunitdir)/getty.target getty.target )
464 ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
465 rm -f dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount && \
466 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
467 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
468 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
469 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount )
471 ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
472 rm -f prefdm.service && \
473 $(LN_S) $(systemunitdir)/prefdm.service prefdm.service )
474 ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
475 rm -f rc-local.service && \
476 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
477 ( cd $(DESTDIR)$(systemunitdir) && \
478 rm -f local.service && \
479 $(LN_S) rc-local.service local.service )
482 DISTCHECK_CONFIGURE_FLAGS = \
483 --with-udevrulesdir=$$dc_install_base/$(udevrulesdir)