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 pkgsysconfdir=$(sysconfdir)/systemd
21 dbuspolicydir=$(sysconfdir)/dbus-1/system.d
22 udevrulesdir=/lib/udev/rules.d
24 systemunitdir=$(pkgdatadir)/system
25 sessionunitdir=$(pkgdatadir)/system
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\"
38 # -DSYSTEMD_BINARY_PATH=\"/home/lennart/projects/systemd/systemd\"
39 VALA_CFLAGS=-Wno-unused-variable -Wno-unused-function
52 pkglibexec_PROGRAMS = \
54 systemd-cgroups-agent \
64 org.freedesktop.systemd1.conf
70 units/emergency.service \
71 systemd-initctl.service \
72 units/systemd-initctl.socket \
73 systemd-logger.service \
74 units/systemd-logger.socket
77 org.freedesktop.systemd1.conf \
79 units/emergency.service \
80 units/systemd-initctl.service.in \
81 units/systemd-initctl.socket \
82 units/systemd-logger.service.in \
83 units/systemd-logger.socket \
87 # This is needed because automake is buggy in how it generates the
88 # rules for C programs, but not Vala programs. We therefore can't
89 # list the .h files as dependencies if we want make dist to work.
141 ${COMMON_SOURCES:.c=.h} \
147 linux/auto_dev-ioctl.h \
165 test_engine_SOURCES = \
169 test_engine_CPPFLAGS = $(systemd_CPPFLAGS)
170 test_engine_LDADD = $(systemd_LDADD)
172 test_job_type_SOURCES = \
176 test_job_type_CPPFLAGS = $(systemd_CPPFLAGS)
177 test_job_type_LDADD = $(systemd_LDADD)
184 test_ns_CPPFLAGS = $(systemd_CPPFLAGS)
185 test_ns_LDADD = $(systemd_LDADD)
187 test_loopback_SOURCES = \
192 test_loopback_CPPFLAGS = $(systemd_CPPFLAGS)
193 test_loopback_LDADD = $(systemd_LDADD)
195 systemd_logger_SOURCES = \
199 systemd_initctl_SOURCES = \
203 systemd_initctl_CPPFLAGS = \
207 systemd_initctl_LDADD = \
210 systemd_cgroups_agent_SOURCES = \
214 systemd_cgroups_agent_CPPFLAGS = \
218 systemd_cgroups_agent_LDADD = \
221 VALAFLAGS = -g --save-temps --pkg=dbus-glib-1 --pkg=posix --pkg gtk+-2.0
223 systemctl_SOURCES = \
225 systemd-interfaces.vala
227 systemctl_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(VALA_CFLAGS)
228 systemctl_LDADD = $(DBUSGLIB_LIBS)
230 systemadm_SOURCES = \
232 systemd-interfaces.vala
234 systemadm_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(VALA_CFLAGS)
235 systemadm_LDADD = $(DBUSGLIB_LIBS) $(GTK_LIBS)
237 systemd-initctl.service: units/systemd-initctl.service.in Makefile
238 sed -e 's,@libexecdir\@,$(libexecdir),g' \
239 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
242 systemd-logger.service: units/systemd-logger.service.in Makefile
243 sed -e 's,@libexecdir\@,$(libexecdir),g' \
244 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
248 systemd-interfaces.c \
251 systemd-initctl.service \
252 systemd-logger.service
256 $(DESTDIR)$(pkgsysconfdir)/system \
257 $(DESTDIR)$(pkgsysconfdir)/session \
258 $(DESTDIR)$(sysconfdir)/xdg/systemd \
259 $(DESTDIR)/cgroup/debug
260 rm -f $(DESTDIR)$(sysconfdir)/xdg/systemd/session
261 ln -sf $(DESTDIR)$(pkgsysconfdir)/session $(DESTDIR)$(sysconfdir)/xdg/systemd/session