]> git.ipfire.org Git - thirdparty/systemd.git/blob - Makefile.am
units: add rpcbind.target special
[thirdparty/systemd.git] / Makefile.am
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
18 ACLOCAL_AMFLAGS = -I m4
19
20 dbuspolicydir=$(sysconfdir)/dbus-1/system.d
21 udevrulesdir=@udevrulesdir@
22
23 pkgsysconfdir=$(sysconfdir)/systemd
24 systemunitdir=$(pkgdatadir)/system
25 sessionunitdir=$(pkgdatadir)/session
26
27 AM_CPPFLAGS = \
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\" \
37 -I $(top_srcdir)/src
38
39 sbin_PROGRAMS = \
40 systemd
41
42 bin_PROGRAMS = \
43 systemctl
44
45 if HAVE_GTK
46 bin_PROGRAMS += \
47 systemadm
48 endif
49
50 pkglibexec_PROGRAMS = \
51 systemd-logger \
52 systemd-cgroups-agent \
53 systemd-initctl
54
55 noinst_PROGRAMS = \
56 test-engine \
57 test-job-type \
58 test-ns \
59 test-loopback
60
61 dist_dbuspolicy_DATA = \
62 src/org.freedesktop.systemd1.conf
63
64 dist_udevrules_DATA = \
65 src/99-systemd.rules
66
67 dist_systemunit_DATA = \
68 units/emergency.service \
69 units/local-fs.target \
70 units/network.target \
71 units/nss-lookup.target \
72 units/remote-fs.target \
73 units/rpcbind.target \
74 units/rtc-set.target \
75 units/shutdown.target \
76 units/sigpwr.target \
77 units/sockets.target \
78 units/swap.target \
79 units/systemd-initctl.socket \
80 units/systemd-logger.socket
81
82 systemunit_DATA = \
83 units/systemd-initctl.service \
84 units/systemd-logger.service \
85 units/syslog.target
86
87 EXTRA_DIST = \
88 units/systemd-initctl.service.in \
89 units/systemd-logger.service.in \
90 units/syslog.target.in \
91 LICENSE \
92 README
93
94 # This is needed because automake is buggy in how it generates the
95 # rules for C programs, but not Vala programs. We therefore can't
96 # list the .h files as dependencies if we want make dist to work.
97 BASIC_SOURCES = \
98 src/util.c \
99 src/hashmap.c \
100 src/set.c \
101 src/strv.c \
102 src/conf-parser.c \
103 src/socket-util.c \
104 src/log.c \
105 src/ratelimit.c
106
107 COMMON_SOURCES = \
108 $(BASIC_SOURCES) \
109 src/unit.c \
110 src/job.c \
111 src/manager.c \
112 src/load-fragment.c \
113 src/service.c \
114 src/automount.c \
115 src/mount.c \
116 src/swap.c \
117 src/device.c \
118 src/target.c \
119 src/snapshot.c \
120 src/socket.c \
121 src/timer.c \
122 src/load-dropin.c \
123 src/execute.c \
124 src/dbus.c \
125 src/dbus-manager.c \
126 src/dbus-unit.c \
127 src/dbus-job.c \
128 src/dbus-service.c \
129 src/dbus-socket.c \
130 src/dbus-target.c \
131 src/dbus-mount.c \
132 src/dbus-automount.c \
133 src/dbus-swap.c \
134 src/dbus-snapshot.c \
135 src/dbus-device.c \
136 src/dbus-execute.c \
137 src/cgroup.c \
138 src/mount-setup.c \
139 src/hostname-setup.c \
140 src/loopback-setup.c \
141 src/utmp-wtmp.c \
142 src/specifier.c \
143 src/unit-name.c \
144 src/fdset.c \
145 src/namespace.c
146
147 EXTRA_DIST += \
148 ${COMMON_SOURCES:.c=.h} \
149 src/macro.h \
150 src/ioprio.h \
151 src/missing.h \
152 src/list.h \
153 src/securebits.h \
154 src/linux/auto_dev-ioctl.h \
155 src/initreq.h \
156 src/sd-daemon.h
157
158 dist_man_MANS = \
159 man/systemd.unit.5 \
160 man/systemd.service.5 \
161 man/systemd.special.7
162
163 HTMLMANS = \
164 man/systemd.unit.html \
165 man/systemd.service.html \
166 man/systemd.special.html
167
168 dist_noinst_DATA = \
169 $(HTMLMANS)
170
171 EXTRA_DIST += \
172 man/systemd.unit.xml \
173 man/systemd.service.xml \
174 man/systemd.special.xml
175
176 systemd_SOURCES = \
177 $(COMMON_SOURCES) \
178 src/main.c
179
180 systemd_CPPFLAGS = \
181 $(AM_CPPFLAGS) \
182 $(DBUS_CFLAGS) \
183 $(UDEV_CFLAGS) \
184 $(CGROUP_CFLAGS)
185
186 systemd_LDADD = \
187 $(DBUS_LIBS) \
188 $(UDEV_LIBS) \
189 $(CGROUP_LIBS)
190
191 test_engine_SOURCES = \
192 $(COMMON_SOURCES) \
193 src/test-engine.c
194
195 test_engine_CPPFLAGS = $(systemd_CPPFLAGS)
196 test_engine_LDADD = $(systemd_LDADD)
197
198 test_job_type_SOURCES = \
199 $(COMMON_SOURCES) \
200 src/test-engine.c
201
202 test_job_type_CPPFLAGS = $(systemd_CPPFLAGS)
203 test_job_type_LDADD = $(systemd_LDADD)
204
205 test_ns_SOURCES = \
206 $(BASIC_SOURCES) \
207 src/test-ns.c \
208 src/namespace.c
209
210 test_ns_CPPFLAGS = $(systemd_CPPFLAGS)
211 test_ns_LDADD = $(systemd_LDADD)
212
213 test_loopback_SOURCES = \
214 $(BASIC_SOURCES) \
215 src/test-loopback.c \
216 src/loopback-setup.c
217
218 test_loopback_CPPFLAGS = $(systemd_CPPFLAGS)
219 test_loopback_LDADD = $(systemd_LDADD)
220
221 systemd_logger_SOURCES = \
222 $(BASIC_SOURCES) \
223 src/logger.c \
224 src/sd-daemon.c
225
226 systemd_initctl_SOURCES = \
227 $(BASIC_SOURCES) \
228 src/initctl.c \
229 src/sd-daemon.c
230
231 systemd_initctl_CPPFLAGS = \
232 $(AM_CPPFLAGS) \
233 $(DBUS_CFLAGS)
234
235 systemd_initctl_LDADD = \
236 $(DBUS_LIBS)
237
238 systemd_cgroups_agent_SOURCES = \
239 $(BASIC_SOURCES) \
240 src/cgroups-agent.c
241
242 systemd_cgroups_agent_CPPFLAGS = \
243 $(AM_CPPFLAGS) \
244 $(DBUS_CFLAGS)
245
246 systemd_cgroups_agent_LDADD = \
247 $(DBUS_LIBS)
248
249 VALAFLAGS = \
250 -g \
251 --save-temps \
252 --pkg=dbus-glib-1 \
253 --pkg=posix
254
255 if HAVE_GTK
256 VALAFLAGS += \
257 --pkg=gtk+-2.0
258 endif
259
260 VALA_CFLAGS = \
261 -Wno-unused-variable \
262 -Wno-unused-function
263
264 systemctl_SOURCES = \
265 src/systemctl.vala \
266 src/systemd-interfaces.vala
267
268 systemctl_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(VALA_CFLAGS)
269 systemctl_LDADD = $(DBUSGLIB_LIBS)
270
271 systemadm_SOURCES = \
272 src/systemadm.vala \
273 src/systemd-interfaces.vala
274
275 systemadm_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(VALA_CFLAGS)
276 systemadm_LDADD = $(DBUSGLIB_LIBS) $(GTK_LIBS)
277
278 units/systemd-initctl.service: units/systemd-initctl.service.in Makefile
279 $(MKDIR_P) units
280 $(SED) -e 's,@libexecdir\@,$(libexecdir),g' \
281 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
282 < $< > $@
283
284 units/systemd-logger.service: units/systemd-logger.service.in Makefile
285 $(MKDIR_P) units
286 $(SED) -e 's,@libexecdir\@,$(libexecdir),g' \
287 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
288 < $< > $@
289
290 units/syslog.target: units/syslog.target.in Makefile
291 $(MKDIR_P) units
292 $(SED) -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
293 < $< > $@
294
295 CLEANFILES = \
296 src/systemd-interfaces.c \
297 src/systemctl.c \
298 src/systemadm.c \
299 units/systemd-initctl.service \
300 units/systemd-logger.service \
301 units/syslog.target
302
303 if HAVE_XSLTPROC
304 man/%.5 man/%.7: man/%.xml
305 $(MKDIR_P) man
306 $(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
307
308 man/%.html: man/%.xml
309 $(MKDIR_P) man
310 $(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
311
312 CLEANFILES += \
313 $(dist_man_MANS) \
314 $(HTMLMANS)
315 endif
316
317 install-data-hook:
318 $(MKDIR_P) -m 0755 \
319 $(DESTDIR)$(systemunitdir) \
320 $(DESTDIR)$(sessionunitdir) \
321 $(DESTDIR)$(pkgsysconfdir)/system \
322 $(DESTDIR)$(pkgsysconfdir)/system/sockets.target.wants \
323 $(DESTDIR)$(pkgsysconfdir)/session \
324 $(DESTDIR)$(sysconfdir)/xdg/systemd \
325 $(DESTDIR)/cgroup/debug
326 ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
327 rm -f session && \
328 $(LN_S) $(DESTDIR)$(pkgsysconfdir)/session session )
329 ( cd $(DESTDIR)$(pkgsysconfdir)/system/sockets.target.wants && \
330 rm -f systemd-initctl.socket systemd-logger.socket && \
331 $(LN_S) $(DESTDIR)$(systemunitdir)/systemd-logger.socket systemd-logger.socket && \
332 $(LN_S) $(DESTDIR)$(systemunitdir)/systemd-initctl.socket systemd-initctl.socket )
333 ( cd $(DESTDIR)$(sessionunitdir) && \
334 rm -f shutdown.target sockets.target && \
335 $(LN_S) ../system/shutdown.target shutdown.target && \
336 $(LN_S) ../system/sockets.target sockets.target )
337
338 DISTCHECK_CONFIGURE_FLAGS = \
339 --with-udevrulesdir=$$dc_install_base/$(udevrulesdir)