]> git.ipfire.org Git - thirdparty/systemd.git/blame - Makefile.am
log: rework logging logic so that we don't keep /dev/console open
[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
036643a2 20pkgsysconfdir=$(sysconfdir)/systemd
e24067c3 21dbuspolicydir=$(sysconfdir)/dbus-1/system.d
5cc5d790 22udevrulesdir=/lib/udev/rules.d
036643a2 23
70fcff31
LP
24systemunitdir=$(pkgdatadir)/system
25sessionunitdir=$(pkgdatadir)/system
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
38# -DSYSTEMD_BINARY_PATH=\"/home/lennart/projects/systemd/systemd\"
67ef7823 39VALA_CFLAGS=-Wno-unused-variable -Wno-unused-function
47be870b
LP
40
41sbin_PROGRAMS = \
42 systemd
43
44bin_PROGRAMS = \
a9b5b032
MT
45 systemctl
46
47if HAVE_GTK
48bin_PROGRAMS += \
8e274523 49 systemadm
a9b5b032 50endif
8e274523
LP
51
52pkglibexec_PROGRAMS = \
53 systemd-logger \
0b7964b8
LP
54 systemd-cgroups-agent \
55 systemd-initctl
47be870b
LP
56
57noinst_PROGRAMS = \
58 test-engine \
15ae422b 59 test-job-type \
af5bc85d
LP
60 test-ns \
61 test-loopback
47be870b 62
e24067c3
LP
63dbuspolicy_DATA = \
64 org.freedesktop.systemd1.conf
65
5cc5d790
LP
66udevrules_DATA = \
67 99-systemd.rules
68
70fcff31
LP
69systemunit_DATA = \
70 units/emergency.service \
71 systemd-initctl.service \
72 units/systemd-initctl.socket \
73 systemd-logger.service \
74 units/systemd-logger.socket
75
e24067c3 76EXTRA_DIST = \
70fcff31
LP
77 org.freedesktop.systemd1.conf \
78 99-systemd.rules \
79 units/emergency.service \
80 units/systemd-initctl.service.in \
81 units/systemd-initctl.socket \
82 units/systemd-logger.service.in \
31cee6f6
LP
83 units/systemd-logger.socket \
84 LICENSE \
85 README
e24067c3 86
75db651a
TFH
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.
ea6145da 90BASIC_SOURCES = \
47be870b
LP
91 util.c \
92 hashmap.c \
93 set.c \
94 strv.c \
95 conf-parser.c \
96 socket-util.c \
97 log.c \
75db651a 98 ratelimit.c
47be870b 99
ea6145da 100COMMON_SOURCES = \
47be870b
LP
101 $(BASIC_SOURCES) \
102 unit.c \
103 job.c \
104 manager.c \
105 load-fragment.c \
106 service.c \
107 automount.c \
108 mount.c \
07b0b134 109 swap.c \
47be870b
LP
110 device.c \
111 target.c \
112 snapshot.c \
113 socket.c \
114 timer.c \
115 load-dropin.c \
116 execute.c \
117 dbus.c \
118 dbus-manager.c \
119 dbus-unit.c \
8e274523 120 dbus-job.c \
4139c1b2 121 dbus-service.c \
4139c1b2 122 dbus-socket.c \
4139c1b2 123 dbus-target.c \
4139c1b2 124 dbus-mount.c \
4139c1b2 125 dbus-automount.c \
07b0b134 126 dbus-swap.c \
4139c1b2 127 dbus-snapshot.c \
4139c1b2 128 dbus-device.c \
4139c1b2 129 dbus-execute.c \
8e274523 130 cgroup.c \
8e274523 131 mount-setup.c \
302e8c4c 132 hostname-setup.c \
af5bc85d 133 loopback-setup.c \
e537352b 134 utmp-wtmp.c \
9e2f7c11 135 specifier.c \
9e2f7c11 136 unit-name.c \
a16e1123 137 fdset.c \
15ae422b 138 namespace.c
47be870b 139
462b33e9
TFH
140EXTRA_DIST += \
141 ${COMMON_SOURCES:.c=.h} \
142 macro.h \
143 ioprio.h \
144 missing.h \
145 list.h \
146 securebits.h \
147 linux/auto_dev-ioctl.h \
148 initreq.h
149
47be870b
LP
150systemd_SOURCES = \
151 $(COMMON_SOURCES) \
152 main.c
153
154systemd_CPPFLAGS = \
155 $(AM_CPPFLAGS) \
156 $(DBUS_CFLAGS) \
8e274523
LP
157 $(UDEV_CFLAGS) \
158 $(CGROUP_CFLAGS)
47be870b
LP
159
160systemd_LDADD = \
161 $(DBUS_LIBS) \
8e274523
LP
162 $(UDEV_LIBS) \
163 $(CGROUP_LIBS)
47be870b
LP
164
165test_engine_SOURCES = \
166 $(COMMON_SOURCES) \
167 test-engine.c
168
169test_engine_CPPFLAGS = $(systemd_CPPFLAGS)
170test_engine_LDADD = $(systemd_LDADD)
171
172test_job_type_SOURCES = \
173 $(COMMON_SOURCES) \
174 test-engine.c
175
176test_job_type_CPPFLAGS = $(systemd_CPPFLAGS)
177test_job_type_LDADD = $(systemd_LDADD)
178
15ae422b
LP
179test_ns_SOURCES = \
180 $(BASIC_SOURCES) \
181 test-ns.c \
182 namespace.c
183
184test_ns_CPPFLAGS = $(systemd_CPPFLAGS)
185test_ns_LDADD = $(systemd_LDADD)
186
af5bc85d
LP
187test_loopback_SOURCES = \
188 $(BASIC_SOURCES) \
189 test-loopback.c \
190 loopback-setup.c
191
192test_loopback_CPPFLAGS = $(systemd_CPPFLAGS)
193test_loopback_LDADD = $(systemd_LDADD)
194
47be870b
LP
195systemd_logger_SOURCES = \
196 $(BASIC_SOURCES) \
197 logger.c
198
0b7964b8
LP
199systemd_initctl_SOURCES = \
200 $(BASIC_SOURCES) \
201 initctl.c
202
203systemd_initctl_CPPFLAGS = \
204 $(AM_CPPFLAGS) \
205 $(DBUS_CFLAGS)
206
207systemd_initctl_LDADD = \
208 $(DBUS_LIBS)
209
8e274523
LP
210systemd_cgroups_agent_SOURCES = \
211 $(BASIC_SOURCES) \
212 cgroups-agent.c
213
214systemd_cgroups_agent_CPPFLAGS = \
215 $(AM_CPPFLAGS) \
216 $(DBUS_CFLAGS)
217
218systemd_cgroups_agent_LDADD = \
219 $(DBUS_LIBS)
220
b9cd233f 221VALAFLAGS = -g --save-temps --pkg=dbus-glib-1 --pkg=posix --pkg gtk+-2.0
47be870b
LP
222
223systemctl_SOURCES = \
224 systemctl.vala \
225 systemd-interfaces.vala
226
67ef7823 227systemctl_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(VALA_CFLAGS)
47be870b
LP
228systemctl_LDADD = $(DBUSGLIB_LIBS)
229
230systemadm_SOURCES = \
231 systemadm.vala \
232 systemd-interfaces.vala
233
67ef7823 234systemadm_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(VALA_CFLAGS)
47be870b 235systemadm_LDADD = $(DBUSGLIB_LIBS) $(GTK_LIBS)
c1e1601e 236
70fcff31 237systemd-initctl.service: units/systemd-initctl.service.in Makefile
2d02719c
LP
238 sed -e 's,@libexecdir\@,$(libexecdir),g' \
239 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
240 < $< > $@
70fcff31
LP
241
242systemd-logger.service: units/systemd-logger.service.in Makefile
2d02719c
LP
243 sed -e 's,@libexecdir\@,$(libexecdir),g' \
244 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
245 < $< > $@
70fcff31 246
c1e1601e
LP
247CLEANFILES = \
248 systemd-interfaces.c \
249 systemctl.c \
8e274523 250 systemadm.c \
70fcff31
LP
251 systemd-initctl.service \
252 systemd-logger.service
4697132b
LP
253
254install-data-hook:
64c1b5bf
LP
255 $(MKDIR_P) -m 0755 \
256 $(DESTDIR)$(pkgsysconfdir)/system \
257 $(DESTDIR)$(pkgsysconfdir)/session \
258 $(DESTDIR)$(sysconfdir)/xdg/systemd \
259 $(DESTDIR)/cgroup/debug
4697132b
LP
260 rm -f $(DESTDIR)$(sysconfdir)/xdg/systemd/session
261 ln -sf $(DESTDIR)$(pkgsysconfdir)/session $(DESTDIR)$(sysconfdir)/xdg/systemd/session