chiark / gitweb /
7396dddd87e30ead9680f1e85dfc97bf2a5cdf49
[elogind.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         systemadm
47
48 pkglibexec_PROGRAMS = \
49         systemd-logger \
50         systemd-cgroups-agent \
51         systemd-initctl
52
53 noinst_PROGRAMS = \
54         test-engine \
55         test-job-type \
56         test-ns \
57         test-loopback
58
59 dbuspolicy_DATA = \
60         org.freedesktop.systemd1.conf
61
62 udevrules_DATA = \
63         99-systemd.rules
64
65 systemunit_DATA = \
66         units/emergency.service \
67         systemd-initctl.service \
68         units/systemd-initctl.socket \
69         systemd-logger.service \
70         units/systemd-logger.socket
71
72 EXTRA_DIST = \
73         org.freedesktop.systemd1.conf \
74         99-systemd.rules \
75         units/emergency.service \
76         units/systemd-initctl.service.in \
77         units/systemd-initctl.socket \
78         units/systemd-logger.service.in \
79         units/systemd-logger.socket
80
81 # This is needed because automake is buggy in how it generates the
82 # rules for C programs, but not Vala programs.  We therefore can't
83 # list the .h files as dependencies if we want make dist to work.
84 BASIC_SOURCES = \
85         util.c \
86         hashmap.c \
87         set.c \
88         strv.c \
89         conf-parser.c \
90         socket-util.c \
91         log.c \
92         ratelimit.c
93
94 COMMON_SOURCES = \
95         $(BASIC_SOURCES) \
96         unit.c \
97         job.c \
98         manager.c \
99         load-fragment.c \
100         service.c \
101         automount.c \
102         mount.c \
103         swap.c \
104         device.c \
105         target.c \
106         snapshot.c \
107         socket.c \
108         timer.c \
109         load-dropin.c \
110         execute.c \
111         dbus.c \
112         dbus-manager.c \
113         dbus-unit.c \
114         dbus-job.c \
115         dbus-service.c \
116         dbus-socket.c \
117         dbus-target.c \
118         dbus-mount.c \
119         dbus-automount.c \
120         dbus-swap.c \
121         dbus-snapshot.c \
122         dbus-device.c \
123         dbus-execute.c \
124         cgroup.c \
125         mount-setup.c \
126         hostname-setup.c \
127         loopback-setup.c \
128         utmp-wtmp.c \
129         specifier.c \
130         unit-name.c \
131         fdset.c \
132         namespace.c
133
134 systemd_SOURCES = \
135         $(COMMON_SOURCES) \
136         main.c
137
138 systemd_CPPFLAGS = \
139         $(AM_CPPFLAGS) \
140         $(DBUS_CFLAGS) \
141         $(UDEV_CFLAGS) \
142         $(CGROUP_CFLAGS)
143
144 systemd_LDADD = \
145         $(DBUS_LIBS) \
146         $(UDEV_LIBS) \
147         $(CGROUP_LIBS)
148
149 test_engine_SOURCES = \
150         $(COMMON_SOURCES) \
151         test-engine.c
152
153 test_engine_CPPFLAGS = $(systemd_CPPFLAGS)
154 test_engine_LDADD = $(systemd_LDADD)
155
156 test_job_type_SOURCES = \
157         $(COMMON_SOURCES) \
158         test-engine.c
159
160 test_job_type_CPPFLAGS = $(systemd_CPPFLAGS)
161 test_job_type_LDADD = $(systemd_LDADD)
162
163 test_ns_SOURCES = \
164         $(BASIC_SOURCES) \
165         test-ns.c \
166         namespace.c
167
168 test_ns_CPPFLAGS = $(systemd_CPPFLAGS)
169 test_ns_LDADD = $(systemd_LDADD)
170
171 test_loopback_SOURCES = \
172         $(BASIC_SOURCES) \
173         test-loopback.c \
174         loopback-setup.c
175
176 test_loopback_CPPFLAGS = $(systemd_CPPFLAGS)
177 test_loopback_LDADD = $(systemd_LDADD)
178
179 systemd_logger_SOURCES = \
180         $(BASIC_SOURCES) \
181         logger.c
182
183 systemd_initctl_SOURCES = \
184         $(BASIC_SOURCES) \
185         initctl.c
186
187 systemd_initctl_CPPFLAGS = \
188         $(AM_CPPFLAGS) \
189         $(DBUS_CFLAGS)
190
191 systemd_initctl_LDADD = \
192         $(DBUS_LIBS)
193
194 systemd_cgroups_agent_SOURCES = \
195         $(BASIC_SOURCES) \
196         cgroups-agent.c
197
198 systemd_cgroups_agent_CPPFLAGS = \
199         $(AM_CPPFLAGS) \
200         $(DBUS_CFLAGS)
201
202 systemd_cgroups_agent_LDADD = \
203         $(DBUS_LIBS)
204
205 VALAFLAGS = -g --save-temps --pkg=dbus-glib-1 --pkg=posix --pkg gtk+-2.0
206
207 systemctl_SOURCES = \
208         systemctl.vala \
209         systemd-interfaces.vala
210
211 systemctl_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS)
212 systemctl_LDADD = $(DBUSGLIB_LIBS)
213
214 systemadm_SOURCES = \
215         systemadm.vala \
216         systemd-interfaces.vala
217
218 systemadm_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS)
219 systemadm_LDADD = $(DBUSGLIB_LIBS) $(GTK_LIBS)
220
221 systemd-initctl.service: units/systemd-initctl.service.in Makefile
222         sed -e 's,@libexecdir\@,$(libexecdir),g' \
223                 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
224                 < $< > $@
225
226 systemd-logger.service: units/systemd-logger.service.in Makefile
227         sed -e 's,@libexecdir\@,$(libexecdir),g' \
228                 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
229                 < $< > $@
230
231 CLEANFILES = \
232         systemd-interfaces.c \
233         systemctl.c \
234         systemadm.c \
235         systemd-initctl.service \
236         systemd-logger.service