]>
Commit | Line | Data |
---|---|---|
ba7bd8c8 CB |
1 | pkginclude_HEADERS = attach_options.h \ |
2 | lxccontainer.h \ | |
3 | version.h | |
4 | ||
aafa5f96 CB |
5 | noinst_HEADERS = api_extensions.h \ |
6 | attach.h \ | |
ba7bd8c8 CB |
7 | caps.h \ |
8 | cgroups/cgroup.h \ | |
9 | cgroups/cgroup_utils.h \ | |
d7f19646 | 10 | compiler.h \ |
ba7bd8c8 CB |
11 | conf.h \ |
12 | confile.h \ | |
13 | confile_utils.h \ | |
14 | criu.h \ | |
15 | error.h \ | |
37ef15bb | 16 | file_utils.h \ |
cc6119a0 | 17 | ../include/netns_ifaddrs.h \ |
ba7bd8c8 CB |
18 | initutils.h \ |
19 | list.h \ | |
20 | log.h \ | |
21 | lxc.h \ | |
22 | lxclock.h \ | |
279c45ee | 23 | macro.h \ |
af1dc7cd | 24 | memory_utils.h \ |
ba7bd8c8 CB |
25 | monitor.h \ |
26 | namespace.h \ | |
13be2733 | 27 | raw_syscalls.h \ |
d3a9befc | 28 | rexec.h \ |
ba7bd8c8 CB |
29 | start.h \ |
30 | state.h \ | |
31 | storage/btrfs.h \ | |
32 | storage/dir.h \ | |
33 | storage/loop.h \ | |
34 | storage/lvm.h \ | |
35 | storage/nbd.h \ | |
36 | storage/overlay.h \ | |
37 | storage/rbd.h \ | |
38 | storage/rsync.h \ | |
39 | storage/storage.h \ | |
40 | storage/storage_utils.h \ | |
41 | storage/zfs.h \ | |
37ef15bb | 42 | string_utils.h \ |
b25291da | 43 | syscall_wrappers.h \ |
ba7bd8c8 CB |
44 | terminal.h \ |
45 | ../tests/lxctest.h \ | |
46 | tools/arguments.h \ | |
04fe0512 | 47 | storage/storage_utils.h \ |
20502652 CB |
48 | utils.h \ |
49 | uuid.h | |
61ba7fe6 | 50 | |
e827ff7e | 51 | if IS_BIONIC |
9d361e0f CB |
52 | noinst_HEADERS += ../include/fexecve.h \ |
53 | ../include/lxcmntent.h \ | |
ba7bd8c8 | 54 | ../include/openpty.h |
f48b5fd8 FF |
55 | endif |
56 | ||
a04f5407 | 57 | if !HAVE_PRLIMIT |
f48b5fd8 | 58 | if HAVE_PRLIMIT64 |
a04f5407 CB |
59 | noinst_HEADERS += ../include/prlimit.h |
60 | endif | |
e827ff7e SG |
61 | endif |
62 | ||
1ba0013f SG |
63 | if !HAVE_GETLINE |
64 | if HAVE_FGETLN | |
2b25068a | 65 | noinst_HEADERS += ../include/getline.h |
1ba0013f SG |
66 | endif |
67 | endif | |
68 | ||
9dbcd668 | 69 | if !HAVE_GETSUBOPT |
c6668710 | 70 | noinst_HEADERS += tools/include/getsubopt.h |
9dbcd668 SG |
71 | endif |
72 | ||
477e62b6 CB |
73 | if !HAVE_GETGRGID_R |
74 | noinst_HEADERS += ../include/getgrgid_r.h | |
75 | endif | |
76 | ||
5b46e19c | 77 | sodir=$(libdir) |
0ad19a3f | 78 | |
ba7bd8c8 CB |
79 | LSM_SOURCES = lsm/lsm.c \ |
80 | lsm/lsm.h \ | |
81 | lsm/nop.c | |
fe4de9a6 DE |
82 | |
83 | if ENABLE_APPARMOR | |
84 | LSM_SOURCES += lsm/apparmor.c | |
85 | endif | |
86 | ||
87 | if ENABLE_SELINUX | |
88 | LSM_SOURCES += lsm/selinux.c | |
89 | endif | |
90 | ||
26419a7a | 91 | lib_LTLIBRARIES = liblxc.la |
ba7bd8c8 | 92 | liblxc_la_SOURCES = af_unix.c af_unix.h \ |
aafa5f96 | 93 | api_extensions.h \ |
ba7bd8c8 CB |
94 | attach.c attach.h \ |
95 | caps.c caps.h \ | |
96 | cgroups/cgfsng.c \ | |
97 | cgroups/cgroup.c cgroups/cgroup.h \ | |
98 | cgroups/cgroup_utils.c cgroups/cgroup_utils.h \ | |
d7f19646 | 99 | compiler.h \ |
ba7bd8c8 CB |
100 | commands.c commands.h \ |
101 | commands_utils.c commands_utils.h \ | |
102 | conf.c conf.h \ | |
103 | confile.c confile.h \ | |
104 | confile_utils.c confile_utils.h \ | |
105 | criu.c criu.h \ | |
106 | error.c error.h \ | |
107 | execute.c \ | |
108 | freezer.c \ | |
37ef15bb | 109 | file_utils.c file_utils.h \ |
cc6119a0 | 110 | ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \ |
ba7bd8c8 CB |
111 | initutils.c initutils.h \ |
112 | list.h \ | |
113 | log.c log.h \ | |
114 | lxc.h \ | |
115 | lxccontainer.c lxccontainer.h \ | |
116 | lxclock.c lxclock.h \ | |
117 | lxcseccomp.h \ | |
279c45ee | 118 | macro.h \ |
af1dc7cd | 119 | memory_utils.h \ |
ba7bd8c8 CB |
120 | mainloop.c mainloop.h \ |
121 | namespace.c namespace.h \ | |
122 | nl.c nl.h \ | |
123 | network.c network.h \ | |
124 | monitor.c monitor.h \ | |
125 | parse.c parse.h \ | |
13be2733 | 126 | raw_syscalls.c raw_syscalls.h \ |
ba7bd8c8 CB |
127 | ringbuf.c ringbuf.h \ |
128 | rtnl.c rtnl.h \ | |
129 | state.c state.h \ | |
130 | start.c start.h \ | |
131 | storage/btrfs.c storage/btrfs.h \ | |
132 | storage/dir.c storage/dir.h \ | |
133 | storage/loop.c storage/loop.h \ | |
134 | storage/lvm.c storage/lvm.h \ | |
135 | storage/nbd.c storage/nbd.h \ | |
136 | storage/overlay.c storage/overlay.h \ | |
137 | storage/rbd.c storage/rbd.h \ | |
138 | storage/rsync.c storage/rsync.h \ | |
139 | storage/storage.c storage/storage.h \ | |
140 | storage/storage_utils.c storage/storage_utils.h \ | |
141 | storage/zfs.c storage/zfs.h \ | |
37ef15bb | 142 | string_utils.c string_utils.h \ |
ba7bd8c8 | 143 | sync.c sync.h \ |
b25291da | 144 | syscall_wrappers.h \ |
ba7bd8c8 CB |
145 | terminal.c \ |
146 | utils.c utils.h \ | |
20502652 | 147 | uuid.c uuid.h \ |
ba7bd8c8 CB |
148 | version.h \ |
149 | $(LSM_SOURCES) | |
0ad19a3f | 150 | |
e827ff7e | 151 | if IS_BIONIC |
9d361e0f CB |
152 | liblxc_la_SOURCES += ../include/fexecve.c ../include/fexecve.h \ |
153 | ../include/lxcmntent.c ../include/lxcmntent.h \ | |
ba7bd8c8 CB |
154 | ../include/openpty.c ../include/openpty.h |
155 | endif | |
156 | ||
157 | if !HAVE_GETGRGID_R | |
158 | liblxc_la_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h | |
f48b5fd8 FF |
159 | endif |
160 | ||
57d533fb CB |
161 | if !HAVE_GETLINE |
162 | if HAVE_FGETLN | |
163 | liblxc_la_SOURCES += ../include/getline.c ../include/getline.h | |
164 | endif | |
165 | endif | |
166 | ||
a04f5407 | 167 | if !HAVE_PRLIMIT |
f48b5fd8 | 168 | if HAVE_PRLIMIT64 |
a04f5407 CB |
169 | liblxc_la_SOURCES += ../include/prlimit.c ../include/prlimit.h |
170 | endif | |
e827ff7e SG |
171 | endif |
172 | ||
57d533fb CB |
173 | if ENABLE_SECCOMP |
174 | liblxc_la_SOURCES += seccomp.c | |
1ba0013f SG |
175 | endif |
176 | ||
91c272a5 CB |
177 | if !HAVE_STRLCPY |
178 | liblxc_la_SOURCES += ../include/strlcpy.c ../include/strlcpy.h | |
179 | endif | |
180 | ||
3afafe55 CB |
181 | if !HAVE_STRLCAT |
182 | liblxc_la_SOURCES += ../include/strlcat.c ../include/strlcat.h | |
183 | endif | |
184 | ||
6400238d | 185 | if ENFORCE_MEMFD_REXEC |
d3a9befc | 186 | liblxc_la_SOURCES += rexec.c rexec.h |
6400238d CB |
187 | endif |
188 | ||
ba7bd8c8 CB |
189 | AM_CFLAGS = -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \ |
190 | -DLXCPATH=\"$(LXCPATH)\" \ | |
191 | -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \ | |
192 | -DLXCINITDIR=\"$(LXCINITDIR)\" \ | |
193 | -DLIBEXECDIR=\"$(LIBEXECDIR)\" \ | |
194 | -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \ | |
195 | -DLXCTEMPLATECONFIG=\"$(LXCTEMPLATECONFIG)\" \ | |
196 | -DLOGPATH=\"$(LOGPATH)\" \ | |
197 | -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \ | |
198 | -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \ | |
199 | -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \ | |
200 | -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \ | |
201 | -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \ | |
202 | -DSBINDIR=\"$(SBINDIR)\" \ | |
1800f924 | 203 | -DAPPARMOR_CACHE_DIR=\"$(APPARMOR_CACHE_DIR)\" \ |
ba7bd8c8 CB |
204 | -I $(top_srcdir)/src \ |
205 | -I $(top_srcdir)/src/lxc \ | |
206 | -I $(top_srcdir)/src/lxc/storage \ | |
207 | -I $(top_srcdir)/src/lxc/cgroups | |
b9f94fc1 | 208 | |
e075f5d9 SH |
209 | if ENABLE_APPARMOR |
210 | AM_CFLAGS += -DHAVE_APPARMOR | |
211 | endif | |
212 | ||
fa2bb6ba SH |
213 | if ENABLE_OPENSSL |
214 | AM_CFLAGS += -DHAVE_OPENSSL | |
49bc916b FF |
215 | endif |
216 | ||
57d533fb | 217 | if ENABLE_SECCOMP |
ba7bd8c8 CB |
218 | AM_CFLAGS += -DHAVE_SECCOMP \ |
219 | $(SECCOMP_CFLAGS) | |
57d533fb CB |
220 | endif |
221 | ||
fe4de9a6 DE |
222 | if ENABLE_SELINUX |
223 | AM_CFLAGS += -DHAVE_SELINUX | |
224 | endif | |
225 | ||
5c7bfc02 | 226 | if ENABLE_DLOG |
a8eed52c | 227 | AM_CFLAGS += -DHAVE_DLOG \ |
228 | $(DLOG_CFLAGS) | |
5c7bfc02 | 229 | endif |
230 | ||
5e1e7aaf SH |
231 | if USE_CONFIGPATH_LOGS |
232 | AM_CFLAGS += -DUSE_CONFIGPATH_LOGS | |
233 | endif | |
234 | ||
57d533fb CB |
235 | # build the shared library |
236 | liblxc_la_CFLAGS = -fPIC \ | |
237 | -DPIC \ | |
238 | $(AM_CFLAGS) \ | |
239 | -pthread | |
565c4427 CB |
240 | if ENABLE_ASAN |
241 | liblxc_la_CFLAGS += -fsanitize=address \ | |
242 | -fno-omit-frame-pointer | |
243 | endif | |
5b46e19c | 244 | |
57d533fb | 245 | liblxc_la_LDFLAGS = -pthread \ |
9089937b | 246 | -Wl,-no-undefined \ |
57d533fb CB |
247 | -Wl,-soname,liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) \ |
248 | -version-info @LXC_ABI_MAJOR@ | |
5b46e19c | 249 | |
57d533fb | 250 | liblxc_la_LIBADD = $(CAP_LIBS) \ |
fa2bb6ba | 251 | $(OPENSSL_LIBS) \ |
57d533fb | 252 | $(SELINUX_LIBS) \ |
a8eed52c | 253 | $(SECCOMP_LIBS) \ |
254 | $(DLOG_LIBS) | |
20d2e91b | 255 | |
8d060937 | 256 | bin_SCRIPTS= |
5e97c3fc | 257 | |
8d060937 CB |
258 | if ENABLE_COMMANDS |
259 | bin_SCRIPTS += cmd/lxc-checkconfig \ | |
260 | cmd/lxc-update-config | |
261 | endif | |
262 | ||
8d060937 | 263 | if ENABLE_TOOLS |
ba7bd8c8 CB |
264 | bin_PROGRAMS = lxc-attach \ |
265 | lxc-autostart \ | |
266 | lxc-cgroup \ | |
267 | lxc-checkpoint \ | |
268 | lxc-copy \ | |
269 | lxc-config \ | |
270 | lxc-console \ | |
271 | lxc-create \ | |
272 | lxc-destroy \ | |
273 | lxc-device \ | |
274 | lxc-execute \ | |
275 | lxc-freeze \ | |
276 | lxc-info \ | |
277 | lxc-ls \ | |
278 | lxc-monitor \ | |
279 | lxc-snapshot \ | |
280 | lxc-start \ | |
281 | lxc-stop \ | |
282 | lxc-top \ | |
283 | lxc-unfreeze \ | |
284 | lxc-unshare \ | |
ba7bd8c8 | 285 | lxc-wait |
8d060937 | 286 | endif |
d0a6bd39 | 287 | |
8d060937 | 288 | if ENABLE_COMMANDS |
bb760b77 CB |
289 | |
290 | if ENABLE_TOOLS | |
291 | bin_PROGRAMS += lxc-usernsexec | |
292 | else | |
293 | bin_PROGRAMS = lxc-usernsexec | |
294 | endif | |
295 | ||
e78884c9 | 296 | sbin_PROGRAMS = init.lxc |
ba7bd8c8 CB |
297 | |
298 | pkglibexec_PROGRAMS = lxc-monitord \ | |
299 | lxc-user-nic | |
8d060937 | 300 | endif |
a25ba7aa | 301 | |
1c41ddcb | 302 | AM_LDFLAGS = -Wl,-E |
ba7bd8c8 | 303 | |
1c41ddcb GK |
304 | if ENABLE_RPATH |
305 | AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir) | |
306 | endif | |
ba7bd8c8 CB |
307 | |
308 | LDADD = liblxc.la \ | |
309 | @CAP_LIBS@ \ | |
fa2bb6ba | 310 | @OPENSSL_LIBS@ \ |
ba7bd8c8 | 311 | @SECCOMP_LIBS@ \ |
a8eed52c | 312 | @SELINUX_LIBS@ \ |
313 | @DLOG_LIBS@ | |
20d2e91b | 314 | |
8d060937 | 315 | if ENABLE_TOOLS |
ba7bd8c8 | 316 | lxc_attach_SOURCES = tools/lxc_attach.c \ |
d3a9befc | 317 | rexec.c rexec.h \ |
ba7bd8c8 CB |
318 | tools/arguments.c tools/arguments.h |
319 | lxc_autostart_SOURCES = tools/lxc_autostart.c \ | |
320 | tools/arguments.c tools/arguments.h | |
321 | lxc_cgroup_SOURCES = tools/lxc_cgroup.c \ | |
322 | tools/arguments.c tools/arguments.h | |
323 | lxc_config_SOURCES = tools/lxc_config.c \ | |
324 | tools/arguments.c tools/arguments.h | |
325 | lxc_console_SOURCES = tools/lxc_console.c \ | |
326 | tools/arguments.c tools/arguments.h | |
327 | lxc_destroy_SOURCES = tools/lxc_destroy.c \ | |
328 | tools/arguments.c tools/arguments.h | |
329 | lxc_device_SOURCES = tools/lxc_device.c \ | |
330 | tools/arguments.c tools/arguments.h | |
331 | lxc_execute_SOURCES = tools/lxc_execute.c \ | |
332 | tools/arguments.c tools/arguments.h | |
333 | lxc_freeze_SOURCES = tools/lxc_freeze.c \ | |
334 | tools/arguments.c tools/arguments.h | |
335 | lxc_info_SOURCES = tools/lxc_info.c \ | |
336 | tools/arguments.c tools/arguments.h | |
337 | lxc_monitor_SOURCES = tools/lxc_monitor.c \ | |
9d6ade4a | 338 | macro.h \ |
ba7bd8c8 CB |
339 | tools/arguments.c tools/arguments.h |
340 | lxc_ls_SOURCES = tools/lxc_ls.c \ | |
341 | tools/arguments.c tools/arguments.h | |
342 | lxc_copy_SOURCES = tools/lxc_copy.c \ | |
04fe0512 RS |
343 | tools/arguments.c tools/arguments.h \ |
344 | storage/storage_utils.c storage/storage_utils.h | |
ba7bd8c8 CB |
345 | lxc_start_SOURCES = tools/lxc_start.c \ |
346 | tools/arguments.c tools/arguments.h | |
347 | lxc_stop_SOURCES = tools/lxc_stop.c \ | |
348 | tools/arguments.c tools/arguments.h | |
349 | lxc_top_SOURCES = tools/lxc_top.c \ | |
350 | tools/arguments.c tools/arguments.h | |
351 | lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \ | |
352 | tools/arguments.c tools/arguments.h | |
353 | lxc_unshare_SOURCES = tools/lxc_unshare.c \ | |
354 | tools/arguments.c tools/arguments.h | |
355 | lxc_wait_SOURCES = tools/lxc_wait.c \ | |
356 | tools/arguments.c tools/arguments.h | |
357 | lxc_create_SOURCES = tools/lxc_create.c \ | |
04fe0512 RS |
358 | tools/arguments.c tools/arguments.h \ |
359 | storage/storage_utils.c storage/storage_utils.h | |
ba7bd8c8 CB |
360 | lxc_snapshot_SOURCES = tools/lxc_snapshot.c \ |
361 | tools/arguments.c tools/arguments.h | |
362 | lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \ | |
363 | tools/arguments.c tools/arguments.h | |
8d060937 | 364 | endif |
5b46e19c | 365 | |
8d060937 | 366 | if ENABLE_COMMANDS |
844d9eac | 367 | # Binaries shipping with liblxc |
37ef15bb | 368 | init_lxc_SOURCES = cmd/lxc_init.c \ |
2fe8b2a0 CB |
369 | compiler.h \ |
370 | error.h \ | |
f4274ae8 | 371 | initutils.c initutils.h \ |
3cf7d8c2 | 372 | memory_utils.h \ |
2fe8b2a0 | 373 | parse.c parse.h \ |
d7b58715 | 374 | raw_syscalls.c raw_syscalls.h \ |
37ef15bb | 375 | string_utils.c string_utils.h |
d7b58715 | 376 | lxc_monitord_SOURCES = cmd/lxc_monitord.c \ |
253c403d CB |
377 | af_unix.c af_unix.h \ |
378 | log.c log.h \ | |
379 | mainloop.c mainloop.h \ | |
380 | monitor.c monitor.h \ | |
381 | raw_syscalls.c raw_syscalls.h \ | |
382 | utils.c utils.h | |
ba7bd8c8 | 383 | lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \ |
61204b93 | 384 | ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \ |
3725a69c | 385 | log.c log.h \ |
fa4719e2 | 386 | memory_utils.h \ |
ba7bd8c8 | 387 | network.c network.h \ |
47d720d1 | 388 | parse.c parse.h \ |
59524108 | 389 | raw_syscalls.c raw_syscalls.h \ |
fa4719e2 | 390 | string_utils.c string_utils.h \ |
59524108 | 391 | syscall_wrappers.h |
02af8066 CB |
392 | lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \ |
393 | conf.c conf.h \ | |
e8cc8389 | 394 | file_utils.c file_utils.h \ |
02af8066 CB |
395 | list.h \ |
396 | log.c log.h \ | |
c881c810 | 397 | macro.h \ |
e8cc8389 | 398 | memory_utils.h \ |
37ef15bb | 399 | string_utils.c string_utils.h \ |
e8f764b6 | 400 | syscall_wrappers.h \ |
02af8066 | 401 | utils.c utils.h |
8d060937 CB |
402 | endif |
403 | ||
844d9eac | 404 | |
8d060937 | 405 | if ENABLE_TOOLS |
9dbcd668 | 406 | if !HAVE_GETSUBOPT |
c6668710 | 407 | lxc_copy_SOURCES += tools/include/getsubopt.c tools/include/getsubopt.h |
9dbcd668 | 408 | endif |
8d060937 | 409 | endif |
9dbcd668 | 410 | |
8d060937 | 411 | if ENABLE_COMMANDS |
e78884c9 DE |
412 | if HAVE_STATIC_LIBCAP |
413 | sbin_PROGRAMS += init.lxc.static | |
414 | ||
ba7bd8c8 CB |
415 | init_lxc_static_SOURCES = cmd/lxc_init.c \ |
416 | caps.c caps.h \ | |
417 | error.c error.h \ | |
418 | initutils.c initutils.h \ | |
37ef15bb | 419 | file_utils.c file_utils.h \ |
ba7bd8c8 | 420 | log.c log.h \ |
279c45ee | 421 | macro.h \ |
3cf7d8c2 | 422 | memory_utils.h \ |
ba7bd8c8 | 423 | namespace.c namespace.h \ |
37ef15bb | 424 | string_utils.c string_utils.h |
77ae87cd SH |
425 | |
426 | if !HAVE_GETLINE | |
427 | if HAVE_FGETLN | |
ba7bd8c8 | 428 | init_lxc_static_SOURCES += ../include/getline.c ../include/getline.h |
77ae87cd SH |
429 | endif |
430 | endif | |
431 | ||
91c272a5 CB |
432 | if !HAVE_STRLCPY |
433 | init_lxc_static_SOURCES += ../include/strlcpy.c ../include/strlcpy.h | |
434 | endif | |
435 | ||
3afafe55 CB |
436 | if !HAVE_STRLCAT |
437 | init_lxc_static_SOURCES += ../include/strlcat.c ../include/strlcat.h | |
438 | endif | |
439 | ||
d04813f9 | 440 | init_lxc_static_LDFLAGS = -all-static |
2d4b3e3d | 441 | init_lxc_static_LDADD = @CAP_LIBS@ |
858377e4 | 442 | init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF |
e78884c9 | 443 | endif |
8d060937 | 444 | endif |
2d4b3e3d | 445 | |
f7a8609f | 446 | if ENABLE_PAM |
7ac43d3d CB |
447 | if HAVE_PAM |
448 | pam_LTLIBRARIES = pam_cgfs.la | |
71174d46 | 449 | |
ba7bd8c8 | 450 | pam_cgfs_la_SOURCES = pam/pam_cgfs.c \ |
71174d46 | 451 | file_utils.c file_utils.h \ |
f4274ae8 | 452 | macro.h \ |
6421783a | 453 | memory_utils.h \ |
71174d46 CB |
454 | string_utils.c string_utils.h |
455 | ||
456 | if !HAVE_STRLCAT | |
457 | pam_cgfs_la_SOURCES += ../include/strlcat.c ../include/strlcat.h | |
458 | endif | |
459 | ||
460 | if !HAVE_STRLCPY | |
461 | pam_cgfs_la_SOURCES += ../include/strlcpy.c ../include/strlcpy.h | |
462 | endif | |
463 | ||
f4274ae8 | 464 | pam_cgfs_la_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF |
71174d46 | 465 | |
ba7bd8c8 CB |
466 | pam_cgfs_la_LIBADD = $(AM_LIBS) \ |
467 | $(PAM_LIBS) \ | |
a8eed52c | 468 | $(DLOG_LIBS) \ |
ba7bd8c8 | 469 | -L$(top_srcdir) |
71174d46 | 470 | |
ba7bd8c8 CB |
471 | pam_cgfs_la_LDFLAGS = $(AM_LDFLAGS) \ |
472 | -avoid-version \ | |
473 | -module \ | |
9089937b CB |
474 | -shared \ |
475 | -Wl,-no-undefined | |
7ac43d3d | 476 | endif |
f7a8609f | 477 | endif |
7ac43d3d | 478 | |
26419a7a | 479 | install-exec-local: install-libLTLIBRARIES |
2a59a681 SH |
480 | mkdir -p $(DESTDIR)$(datadir)/lxc |
481 | install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc | |
f4790f1f SG |
482 | mv $(shell readlink -f $(DESTDIR)$(libdir)/liblxc.so) $(DESTDIR)$(libdir)/liblxc.so.@LXC_ABI@ |
483 | rm -f $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.1 | |
5b46e19c | 484 | cd $(DESTDIR)$(libdir); \ |
26419a7a SG |
485 | ln -sf liblxc.so.@LXC_ABI@ liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)); \ |
486 | ln -sf liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) liblxc.so | |
45e854dc | 487 | |
9760cfcc | 488 | if ENABLE_COMMANDS |
45e854dc SG |
489 | install-exec-hook: |
490 | chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic | |
9760cfcc | 491 | endif |
5b46e19c CLG |
492 | |
493 | uninstall-local: | |
494 | $(RM) $(DESTDIR)$(libdir)/liblxc.so* | |
57d533fb | 495 | $(RM) $(DESTDIR)$(libdir)/liblxc.a |
f7a8609f | 496 | if ENABLE_PAM |
7ac43d3d CB |
497 | if HAVE_PAM |
498 | $(RM) $(DESTDIR)$(pamdir)/pam_cgfs.so* | |
499 | ||
500 | install-data-hook: install-pamLTLIBRARIES | |
501 | $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.la" | |
502 | $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.a" | |
503 | endif | |
f7a8609f | 504 | endif |