]> git.ipfire.org Git - thirdparty/systemd.git/blob - Makefile.am
logger,initctl: port to daemon reference implementation
[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
38 VALA_CFLAGS = \
39 -Wno-unused-variable \
40 -Wno-unused-function
41
42 sbin_PROGRAMS = \
43 systemd
44
45 bin_PROGRAMS = \
46 systemctl
47
48 if HAVE_GTK
49 bin_PROGRAMS += \
50 systemadm
51 endif
52
53 pkglibexec_PROGRAMS = \
54 systemd-logger \
55 systemd-cgroups-agent \
56 systemd-initctl
57
58 noinst_PROGRAMS = \
59 test-engine \
60 test-job-type \
61 test-ns \
62 test-loopback
63
64 dist_dbuspolicy_DATA = \
65 org.freedesktop.systemd1.conf
66
67 dist_udevrules_DATA = \
68 99-systemd.rules
69
70 dist_systemunit_DATA = \
71 units/emergency.service \
72 units/systemd-initctl.socket \
73 units/systemd-logger.socket
74
75 systemunit_DATA = \
76 systemd-initctl.service \
77 systemd-logger.service
78
79 EXTRA_DIST = \
80 units/systemd-initctl.service.in \
81 units/systemd-logger.service.in \
82 LICENSE \
83 README
84
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.
88 BASIC_SOURCES = \
89 util.c \
90 hashmap.c \
91 set.c \
92 strv.c \
93 conf-parser.c \
94 socket-util.c \
95 log.c \
96 ratelimit.c
97
98 COMMON_SOURCES = \
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 \
107 swap.c \
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 \
118 dbus-job.c \
119 dbus-service.c \
120 dbus-socket.c \
121 dbus-target.c \
122 dbus-mount.c \
123 dbus-automount.c \
124 dbus-swap.c \
125 dbus-snapshot.c \
126 dbus-device.c \
127 dbus-execute.c \
128 cgroup.c \
129 mount-setup.c \
130 hostname-setup.c \
131 loopback-setup.c \
132 utmp-wtmp.c \
133 specifier.c \
134 unit-name.c \
135 fdset.c \
136 namespace.c
137
138 EXTRA_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 \
146 initreq.h
147
148 dist_man_MANS = \
149 systemd.unit.5 \
150 systemd.service.5
151
152 HTMLMANS = \
153 systemd.unit.html \
154 systemd.service.html
155
156 dist_noinst_DATA = \
157 $(HTMLMANS)
158
159 EXTRA_DIST += \
160 man/systemd.unit.xml \
161 man/systemd.service.xml
162
163 systemd_SOURCES = \
164 $(COMMON_SOURCES) \
165 main.c
166
167 systemd_CPPFLAGS = \
168 $(AM_CPPFLAGS) \
169 $(DBUS_CFLAGS) \
170 $(UDEV_CFLAGS) \
171 $(CGROUP_CFLAGS)
172
173 systemd_LDADD = \
174 $(DBUS_LIBS) \
175 $(UDEV_LIBS) \
176 $(CGROUP_LIBS)
177
178 test_engine_SOURCES = \
179 $(COMMON_SOURCES) \
180 test-engine.c
181
182 test_engine_CPPFLAGS = $(systemd_CPPFLAGS)
183 test_engine_LDADD = $(systemd_LDADD)
184
185 test_job_type_SOURCES = \
186 $(COMMON_SOURCES) \
187 test-engine.c
188
189 test_job_type_CPPFLAGS = $(systemd_CPPFLAGS)
190 test_job_type_LDADD = $(systemd_LDADD)
191
192 test_ns_SOURCES = \
193 $(BASIC_SOURCES) \
194 test-ns.c \
195 namespace.c
196
197 test_ns_CPPFLAGS = $(systemd_CPPFLAGS)
198 test_ns_LDADD = $(systemd_LDADD)
199
200 test_loopback_SOURCES = \
201 $(BASIC_SOURCES) \
202 test-loopback.c \
203 loopback-setup.c
204
205 test_loopback_CPPFLAGS = $(systemd_CPPFLAGS)
206 test_loopback_LDADD = $(systemd_LDADD)
207
208 systemd_logger_SOURCES = \
209 $(BASIC_SOURCES) \
210 logger.c \
211 sd-daemon.c \
212 sd-daemon.h
213
214 systemd_initctl_SOURCES = \
215 $(BASIC_SOURCES) \
216 initctl.c \
217 sd-daemon.c \
218 sd-daemon.h
219
220 systemd_initctl_CPPFLAGS = \
221 $(AM_CPPFLAGS) \
222 $(DBUS_CFLAGS)
223
224 systemd_initctl_LDADD = \
225 $(DBUS_LIBS)
226
227 systemd_cgroups_agent_SOURCES = \
228 $(BASIC_SOURCES) \
229 cgroups-agent.c
230
231 systemd_cgroups_agent_CPPFLAGS = \
232 $(AM_CPPFLAGS) \
233 $(DBUS_CFLAGS)
234
235 systemd_cgroups_agent_LDADD = \
236 $(DBUS_LIBS)
237
238 VALAFLAGS = -g --save-temps --pkg=dbus-glib-1 --pkg=posix --pkg gtk+-2.0
239
240 systemctl_SOURCES = \
241 systemctl.vala \
242 systemd-interfaces.vala
243
244 systemctl_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(VALA_CFLAGS)
245 systemctl_LDADD = $(DBUSGLIB_LIBS)
246
247 systemadm_SOURCES = \
248 systemadm.vala \
249 systemd-interfaces.vala
250
251 systemadm_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(VALA_CFLAGS)
252 systemadm_LDADD = $(DBUSGLIB_LIBS) $(GTK_LIBS)
253
254 systemd-initctl.service: units/systemd-initctl.service.in Makefile
255 sed -e 's,@libexecdir\@,$(libexecdir),g' \
256 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
257 < $< > $@
258
259 systemd-logger.service: units/systemd-logger.service.in Makefile
260 sed -e 's,@libexecdir\@,$(libexecdir),g' \
261 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
262 < $< > $@
263
264 CLEANFILES = \
265 systemd-interfaces.c \
266 systemctl.c \
267 systemadm.c \
268 systemd-initctl.service \
269 systemd-logger.service
270
271 if HAVE_XSLTPROC
272 %.5: man/%.xml
273 $(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
274
275 %.html: man/%.xml
276 $(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
277
278 CLEANFILES += \
279 $(dist_man_MANS) \
280 $(HTMLMANS)
281 endif
282
283 install-data-hook:
284 $(MKDIR_P) -m 0755 \
285 $(DESTDIR)$(systemunitdir) \
286 $(DESTDIR)$(sessionunitdir) \
287 $(DESTDIR)$(pkgsysconfdir)/system \
288 $(DESTDIR)$(pkgsysconfdir)/session \
289 $(DESTDIR)$(sysconfdir)/xdg/systemd \
290 $(DESTDIR)/cgroup/debug
291 rm -f $(DESTDIR)$(sysconfdir)/xdg/systemd/session
292 ln -sf $(DESTDIR)$(pkgsysconfdir)/session $(DESTDIR)$(sysconfdir)/xdg/systemd/session
293
294 DISTCHECK_CONFIGURE_FLAGS = \
295 --with-udevrulesdir=$$dc_install_base/$(udevrulesdir)