]> git.ipfire.org Git - thirdparty/systemd.git/blob - Makefile.am
configure: Allow to disable build of tools that require GTK.
[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 pkgsysconfdir=$(sysconfdir)/systemd
21 dbuspolicydir=$(sysconfdir)/dbus-1/system.d
22 udevrulesdir=/lib/udev/rules.d
23
24 systemunitdir=$(pkgdatadir)/system
25 sessionunitdir=$(pkgdatadir)/system
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 # -DSYSTEMD_BINARY_PATH=\"/home/lennart/projects/systemd/systemd\"
39
40
41 sbin_PROGRAMS = \
42 systemd
43
44 bin_PROGRAMS = \
45 systemctl
46
47 if HAVE_GTK
48 bin_PROGRAMS += \
49 systemadm
50 endif
51
52 pkglibexec_PROGRAMS = \
53 systemd-logger \
54 systemd-cgroups-agent \
55 systemd-initctl
56
57 noinst_PROGRAMS = \
58 test-engine \
59 test-job-type \
60 test-ns \
61 test-loopback
62
63 dbuspolicy_DATA = \
64 org.freedesktop.systemd1.conf
65
66 udevrules_DATA = \
67 99-systemd.rules
68
69 systemunit_DATA = \
70 units/emergency.service \
71 systemd-initctl.service \
72 units/systemd-initctl.socket \
73 systemd-logger.service \
74 units/systemd-logger.socket
75
76 EXTRA_DIST = \
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 \
83 units/systemd-logger.socket
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 systemd_SOURCES = \
149 $(COMMON_SOURCES) \
150 main.c
151
152 systemd_CPPFLAGS = \
153 $(AM_CPPFLAGS) \
154 $(DBUS_CFLAGS) \
155 $(UDEV_CFLAGS) \
156 $(CGROUP_CFLAGS)
157
158 systemd_LDADD = \
159 $(DBUS_LIBS) \
160 $(UDEV_LIBS) \
161 $(CGROUP_LIBS)
162
163 test_engine_SOURCES = \
164 $(COMMON_SOURCES) \
165 test-engine.c
166
167 test_engine_CPPFLAGS = $(systemd_CPPFLAGS)
168 test_engine_LDADD = $(systemd_LDADD)
169
170 test_job_type_SOURCES = \
171 $(COMMON_SOURCES) \
172 test-engine.c
173
174 test_job_type_CPPFLAGS = $(systemd_CPPFLAGS)
175 test_job_type_LDADD = $(systemd_LDADD)
176
177 test_ns_SOURCES = \
178 $(BASIC_SOURCES) \
179 test-ns.c \
180 namespace.c
181
182 test_ns_CPPFLAGS = $(systemd_CPPFLAGS)
183 test_ns_LDADD = $(systemd_LDADD)
184
185 test_loopback_SOURCES = \
186 $(BASIC_SOURCES) \
187 test-loopback.c \
188 loopback-setup.c
189
190 test_loopback_CPPFLAGS = $(systemd_CPPFLAGS)
191 test_loopback_LDADD = $(systemd_LDADD)
192
193 systemd_logger_SOURCES = \
194 $(BASIC_SOURCES) \
195 logger.c
196
197 systemd_initctl_SOURCES = \
198 $(BASIC_SOURCES) \
199 initctl.c
200
201 systemd_initctl_CPPFLAGS = \
202 $(AM_CPPFLAGS) \
203 $(DBUS_CFLAGS)
204
205 systemd_initctl_LDADD = \
206 $(DBUS_LIBS)
207
208 systemd_cgroups_agent_SOURCES = \
209 $(BASIC_SOURCES) \
210 cgroups-agent.c
211
212 systemd_cgroups_agent_CPPFLAGS = \
213 $(AM_CPPFLAGS) \
214 $(DBUS_CFLAGS)
215
216 systemd_cgroups_agent_LDADD = \
217 $(DBUS_LIBS)
218
219 VALAFLAGS = -g --save-temps --pkg=dbus-glib-1 --pkg=posix --pkg gtk+-2.0
220
221 systemctl_SOURCES = \
222 systemctl.vala \
223 systemd-interfaces.vala
224
225 systemctl_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS)
226 systemctl_LDADD = $(DBUSGLIB_LIBS)
227
228 systemadm_SOURCES = \
229 systemadm.vala \
230 systemd-interfaces.vala
231
232 systemadm_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS)
233 systemadm_LDADD = $(DBUSGLIB_LIBS) $(GTK_LIBS)
234
235 systemd-initctl.service: units/systemd-initctl.service.in Makefile
236 sed -e 's,@libexecdir\@,$(libexecdir),g' \
237 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
238 < $< > $@
239
240 systemd-logger.service: units/systemd-logger.service.in Makefile
241 sed -e 's,@libexecdir\@,$(libexecdir),g' \
242 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
243 < $< > $@
244
245 CLEANFILES = \
246 systemd-interfaces.c \
247 systemctl.c \
248 systemadm.c \
249 systemd-initctl.service \
250 systemd-logger.service