]> git.ipfire.org Git - thirdparty/systemd.git/blame - Makefile.am
build-sys: use autoconf'igured mkdir/ln/sed programs
[thirdparty/systemd.git] / Makefile.am
CommitLineData
47be870b
LP
1# This file is part of systemd.
2#
3# Copyright 2010 Lennart Poettering
4#
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.
9#
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.
14#
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/>.
17
18ACLOCAL_AMFLAGS = -I m4
19
e24067c3 20dbuspolicydir=$(sysconfdir)/dbus-1/system.d
d1ab0ca0 21udevrulesdir=@udevrulesdir@
036643a2 22
d1ab0ca0 23pkgsysconfdir=$(sysconfdir)/systemd
70fcff31 24systemunitdir=$(pkgdatadir)/system
d1ab0ca0 25sessionunitdir=$(pkgdatadir)/session
70fcff31 26
47be870b
LP
27AM_CPPFLAGS = \
28 -include $(top_builddir)/config.h \
036643a2 29 -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
70fcff31 30 -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
0571e011 31 -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
061978fa 32 -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
036643a2 33 -DSESSION_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/session\" \
70fcff31 34 -DSESSION_DATA_UNIT_PATH=\"$(sessionunitdir)\" \
a16e1123
LP
35 -DCGROUP_AGENT_PATH=\"$(pkglibexecdir)/systemd-cgroups-agent\" \
36 -DSYSTEMD_BINARY_PATH=\"$(sbindir)/systemd\"
37
d1ab0ca0
LP
38VALA_CFLAGS = \
39 -Wno-unused-variable \
40 -Wno-unused-function
47be870b
LP
41
42sbin_PROGRAMS = \
43 systemd
44
45bin_PROGRAMS = \
a9b5b032
MT
46 systemctl
47
48if HAVE_GTK
49bin_PROGRAMS += \
8e274523 50 systemadm
a9b5b032 51endif
8e274523
LP
52
53pkglibexec_PROGRAMS = \
54 systemd-logger \
0b7964b8
LP
55 systemd-cgroups-agent \
56 systemd-initctl
47be870b
LP
57
58noinst_PROGRAMS = \
59 test-engine \
15ae422b 60 test-job-type \
af5bc85d
LP
61 test-ns \
62 test-loopback
47be870b 63
d1ab0ca0 64dist_dbuspolicy_DATA = \
e24067c3
LP
65 org.freedesktop.systemd1.conf
66
d1ab0ca0 67dist_udevrules_DATA = \
5cc5d790
LP
68 99-systemd.rules
69
d1ab0ca0 70dist_systemunit_DATA = \
70fcff31 71 units/emergency.service \
70fcff31 72 units/systemd-initctl.socket \
70fcff31
LP
73 units/systemd-logger.socket
74
d1ab0ca0
LP
75systemunit_DATA = \
76 systemd-initctl.service \
77 systemd-logger.service
78
e24067c3 79EXTRA_DIST = \
70fcff31 80 units/systemd-initctl.service.in \
70fcff31 81 units/systemd-logger.service.in \
31cee6f6
LP
82 LICENSE \
83 README
e24067c3 84
75db651a
TFH
85# This is needed because automake is buggy in how it generates the
86# rules for C programs, but not Vala programs. We therefore can't
87# list the .h files as dependencies if we want make dist to work.
ea6145da 88BASIC_SOURCES = \
47be870b
LP
89 util.c \
90 hashmap.c \
91 set.c \
92 strv.c \
93 conf-parser.c \
94 socket-util.c \
95 log.c \
75db651a 96 ratelimit.c
47be870b 97
ea6145da 98COMMON_SOURCES = \
47be870b
LP
99 $(BASIC_SOURCES) \
100 unit.c \
101 job.c \
102 manager.c \
103 load-fragment.c \
104 service.c \
105 automount.c \
106 mount.c \
07b0b134 107 swap.c \
47be870b
LP
108 device.c \
109 target.c \
110 snapshot.c \
111 socket.c \
112 timer.c \
113 load-dropin.c \
114 execute.c \
115 dbus.c \
116 dbus-manager.c \
117 dbus-unit.c \
8e274523 118 dbus-job.c \
4139c1b2 119 dbus-service.c \
4139c1b2 120 dbus-socket.c \
4139c1b2 121 dbus-target.c \
4139c1b2 122 dbus-mount.c \
4139c1b2 123 dbus-automount.c \
07b0b134 124 dbus-swap.c \
4139c1b2 125 dbus-snapshot.c \
4139c1b2 126 dbus-device.c \
4139c1b2 127 dbus-execute.c \
8e274523 128 cgroup.c \
8e274523 129 mount-setup.c \
302e8c4c 130 hostname-setup.c \
af5bc85d 131 loopback-setup.c \
e537352b 132 utmp-wtmp.c \
9e2f7c11 133 specifier.c \
9e2f7c11 134 unit-name.c \
a16e1123 135 fdset.c \
15ae422b 136 namespace.c
47be870b 137
462b33e9
TFH
138EXTRA_DIST += \
139 ${COMMON_SOURCES:.c=.h} \
140 macro.h \
141 ioprio.h \
142 missing.h \
143 list.h \
144 securebits.h \
145 linux/auto_dev-ioctl.h \
05a602f4
LP
146 initreq.h \
147 sd-daemon.h
462b33e9 148
d1ab0ca0
LP
149dist_man_MANS = \
150 systemd.unit.5 \
151 systemd.service.5
152
153HTMLMANS = \
154 systemd.unit.html \
155 systemd.service.html
156
157dist_noinst_DATA = \
158 $(HTMLMANS)
159
160EXTRA_DIST += \
161 man/systemd.unit.xml \
162 man/systemd.service.xml
163
47be870b
LP
164systemd_SOURCES = \
165 $(COMMON_SOURCES) \
166 main.c
167
168systemd_CPPFLAGS = \
169 $(AM_CPPFLAGS) \
170 $(DBUS_CFLAGS) \
8e274523
LP
171 $(UDEV_CFLAGS) \
172 $(CGROUP_CFLAGS)
47be870b
LP
173
174systemd_LDADD = \
175 $(DBUS_LIBS) \
8e274523
LP
176 $(UDEV_LIBS) \
177 $(CGROUP_LIBS)
47be870b
LP
178
179test_engine_SOURCES = \
180 $(COMMON_SOURCES) \
181 test-engine.c
182
183test_engine_CPPFLAGS = $(systemd_CPPFLAGS)
184test_engine_LDADD = $(systemd_LDADD)
185
186test_job_type_SOURCES = \
187 $(COMMON_SOURCES) \
188 test-engine.c
189
190test_job_type_CPPFLAGS = $(systemd_CPPFLAGS)
191test_job_type_LDADD = $(systemd_LDADD)
192
15ae422b
LP
193test_ns_SOURCES = \
194 $(BASIC_SOURCES) \
195 test-ns.c \
196 namespace.c
197
198test_ns_CPPFLAGS = $(systemd_CPPFLAGS)
199test_ns_LDADD = $(systemd_LDADD)
200
af5bc85d
LP
201test_loopback_SOURCES = \
202 $(BASIC_SOURCES) \
203 test-loopback.c \
204 loopback-setup.c
205
206test_loopback_CPPFLAGS = $(systemd_CPPFLAGS)
207test_loopback_LDADD = $(systemd_LDADD)
208
47be870b
LP
209systemd_logger_SOURCES = \
210 $(BASIC_SOURCES) \
8bfcc8ea 211 logger.c \
05a602f4 212 sd-daemon.c
47be870b 213
0b7964b8
LP
214systemd_initctl_SOURCES = \
215 $(BASIC_SOURCES) \
8bfcc8ea 216 initctl.c \
05a602f4 217 sd-daemon.c
0b7964b8
LP
218
219systemd_initctl_CPPFLAGS = \
220 $(AM_CPPFLAGS) \
221 $(DBUS_CFLAGS)
222
223systemd_initctl_LDADD = \
224 $(DBUS_LIBS)
225
8e274523
LP
226systemd_cgroups_agent_SOURCES = \
227 $(BASIC_SOURCES) \
228 cgroups-agent.c
229
230systemd_cgroups_agent_CPPFLAGS = \
231 $(AM_CPPFLAGS) \
232 $(DBUS_CFLAGS)
233
234systemd_cgroups_agent_LDADD = \
235 $(DBUS_LIBS)
236
b9cd233f 237VALAFLAGS = -g --save-temps --pkg=dbus-glib-1 --pkg=posix --pkg gtk+-2.0
47be870b
LP
238
239systemctl_SOURCES = \
240 systemctl.vala \
241 systemd-interfaces.vala
242
67ef7823 243systemctl_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(VALA_CFLAGS)
47be870b
LP
244systemctl_LDADD = $(DBUSGLIB_LIBS)
245
246systemadm_SOURCES = \
247 systemadm.vala \
248 systemd-interfaces.vala
249
67ef7823 250systemadm_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(VALA_CFLAGS)
47be870b 251systemadm_LDADD = $(DBUSGLIB_LIBS) $(GTK_LIBS)
c1e1601e 252
70fcff31 253systemd-initctl.service: units/systemd-initctl.service.in Makefile
e9da3678 254 $(SED) -e 's,@libexecdir\@,$(libexecdir),g' \
2d02719c
LP
255 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
256 < $< > $@
70fcff31
LP
257
258systemd-logger.service: units/systemd-logger.service.in Makefile
e9da3678 259 $(SED) -e 's,@libexecdir\@,$(libexecdir),g' \
2d02719c
LP
260 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
261 < $< > $@
70fcff31 262
c1e1601e
LP
263CLEANFILES = \
264 systemd-interfaces.c \
265 systemctl.c \
8e274523 266 systemadm.c \
70fcff31
LP
267 systemd-initctl.service \
268 systemd-logger.service
4697132b 269
d1ab0ca0
LP
270if HAVE_XSLTPROC
271%.5: man/%.xml
272 $(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
273
274%.html: man/%.xml
275 $(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
276
277CLEANFILES += \
278 $(dist_man_MANS) \
279 $(HTMLMANS)
280endif
281
4697132b 282install-data-hook:
64c1b5bf 283 $(MKDIR_P) -m 0755 \
43aa226d
LP
284 $(DESTDIR)$(systemunitdir) \
285 $(DESTDIR)$(sessionunitdir) \
64c1b5bf
LP
286 $(DESTDIR)$(pkgsysconfdir)/system \
287 $(DESTDIR)$(pkgsysconfdir)/session \
288 $(DESTDIR)$(sysconfdir)/xdg/systemd \
289 $(DESTDIR)/cgroup/debug
e9da3678
LP
290 ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
291 rm -f session && \
292 $(LN_S) $(DESTDIR)$(pkgsysconfdir)/session session )
d1ab0ca0
LP
293
294DISTCHECK_CONFIGURE_FLAGS = \
295 --with-udevrulesdir=$$dc_install_base/$(udevrulesdir)