]> git.proxmox.com Git - mirror_lxc.git/blame - src/lxc/Makefile.am
build: add src/include to build and simplify header inclusions
[mirror_lxc.git] / src / lxc / Makefile.am
CommitLineData
cc73685d
CB
1# SPDX-License-Identifier: LGPL-2.1+
2
ba7bd8c8
CB
3pkginclude_HEADERS = attach_options.h \
4 lxccontainer.h \
5 version.h
6
aafa5f96
CB
7noinst_HEADERS = api_extensions.h \
8 attach.h \
7fc77b1a
CB
9 ../include/bpf.h \
10 ../include/bpf_common.h \
ba7bd8c8
CB
11 caps.h \
12 cgroups/cgroup.h \
13 cgroups/cgroup_utils.h \
bf651989 14 cgroups/cgroup2_devices.h \
d7f19646 15 compiler.h \
ba7bd8c8
CB
16 conf.h \
17 confile.h \
18 confile_utils.h \
19 criu.h \
20 error.h \
38fa7e47 21 error_utils.h \
37ef15bb 22 file_utils.h \
4780b5e7 23 hlist.h \
317410da 24 ../include/strchrnul.h \
646b75b5
CB
25 ../include/strlcat.h \
26 ../include/strlcpy.h \
cc6119a0 27 ../include/netns_ifaddrs.h \
ba7bd8c8
CB
28 initutils.h \
29 list.h \
30 log.h \
31 lxc.h \
32 lxclock.h \
279c45ee 33 macro.h \
af1dc7cd 34 memory_utils.h \
ba7bd8c8 35 monitor.h \
7f88a1a2 36 mount_utils.h \
ba7bd8c8 37 namespace.h \
f40988c7 38 process_utils.h \
d3a9befc 39 rexec.h \
ba7bd8c8
CB
40 start.h \
41 state.h \
42 storage/btrfs.h \
43 storage/dir.h \
44 storage/loop.h \
45 storage/lvm.h \
46 storage/nbd.h \
47 storage/overlay.h \
48 storage/rbd.h \
49 storage/rsync.h \
50 storage/storage.h \
51 storage/storage_utils.h \
52 storage/zfs.h \
37ef15bb 53 string_utils.h \
bed09c9c 54 syscall_numbers.h \
b25291da 55 syscall_wrappers.h \
ba7bd8c8
CB
56 terminal.h \
57 ../tests/lxctest.h \
58 tools/arguments.h \
20502652
CB
59 utils.h \
60 uuid.h
61ba7fe6 61
e827ff7e 62if IS_BIONIC
9d361e0f 63noinst_HEADERS += ../include/fexecve.h \
35eb5cdc
CB
64 ../include/lxcmntent.h
65endif
66
67if !HAVE_OPENPTY
68noinst_HEADERS += ../include/openpty.h
f48b5fd8
FF
69endif
70
a04f5407 71if !HAVE_PRLIMIT
f48b5fd8 72if HAVE_PRLIMIT64
a04f5407
CB
73noinst_HEADERS += ../include/prlimit.h
74endif
e827ff7e
SG
75endif
76
1ba0013f
SG
77if !HAVE_GETLINE
78if HAVE_FGETLN
2b25068a 79noinst_HEADERS += ../include/getline.h
1ba0013f
SG
80endif
81endif
82
9dbcd668 83if !HAVE_GETSUBOPT
c6668710 84noinst_HEADERS += tools/include/getsubopt.h
9dbcd668
SG
85endif
86
477e62b6
CB
87if !HAVE_GETGRGID_R
88noinst_HEADERS += ../include/getgrgid_r.h
89endif
90
5b46e19c 91sodir=$(libdir)
0ad19a3f 92
ba7bd8c8
CB
93LSM_SOURCES = lsm/lsm.c \
94 lsm/lsm.h \
95 lsm/nop.c
fe4de9a6
DE
96
97if ENABLE_APPARMOR
98LSM_SOURCES += lsm/apparmor.c
99endif
100
101if ENABLE_SELINUX
102LSM_SOURCES += lsm/selinux.c
103endif
104
26419a7a 105lib_LTLIBRARIES = liblxc.la
ba7bd8c8 106liblxc_la_SOURCES = af_unix.c af_unix.h \
aafa5f96 107 api_extensions.h \
ba7bd8c8 108 attach.c attach.h \
7fc77b1a
CB
109 ../include/bpf.h \
110 ../include/bpf_common.h \
ba7bd8c8
CB
111 caps.c caps.h \
112 cgroups/cgfsng.c \
113 cgroups/cgroup.c cgroups/cgroup.h \
bf651989 114 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
ba7bd8c8 115 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
d7f19646 116 compiler.h \
ba7bd8c8
CB
117 commands.c commands.h \
118 commands_utils.c commands_utils.h \
119 conf.c conf.h \
120 confile.c confile.h \
121 confile_utils.c confile_utils.h \
122 criu.c criu.h \
123 error.c error.h \
124 execute.c \
38fa7e47 125 error_utils.h \
ba7bd8c8 126 freezer.c \
37ef15bb 127 file_utils.c file_utils.h \
4780b5e7 128 hlist.h \
cc6119a0 129 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
ba7bd8c8
CB
130 initutils.c initutils.h \
131 list.h \
132 log.c log.h \
133 lxc.h \
134 lxccontainer.c lxccontainer.h \
135 lxclock.c lxclock.h \
136 lxcseccomp.h \
279c45ee 137 macro.h \
af1dc7cd 138 memory_utils.h \
ba7bd8c8 139 mainloop.c mainloop.h \
7f88a1a2 140 mount_utils.c mount_utils.h \
ba7bd8c8 141 namespace.c namespace.h \
ba7bd8c8 142 network.c network.h \
1d332c47 143 nl.c nl.h \
ba7bd8c8
CB
144 monitor.c monitor.h \
145 parse.c parse.h \
f40988c7 146 process_utils.c process_utils.h \
ba7bd8c8
CB
147 ringbuf.c ringbuf.h \
148 rtnl.c rtnl.h \
149 state.c state.h \
150 start.c start.h \
151 storage/btrfs.c storage/btrfs.h \
152 storage/dir.c storage/dir.h \
153 storage/loop.c storage/loop.h \
154 storage/lvm.c storage/lvm.h \
155 storage/nbd.c storage/nbd.h \
156 storage/overlay.c storage/overlay.h \
157 storage/rbd.c storage/rbd.h \
158 storage/rsync.c storage/rsync.h \
159 storage/storage.c storage/storage.h \
160 storage/storage_utils.c storage/storage_utils.h \
161 storage/zfs.c storage/zfs.h \
37ef15bb 162 string_utils.c string_utils.h \
ba7bd8c8 163 sync.c sync.h \
bed09c9c 164 syscall_numbers.h \
b25291da 165 syscall_wrappers.h \
cd6b82e4 166 terminal.c terminal.h \
ba7bd8c8 167 utils.c utils.h \
20502652 168 uuid.c uuid.h \
ba7bd8c8
CB
169 version.h \
170 $(LSM_SOURCES)
0ad19a3f 171
e827ff7e 172if IS_BIONIC
9d361e0f 173liblxc_la_SOURCES += ../include/fexecve.c ../include/fexecve.h \
35eb5cdc
CB
174 ../include/lxcmntent.c ../include/lxcmntent.h
175endif
176
177if !HAVE_OPENPTY
178liblxc_la_SOURCES += ../include/openpty.c ../include/openpty.h
ba7bd8c8
CB
179endif
180
181if !HAVE_GETGRGID_R
182liblxc_la_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
f48b5fd8
FF
183endif
184
57d533fb
CB
185if !HAVE_GETLINE
186if HAVE_FGETLN
187liblxc_la_SOURCES += ../include/getline.c ../include/getline.h
188endif
189endif
190
a04f5407 191if !HAVE_PRLIMIT
f48b5fd8 192if HAVE_PRLIMIT64
a04f5407
CB
193liblxc_la_SOURCES += ../include/prlimit.c ../include/prlimit.h
194endif
e827ff7e
SG
195endif
196
57d533fb 197if ENABLE_SECCOMP
d6e12907 198liblxc_la_SOURCES += seccomp.c lxcseccomp.h
1ba0013f
SG
199endif
200
91c272a5
CB
201if !HAVE_STRLCPY
202liblxc_la_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
203endif
204
3afafe55
CB
205if !HAVE_STRLCAT
206liblxc_la_SOURCES += ../include/strlcat.c ../include/strlcat.h
207endif
208
7e4ea7bf
CB
209if !HAVE_STRCHRNUL
210liblxc_la_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
211endif
212
6400238d 213if ENFORCE_MEMFD_REXEC
d3a9befc 214liblxc_la_SOURCES += rexec.c rexec.h
6400238d
CB
215endif
216
b59bc011
CB
217AM_CFLAGS += -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
218 -DLXCPATH=\"$(LXCPATH)\" \
219 -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
220 -DLXCINITDIR=\"$(LXCINITDIR)\" \
221 -DLIBEXECDIR=\"$(LIBEXECDIR)\" \
222 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
223 -DLXCTEMPLATECONFIG=\"$(LXCTEMPLATECONFIG)\" \
224 -DLOGPATH=\"$(LOGPATH)\" \
225 -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
226 -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
227 -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
228 -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
229 -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
230 -DSBINDIR=\"$(SBINDIR)\" \
231 -DAPPARMOR_CACHE_DIR=\"$(APPARMOR_CACHE_DIR)\" \
232 -I $(top_srcdir)/src \
58db1a61 233 -I $(top_srcdir)/src/include \
b59bc011
CB
234 -I $(top_srcdir)/src/lxc \
235 -I $(top_srcdir)/src/lxc/storage \
236 -I $(top_srcdir)/src/lxc/cgroups
e075f5d9
SH
237if ENABLE_APPARMOR
238AM_CFLAGS += -DHAVE_APPARMOR
239endif
240
fa2bb6ba
SH
241if ENABLE_OPENSSL
242AM_CFLAGS += -DHAVE_OPENSSL
49bc916b
FF
243endif
244
57d533fb 245if ENABLE_SECCOMP
ba7bd8c8
CB
246AM_CFLAGS += -DHAVE_SECCOMP \
247 $(SECCOMP_CFLAGS)
57d533fb
CB
248endif
249
fe4de9a6
DE
250if ENABLE_SELINUX
251AM_CFLAGS += -DHAVE_SELINUX
252endif
253
5c7bfc02 254if ENABLE_DLOG
a8eed52c 255AM_CFLAGS += -DHAVE_DLOG \
256 $(DLOG_CFLAGS)
5c7bfc02 257endif
258
5e1e7aaf
SH
259if USE_CONFIGPATH_LOGS
260AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
261endif
262
57d533fb
CB
263# build the shared library
264liblxc_la_CFLAGS = -fPIC \
265 -DPIC \
266 $(AM_CFLAGS) \
384db5d7 267 $(LIBLXC_SANITIZER) \
57d533fb 268 -pthread
384db5d7 269
57d533fb
CB
270liblxc_la_LDFLAGS = -pthread \
271 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) \
272 -version-info @LXC_ABI_MAJOR@
5b46e19c 273
792a48b1
EV
274if ENABLE_NO_UNDEFINED
275liblxc_la_LDFLAGS += -Wl,-no-undefined
276endif
277
57d533fb 278liblxc_la_LIBADD = $(CAP_LIBS) \
fa2bb6ba 279 $(OPENSSL_LIBS) \
57d533fb 280 $(SELINUX_LIBS) \
a8eed52c 281 $(SECCOMP_LIBS) \
543d2f83
CB
282 $(DLOG_LIBS) \
283 $(LIBURING_LIBS)
20d2e91b 284
8d060937 285bin_SCRIPTS=
5e97c3fc 286
8d060937
CB
287if ENABLE_COMMANDS
288bin_SCRIPTS += cmd/lxc-checkconfig \
289 cmd/lxc-update-config
290endif
291
8d060937 292if ENABLE_TOOLS
ba7bd8c8
CB
293bin_PROGRAMS = lxc-attach \
294 lxc-autostart \
295 lxc-cgroup \
296 lxc-checkpoint \
297 lxc-copy \
298 lxc-config \
299 lxc-console \
300 lxc-create \
301 lxc-destroy \
302 lxc-device \
303 lxc-execute \
304 lxc-freeze \
305 lxc-info \
306 lxc-ls \
307 lxc-monitor \
308 lxc-snapshot \
309 lxc-start \
310 lxc-stop \
311 lxc-top \
312 lxc-unfreeze \
313 lxc-unshare \
ba7bd8c8 314 lxc-wait
8d060937 315endif
d0a6bd39 316
8d060937 317if ENABLE_COMMANDS
bb760b77
CB
318
319if ENABLE_TOOLS
320bin_PROGRAMS += lxc-usernsexec
321else
322bin_PROGRAMS = lxc-usernsexec
323endif
324
e78884c9 325sbin_PROGRAMS = init.lxc
ba7bd8c8
CB
326
327pkglibexec_PROGRAMS = lxc-monitord \
328 lxc-user-nic
8d060937 329endif
a25ba7aa 330
b59bc011 331AM_LDFLAGS += -Wl,-E
ba7bd8c8 332
1c41ddcb
GK
333if ENABLE_RPATH
334AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
335endif
ba7bd8c8
CB
336
337LDADD = liblxc.la \
338 @CAP_LIBS@ \
fa2bb6ba 339 @OPENSSL_LIBS@ \
ba7bd8c8 340 @SECCOMP_LIBS@ \
a8eed52c 341 @SELINUX_LIBS@ \
543d2f83
CB
342 @DLOG_LIBS@ \
343 @LIBURING_LIBS@
20d2e91b 344
8d060937 345if ENABLE_TOOLS
ba7bd8c8 346lxc_attach_SOURCES = tools/lxc_attach.c \
8e43f33e 347 tools/arguments.c tools/arguments.h
d6e12907 348
8e43f33e
CB
349if ENABLE_STATIC_BINARIES
350lxc_attach_SOURCES += $(liblxc_la_SOURCES)
351lxc_attach_LDFLAGS = -all-static -pthread
352else
353lxc_attach_SOURCES += af_unix.c af_unix.h \
efb7e304 354 caps.c caps.h \
59eac805 355 cgroups/cgfsng.c \
c332ec90
CB
356 cgroups/cgroup.c cgroups/cgroup.h \
357 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
358 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
8c8cd087
CB
359 commands.c commands.h \
360 commands_utils.c commands_utils.h \
efb7e304 361 conf.c conf.h \
63c2a0bf 362 confile.c confile.h \
f64e249d 363 confile_utils.c confile_utils.h \
8c8cd087 364 error.c error.h \
4a9ee78a 365 file_utils.c file_utils.h \
59eac805 366 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
f575e7ef 367 initutils.c initutils.h \
07d1f84a 368 log.c log.h \
8c8cd087
CB
369 lxclock.c lxclock.h \
370 mainloop.c mainloop.h \
371 monitor.c monitor.h \
74ed30d7 372 mount_utils.c mount_utils.h \
9e20bf04 373 namespace.c namespace.h \
1d332c47
CB
374 network.c network.h \
375 nl.c nl.h \
a804cff7 376 parse.c parse.h \
92a10958 377 process_utils.c process_utils.h \
8e43f33e 378 rexec.c rexec.h \
8c8cd087
CB
379 ringbuf.c ringbuf.h \
380 start.c start.h \
1bf5f812 381 state.c state.h \
2284f8a5
CB
382 storage/btrfs.c storage/btrfs.h \
383 storage/dir.c storage/dir.h \
384 storage/loop.c storage/loop.h \
385 storage/lvm.c storage/lvm.h \
386 storage/nbd.c storage/nbd.h \
387 storage/overlay.c storage/overlay.h \
388 storage/rbd.c storage/rbd.h \
389 storage/rsync.c storage/rsync.h \
390 storage/storage.c storage/storage.h \
391 storage/storage_utils.c storage/storage_utils.h \
392 storage/zfs.c storage/zfs.h \
bf1ca416 393 string_utils.c string_utils.h \
cd6b82e4 394 sync.c sync.h \
5f1b0986 395 terminal.c terminal.h \
78ad1eb0 396 utils.c utils.h \
ebbde173
CB
397 uuid.c uuid.h \
398 $(LSM_SOURCES)
d6e12907 399if ENABLE_SECCOMP
8e43f33e
CB
400lxc_attach_SOURCES += seccomp.c lxcseccomp.h
401endif
317410da
CB
402
403if !HAVE_STRCHRNUL
404lxc_attach_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
405endif
646b75b5
CB
406
407if !HAVE_STRLCPY
408lxc_attach_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
409endif
410
411if !HAVE_STRLCAT
412lxc_attach_SOURCES += ../include/strlcat.c ../include/strlcat.h
413endif
414
415if !HAVE_OPENPTY
416lxc_attach_SOURCES += ../include/openpty.c ../include/openpty.h
417endif
418
419if IS_BIONIC
420lxc_attach_SOURCES += ../include/fexecve.c ../include/fexecve.h \
421 ../include/lxcmntent.c ../include/lxcmntent.h
422endif
423
424if !HAVE_GETGRGID_R
425lxc_attach_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
426endif
427
428if !HAVE_PRLIMIT
429if HAVE_PRLIMIT64
430lxc_attach_SOURCES += ../include/prlimit.c ../include/prlimit.h
431endif
432endif
d6e12907
CB
433endif
434
8e43f33e
CB
435lxc_autostart_SOURCES = tools/lxc_autostart.c \
436 tools/arguments.c tools/arguments.h
437
438if ENABLE_STATIC_BINARIES
439lxc_autostart_SOURCES += $(liblxc_la_SOURCES)
440lxc_autostart_LDFLAGS = -all-static -pthread
441else
442lxc_autostart_SOURCES += af_unix.c af_unix.h \
443 caps.c caps.h \
444 cgroups/cgfsng.c \
445 cgroups/cgroup.c cgroups/cgroup.h \
446 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
447 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
448 commands.c commands.h \
449 commands_utils.c commands_utils.h \
450 conf.c conf.h \
451 confile.c confile.h \
452 confile_utils.c confile_utils.h \
453 error.c error.h \
454 file_utils.c file_utils.h \
455 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
456 initutils.c initutils.h \
457 log.c log.h \
458 lxclock.c lxclock.h \
459 mainloop.c mainloop.h \
460 monitor.c monitor.h \
74ed30d7 461 mount_utils.c mount_utils.h \
8e43f33e
CB
462 namespace.c namespace.h \
463 network.c network.h \
464 nl.c nl.h \
465 parse.c parse.h \
466 process_utils.c process_utils.h \
467 ringbuf.c ringbuf.h \
468 start.c start.h \
469 state.c state.h \
470 storage/btrfs.c storage/btrfs.h \
471 storage/dir.c storage/dir.h \
472 storage/loop.c storage/loop.h \
473 storage/lvm.c storage/lvm.h \
474 storage/nbd.c storage/nbd.h \
475 storage/overlay.c storage/overlay.h \
476 storage/rbd.c storage/rbd.h \
477 storage/rsync.c storage/rsync.h \
478 storage/storage.c storage/storage.h \
479 storage/storage_utils.c storage/storage_utils.h \
480 storage/zfs.c storage/zfs.h \
481 string_utils.c string_utils.h \
482 sync.c sync.h \
483 terminal.c terminal.h \
484 utils.c utils.h \
485 uuid.c uuid.h \
486 $(LSM_SOURCES)
487if ENABLE_SECCOMP
488lxc_autostart_SOURCES += seccomp.c lxcseccomp.h
489endif
317410da
CB
490
491if !HAVE_STRCHRNUL
492lxc_autostart_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
493endif
646b75b5
CB
494
495if !HAVE_STRLCPY
496lxc_autostart_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
497endif
498
499if !HAVE_STRLCAT
500lxc_autostart_SOURCES += ../include/strlcat.c ../include/strlcat.h
501endif
502
503if !HAVE_OPENPTY
504lxc_autostart_SOURCES += ../include/openpty.c ../include/openpty.h
505endif
506
507if IS_BIONIC
508lxc_autostart_SOURCES += ../include/fexecve.c ../include/fexecve.h \
509 ../include/lxcmntent.c ../include/lxcmntent.h
510endif
511
512if !HAVE_GETGRGID_R
513lxc_autostart_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
514endif
515
516if !HAVE_PRLIMIT
517if HAVE_PRLIMIT64
518lxc_autostart_SOURCES += ../include/prlimit.c ../include/prlimit.h
519endif
520endif
8e43f33e
CB
521endif
522
523lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
524 tools/arguments.c tools/arguments.h
525
526if ENABLE_STATIC_BINARIES
527lxc_cgroup_SOURCES += $(liblxc_la_SOURCES)
528lxc_cgroup_LDFLAGS = -all-static -pthread
529else
530lxc_cgroup_SOURCES += af_unix.c af_unix.h \
efb7e304 531 caps.c caps.h \
59eac805 532 cgroups/cgfsng.c \
c332ec90
CB
533 cgroups/cgroup.c cgroups/cgroup.h \
534 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
535 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
8c8cd087
CB
536 commands.c commands.h \
537 commands_utils.c commands_utils.h \
efb7e304 538 conf.c conf.h \
63c2a0bf 539 confile.c confile.h \
f64e249d 540 confile_utils.c confile_utils.h \
8c8cd087 541 error.c error.h \
4a9ee78a 542 file_utils.c file_utils.h \
59eac805 543 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
f575e7ef 544 initutils.c initutils.h \
07d1f84a 545 log.c log.h \
8c8cd087
CB
546 lxclock.c lxclock.h \
547 mainloop.c mainloop.h \
548 monitor.c monitor.h \
74ed30d7 549 mount_utils.c mount_utils.h \
9e20bf04 550 namespace.c namespace.h \
1d332c47
CB
551 network.c network.h \
552 nl.c nl.h \
a804cff7 553 parse.c parse.h \
92a10958 554 process_utils.c process_utils.h \
8c8cd087
CB
555 ringbuf.c ringbuf.h \
556 start.c start.h \
1bf5f812 557 state.c state.h \
2284f8a5
CB
558 storage/btrfs.c storage/btrfs.h \
559 storage/dir.c storage/dir.h \
560 storage/loop.c storage/loop.h \
561 storage/lvm.c storage/lvm.h \
562 storage/nbd.c storage/nbd.h \
563 storage/overlay.c storage/overlay.h \
564 storage/rbd.c storage/rbd.h \
565 storage/rsync.c storage/rsync.h \
566 storage/storage.c storage/storage.h \
567 storage/storage_utils.c storage/storage_utils.h \
568 storage/zfs.c storage/zfs.h \
bf1ca416 569 string_utils.c string_utils.h \
cd6b82e4 570 sync.c sync.h \
5f1b0986 571 terminal.c terminal.h \
78ad1eb0 572 utils.c utils.h \
ebbde173
CB
573 uuid.c uuid.h \
574 $(LSM_SOURCES)
d6e12907 575if ENABLE_SECCOMP
8e43f33e
CB
576lxc_cgroup_SOURCES += seccomp.c lxcseccomp.h
577endif
317410da
CB
578
579if !HAVE_STRCHRNUL
580lxc_cgroup_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
581endif
646b75b5
CB
582
583if !HAVE_STRLCPY
584lxc_cgroup_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
585endif
586
587if !HAVE_STRLCAT
588lxc_cgroup_SOURCES += ../include/strlcat.c ../include/strlcat.h
589endif
590
591if !HAVE_OPENPTY
592lxc_cgroup_SOURCES += ../include/openpty.c ../include/openpty.h
593endif
594
595if IS_BIONIC
596lxc_cgroup_SOURCES += ../include/fexecve.c ../include/fexecve.h \
597 ../include/lxcmntent.c ../include/lxcmntent.h
598endif
599
600if !HAVE_GETGRGID_R
601lxc_cgroup_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
602endif
603
604if !HAVE_PRLIMIT
605if HAVE_PRLIMIT64
606lxc_cgroup_SOURCES += ../include/prlimit.c ../include/prlimit.h
607endif
608endif
d6e12907
CB
609endif
610
8e43f33e
CB
611lxc_config_SOURCES = tools/lxc_config.c \
612 tools/arguments.c tools/arguments.h
d6e12907 613
8e43f33e
CB
614if ENABLE_STATIC_BINARIES
615lxc_config_SOURCES += $(liblxc_la_SOURCES)
616lxc_config_LDFLAGS = -all-static -pthread
617else
618lxc_config_SOURCES += af_unix.c af_unix.h \
0550496b 619 caps.c caps.h \
59eac805 620 cgroups/cgfsng.c \
c332ec90
CB
621 cgroups/cgroup.c cgroups/cgroup.h \
622 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
623 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
8c8cd087
CB
624 commands.c commands.h \
625 commands_utils.c commands_utils.h \
efb7e304 626 conf.c conf.h \
63c2a0bf 627 confile.c confile.h \
f64e249d 628 confile_utils.c confile_utils.h \
8c8cd087 629 error.c error.h \
4a9ee78a 630 file_utils.c file_utils.h \
59eac805 631 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
f575e7ef 632 initutils.c initutils.h \
07d1f84a 633 log.c log.h \
8c8cd087
CB
634 lxclock.c lxclock.h \
635 mainloop.c mainloop.h \
636 monitor.c monitor.h \
74ed30d7 637 mount_utils.c mount_utils.h \
9e20bf04 638 namespace.c namespace.h \
1d332c47
CB
639 network.c network.h \
640 nl.c nl.h \
a804cff7 641 parse.c parse.h \
92a10958 642 process_utils.c process_utils.h \
8c8cd087
CB
643 ringbuf.c ringbuf.h \
644 start.c start.h \
1bf5f812 645 state.c state.h \
2284f8a5
CB
646 storage/btrfs.c storage/btrfs.h \
647 storage/dir.c storage/dir.h \
648 storage/loop.c storage/loop.h \
649 storage/lvm.c storage/lvm.h \
650 storage/nbd.c storage/nbd.h \
651 storage/overlay.c storage/overlay.h \
652 storage/rbd.c storage/rbd.h \
653 storage/rsync.c storage/rsync.h \
654 storage/storage.c storage/storage.h \
655 storage/storage_utils.c storage/storage_utils.h \
656 storage/zfs.c storage/zfs.h \
bf1ca416 657 string_utils.c string_utils.h \
cd6b82e4 658 sync.c sync.h \
5f1b0986 659 terminal.c terminal.h \
78ad1eb0 660 utils.c utils.h \
ebbde173
CB
661 uuid.c uuid.h \
662 $(LSM_SOURCES)
d6e12907 663if ENABLE_SECCOMP
8e43f33e
CB
664lxc_config_SOURCES += seccomp.c lxcseccomp.h
665endif
317410da
CB
666
667if !HAVE_STRCHRNUL
668lxc_config_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
669endif
646b75b5
CB
670
671if !HAVE_STRLCPY
672lxc_config_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
673endif
674
675if !HAVE_STRLCAT
676lxc_config_SOURCES += ../include/strlcat.c ../include/strlcat.h
677endif
678
679if !HAVE_OPENPTY
680lxc_config_SOURCES += ../include/openpty.c ../include/openpty.h
681endif
682
683if IS_BIONIC
684lxc_config_SOURCES += ../include/fexecve.c ../include/fexecve.h \
685 ../include/lxcmntent.c ../include/lxcmntent.h
686endif
687
688if !HAVE_GETGRGID_R
689lxc_config_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
690endif
691
692if !HAVE_PRLIMIT
693if HAVE_PRLIMIT64
694lxc_config_SOURCES += ../include/prlimit.c ../include/prlimit.h
695endif
696endif
d6e12907
CB
697endif
698
8e43f33e
CB
699lxc_console_SOURCES = tools/lxc_console.c \
700 tools/arguments.c tools/arguments.h
701
702if ENABLE_STATIC_BINARIES
703lxc_console_SOURCES += $(liblxc_la_SOURCES)
704lxc_console_LDFLAGS = -all-static -pthread
705else
706lxc_console_SOURCES += af_unix.c af_unix.h \
707 caps.c caps.h \
708 cgroups/cgfsng.c \
709 cgroups/cgroup.c cgroups/cgroup.h \
710 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
711 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
712 commands.c commands.h \
713 commands_utils.c commands_utils.h \
714 conf.c conf.h \
715 confile.c confile.h \
716 confile_utils.c confile_utils.h \
717 error.c error.h \
718 file_utils.c file_utils.h \
719 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
720 initutils.c initutils.h \
721 log.c log.h \
722 lxclock.c lxclock.h \
723 mainloop.c mainloop.h \
724 monitor.c monitor.h \
74ed30d7 725 mount_utils.c mount_utils.h \
8e43f33e
CB
726 namespace.c namespace.h \
727 network.c network.h \
728 nl.c nl.h \
729 parse.c parse.h \
730 process_utils.c process_utils.h \
731 ringbuf.c ringbuf.h \
732 start.c start.h \
733 state.c state.h \
734 storage/btrfs.c storage/btrfs.h \
735 storage/dir.c storage/dir.h \
736 storage/loop.c storage/loop.h \
737 storage/lvm.c storage/lvm.h \
738 storage/nbd.c storage/nbd.h \
739 storage/overlay.c storage/overlay.h \
740 storage/rbd.c storage/rbd.h \
741 storage/rsync.c storage/rsync.h \
742 storage/storage.c storage/storage.h \
743 storage/storage_utils.c storage/storage_utils.h \
744 storage/zfs.c storage/zfs.h \
745 string_utils.c string_utils.h \
746 sync.c sync.h \
747 terminal.c terminal.h \
748 utils.c utils.h \
749 uuid.c uuid.h \
750 $(LSM_SOURCES)
d6e12907 751if ENABLE_SECCOMP
8e43f33e
CB
752lxc_console_SOURCES += seccomp.c lxcseccomp.h
753endif
317410da
CB
754
755if !HAVE_STRCHRNUL
756lxc_console_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
757endif
646b75b5
CB
758
759if !HAVE_STRLCPY
760lxc_console_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
761endif
762
763if !HAVE_STRLCAT
764lxc_console_SOURCES += ../include/strlcat.c ../include/strlcat.h
765endif
766
767if !HAVE_OPENPTY
768lxc_console_SOURCES += ../include/openpty.c ../include/openpty.h
769endif
770
771if IS_BIONIC
772lxc_console_SOURCES += ../include/fexecve.c ../include/fexecve.h \
773 ../include/lxcmntent.c ../include/lxcmntent.h
774endif
775
776if !HAVE_GETGRGID_R
777lxc_console_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
778endif
779
780if !HAVE_PRLIMIT
781if HAVE_PRLIMIT64
782lxc_console_SOURCES += ../include/prlimit.c ../include/prlimit.h
783endif
784endif
d6e12907
CB
785endif
786
8e43f33e
CB
787lxc_destroy_SOURCES = tools/lxc_destroy.c \
788 tools/arguments.c tools/arguments.h
789
790if ENABLE_STATIC_BINARIES
791lxc_destroy_SOURCES += $(liblxc_la_SOURCES)
792lxc_destroy_LDFLAGS = -all-static -pthread
793else
794lxc_destroy_SOURCES += af_unix.c af_unix.h \
795 caps.c caps.h \
796 cgroups/cgfsng.c \
797 cgroups/cgroup.c cgroups/cgroup.h \
798 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
799 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
800 commands.c commands.h \
801 commands_utils.c commands_utils.h \
802 conf.c conf.h \
803 confile.c confile.h \
804 confile_utils.c confile_utils.h \
805 error.c error.h \
806 file_utils.c file_utils.h \
807 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
808 initutils.c initutils.h \
809 log.c log.h \
810 lxclock.c lxclock.h \
811 mainloop.c mainloop.h \
812 monitor.c monitor.h \
74ed30d7 813 mount_utils.c mount_utils.h \
8e43f33e
CB
814 namespace.c namespace.h \
815 network.c network.h \
816 nl.c nl.h \
817 parse.c parse.h \
818 process_utils.c process_utils.h \
819 ringbuf.c ringbuf.h \
820 start.c start.h \
821 state.c state.h \
822 storage/btrfs.c storage/btrfs.h \
823 storage/dir.c storage/dir.h \
824 storage/loop.c storage/loop.h \
825 storage/lvm.c storage/lvm.h \
826 storage/nbd.c storage/nbd.h \
827 storage/overlay.c storage/overlay.h \
828 storage/rbd.c storage/rbd.h \
829 storage/rsync.c storage/rsync.h \
830 storage/storage.c storage/storage.h \
831 storage/storage_utils.c storage/storage_utils.h \
832 storage/zfs.c storage/zfs.h \
833 string_utils.c string_utils.h \
834 sync.c sync.h \
835 terminal.c terminal.h \
836 utils.c utils.h \
837 uuid.c uuid.h \
838 $(LSM_SOURCES)
d6e12907 839if ENABLE_SECCOMP
8e43f33e
CB
840lxc_destroy_SOURCES += seccomp.c lxcseccomp.h
841endif
317410da
CB
842
843if !HAVE_STRCHRNUL
844lxc_destroy_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
845endif
646b75b5
CB
846
847if !HAVE_STRLCPY
848lxc_destroy_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
849endif
850
851if !HAVE_STRLCAT
852lxc_destroy_SOURCES += ../include/strlcat.c ../include/strlcat.h
853endif
854
855if !HAVE_OPENPTY
856lxc_destroy_SOURCES += ../include/openpty.c ../include/openpty.h
857endif
858
859if IS_BIONIC
860lxc_destroy_SOURCES += ../include/fexecve.c ../include/fexecve.h \
861 ../include/lxcmntent.c ../include/lxcmntent.h
862endif
863
864if !HAVE_GETGRGID_R
865lxc_destroy_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
866endif
867
868if !HAVE_PRLIMIT
869if HAVE_PRLIMIT64
870lxc_destroy_SOURCES += ../include/prlimit.c ../include/prlimit.h
871endif
872endif
d6e12907
CB
873endif
874
8e43f33e
CB
875lxc_device_SOURCES = tools/lxc_device.c \
876 tools/arguments.c tools/arguments.h
877
878if ENABLE_STATIC_BINARIES
879lxc_device_SOURCES += $(liblxc_la_SOURCES)
880lxc_device_LDFLAGS = -all-static -pthread
881else
882lxc_device_SOURCES += af_unix.c af_unix.h \
efb7e304 883 caps.c caps.h \
59eac805 884 cgroups/cgfsng.c \
c332ec90
CB
885 cgroups/cgroup.c cgroups/cgroup.h \
886 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
887 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
8c8cd087
CB
888 commands.c commands.h \
889 commands_utils.c commands_utils.h \
efb7e304 890 conf.c conf.h \
63c2a0bf 891 confile.c confile.h \
f64e249d 892 confile_utils.c confile_utils.h \
8c8cd087 893 error.c error.h \
4a9ee78a 894 file_utils.c file_utils.h \
59eac805 895 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
f575e7ef 896 initutils.c initutils.h \
07d1f84a 897 log.c log.h \
8c8cd087 898 lxclock.c lxclock.h \
8c8cd087 899 mainloop.c mainloop.h \
85b035a1 900 monitor.c monitor.h \
74ed30d7 901 mount_utils.c mount_utils.h \
9e20bf04 902 namespace.c namespace.h \
1d332c47
CB
903 network.c network.h \
904 nl.c nl.h \
a804cff7 905 parse.c parse.h \
92a10958 906 process_utils.c process_utils.h \
8c8cd087
CB
907 ringbuf.c ringbuf.h \
908 start.c start.h \
1bf5f812 909 state.c state.h \
2284f8a5
CB
910 storage/btrfs.c storage/btrfs.h \
911 storage/dir.c storage/dir.h \
912 storage/loop.c storage/loop.h \
913 storage/lvm.c storage/lvm.h \
914 storage/nbd.c storage/nbd.h \
915 storage/overlay.c storage/overlay.h \
916 storage/rbd.c storage/rbd.h \
917 storage/rsync.c storage/rsync.h \
918 storage/storage.c storage/storage.h \
919 storage/storage_utils.c storage/storage_utils.h \
920 storage/zfs.c storage/zfs.h \
bf1ca416 921 string_utils.c string_utils.h \
cd6b82e4 922 sync.c sync.h \
5f1b0986 923 terminal.c terminal.h \
78ad1eb0 924 utils.c utils.h \
ebbde173
CB
925 uuid.c uuid.h \
926 $(LSM_SOURCES)
d6e12907 927if ENABLE_SECCOMP
8e43f33e 928lxc_device_SOURCES += seccomp.c lxcseccomp.h
d6e12907 929endif
317410da
CB
930
931if !HAVE_STRCHRNUL
932lxc_device_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
933endif
646b75b5
CB
934
935if !HAVE_STRLCPY
936lxc_device_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
937endif
938
939if !HAVE_STRLCAT
940lxc_device_SOURCES += ../include/strlcat.c ../include/strlcat.h
941endif
942
943if !HAVE_OPENPTY
944lxc_device_SOURCES += ../include/openpty.c ../include/openpty.h
945endif
946
947if IS_BIONIC
948lxc_device_SOURCES += ../include/fexecve.c ../include/fexecve.h \
949 ../include/lxcmntent.c ../include/lxcmntent.h
950endif
951
952if !HAVE_GETGRGID_R
953lxc_device_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
954endif
955
956if !HAVE_PRLIMIT
957if HAVE_PRLIMIT64
958lxc_device_SOURCES += ../include/prlimit.c ../include/prlimit.h
959endif
960endif
d6e12907
CB
961endif
962
8e43f33e
CB
963lxc_execute_SOURCES = tools/lxc_execute.c \
964 tools/arguments.c tools/arguments.h
965
966if ENABLE_STATIC_BINARIES
967lxc_execute_SOURCES += $(liblxc_la_SOURCES)
968lxc_execute_LDFLAGS = -all-static -pthread
969else
970lxc_execute_SOURCES += af_unix.c af_unix.h \
971 caps.c caps.h \
972 cgroups/cgfsng.c \
973 cgroups/cgroup.c cgroups/cgroup.h \
974 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
975 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
976 commands.c commands.h \
977 commands_utils.c commands_utils.h \
978 conf.c conf.h \
979 confile.c confile.h \
980 confile_utils.c confile_utils.h \
981 error.c error.h \
982 file_utils.c file_utils.h \
983 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
984 initutils.c initutils.h \
985 log.c log.h \
986 lxclock.c lxclock.h \
987 mainloop.c mainloop.h \
988 monitor.c monitor.h \
74ed30d7 989 mount_utils.c mount_utils.h \
8e43f33e
CB
990 namespace.c namespace.h \
991 network.c network.h \
992 nl.c nl.h \
993 parse.c parse.h \
994 process_utils.c process_utils.h \
995 ringbuf.c ringbuf.h \
996 start.c start.h \
997 state.c state.h \
998 storage/btrfs.c storage/btrfs.h \
999 storage/dir.c storage/dir.h \
1000 storage/loop.c storage/loop.h \
1001 storage/lvm.c storage/lvm.h \
1002 storage/nbd.c storage/nbd.h \
1003 storage/overlay.c storage/overlay.h \
1004 storage/rbd.c storage/rbd.h \
1005 storage/rsync.c storage/rsync.h \
1006 storage/storage.c storage/storage.h \
1007 storage/storage_utils.c storage/storage_utils.h \
1008 storage/zfs.c storage/zfs.h \
1009 string_utils.c string_utils.h \
1010 sync.c sync.h \
1011 terminal.c terminal.h \
1012 utils.c utils.h \
1013 uuid.c uuid.h \
1014 $(LSM_SOURCES)
d6e12907 1015if ENABLE_SECCOMP
8e43f33e
CB
1016lxc_execute_SOURCES += seccomp.c lxcseccomp.h
1017endif
317410da
CB
1018
1019if !HAVE_STRCHRNUL
1020lxc_execute_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
1021endif
646b75b5
CB
1022
1023if !HAVE_STRLCPY
1024lxc_execute_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
1025endif
1026
1027if !HAVE_STRLCAT
1028lxc_execute_SOURCES += ../include/strlcat.c ../include/strlcat.h
1029endif
1030
1031if !HAVE_OPENPTY
1032lxc_execute_SOURCES += ../include/openpty.c ../include/openpty.h
1033endif
1034
1035if IS_BIONIC
1036lxc_execute_SOURCES += ../include/fexecve.c ../include/fexecve.h \
1037 ../include/lxcmntent.c ../include/lxcmntent.h
1038endif
1039
1040if !HAVE_GETGRGID_R
1041lxc_execute_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
1042endif
1043
1044if !HAVE_PRLIMIT
1045if HAVE_PRLIMIT64
1046lxc_execute_SOURCES += ../include/prlimit.c ../include/prlimit.h
1047endif
1048endif
d6e12907
CB
1049endif
1050
8e43f33e
CB
1051lxc_freeze_SOURCES = tools/lxc_freeze.c \
1052 tools/arguments.c tools/arguments.h
1053
1054if ENABLE_STATIC_BINARIES
1055lxc_freeze_SOURCES += $(liblxc_la_SOURCES)
1056lxc_freeze_LDFLAGS = -all-static -pthread
1057else
1058lxc_freeze_SOURCES += af_unix.c af_unix.h \
1059 caps.c caps.h \
1060 cgroups/cgfsng.c \
1061 cgroups/cgroup.c cgroups/cgroup.h \
1062 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
1063 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
1064 commands.c commands.h \
1065 commands_utils.c commands_utils.h \
1066 conf.c conf.h \
1067 confile.c confile.h \
1068 confile_utils.c confile_utils.h \
1069 error.c error.h \
1070 file_utils.c file_utils.h \
1071 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
1072 initutils.c initutils.h \
1073 log.c log.h \
1074 lxclock.c lxclock.h \
1075 mainloop.c mainloop.h \
1076 monitor.c monitor.h \
74ed30d7 1077 mount_utils.c mount_utils.h \
8e43f33e
CB
1078 namespace.c namespace.h \
1079 network.c network.h \
1080 nl.c nl.h \
1081 parse.c parse.h \
1082 process_utils.c process_utils.h \
1083 ringbuf.c ringbuf.h \
1084 start.c start.h \
1085 state.c state.h \
1086 storage/btrfs.c storage/btrfs.h \
1087 storage/dir.c storage/dir.h \
1088 storage/loop.c storage/loop.h \
1089 storage/lvm.c storage/lvm.h \
1090 storage/nbd.c storage/nbd.h \
1091 storage/overlay.c storage/overlay.h \
1092 storage/rbd.c storage/rbd.h \
1093 storage/rsync.c storage/rsync.h \
1094 storage/storage.c storage/storage.h \
1095 storage/storage_utils.c storage/storage_utils.h \
1096 storage/zfs.c storage/zfs.h \
1097 string_utils.c string_utils.h \
1098 sync.c sync.h \
1099 terminal.c terminal.h \
1100 utils.c utils.h \
1101 uuid.c uuid.h \
1102 $(LSM_SOURCES)
1103if ENABLE_SECCOMP
1104lxc_freeze_SOURCES += seccomp.c lxcseccomp.h
1105endif
317410da
CB
1106
1107if !HAVE_STRCHRNUL
1108lxc_freeze_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
1109endif
646b75b5
CB
1110
1111if !HAVE_STRLCPY
1112lxc_freeze_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
1113endif
1114
1115if !HAVE_STRLCAT
1116lxc_freeze_SOURCES += ../include/strlcat.c ../include/strlcat.h
1117endif
1118
1119if !HAVE_OPENPTY
1120lxc_freeze_SOURCES += ../include/openpty.c ../include/openpty.h
1121endif
1122
1123if IS_BIONIC
1124lxc_freeze_SOURCES += ../include/fexecve.c ../include/fexecve.h \
1125 ../include/lxcmntent.c ../include/lxcmntent.h
1126endif
1127
1128if !HAVE_GETGRGID_R
1129lxc_freeze_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
1130endif
1131
1132if !HAVE_PRLIMIT
1133if HAVE_PRLIMIT64
1134lxc_freeze_SOURCES += ../include/prlimit.c ../include/prlimit.h
1135endif
1136endif
8e43f33e
CB
1137endif
1138
1139lxc_info_SOURCES = tools/lxc_info.c \
1140 tools/arguments.c tools/arguments.h
1141
1142if ENABLE_STATIC_BINARIES
1143lxc_info_SOURCES += $(liblxc_la_SOURCES)
1144lxc_info_LDFLAGS = -all-static -pthread
1145else
1146lxc_info_SOURCES += af_unix.c af_unix.h \
0550496b 1147 caps.c caps.h \
59eac805 1148 cgroups/cgfsng.c \
c332ec90
CB
1149 cgroups/cgroup.c cgroups/cgroup.h \
1150 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
1151 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
8c8cd087
CB
1152 commands.c commands.h \
1153 commands_utils.c commands_utils.h \
efb7e304 1154 conf.c conf.h \
63c2a0bf 1155 confile.c confile.h \
f64e249d 1156 confile_utils.c confile_utils.h \
8c8cd087 1157 error.c error.h \
4a9ee78a 1158 file_utils.c file_utils.h \
59eac805 1159 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
f575e7ef 1160 initutils.c initutils.h \
07d1f84a 1161 log.c log.h \
8c8cd087
CB
1162 lxclock.c lxclock.h \
1163 mainloop.c mainloop.h \
1164 monitor.c monitor.h \
74ed30d7 1165 mount_utils.c mount_utils.h \
9e20bf04 1166 namespace.c namespace.h \
1d332c47
CB
1167 network.c network.h \
1168 nl.c nl.h \
a804cff7 1169 parse.c parse.h \
92a10958 1170 process_utils.c process_utils.h \
8c8cd087
CB
1171 ringbuf.c ringbuf.h \
1172 start.c start.h \
1bf5f812 1173 state.c state.h \
2284f8a5
CB
1174 storage/btrfs.c storage/btrfs.h \
1175 storage/dir.c storage/dir.h \
1176 storage/loop.c storage/loop.h \
1177 storage/lvm.c storage/lvm.h \
1178 storage/nbd.c storage/nbd.h \
1179 storage/overlay.c storage/overlay.h \
1180 storage/rbd.c storage/rbd.h \
1181 storage/rsync.c storage/rsync.h \
1182 storage/storage.c storage/storage.h \
1183 storage/storage_utils.c storage/storage_utils.h \
1184 storage/zfs.c storage/zfs.h \
bf1ca416 1185 string_utils.c string_utils.h \
cd6b82e4 1186 sync.c sync.h \
5f1b0986 1187 terminal.c terminal.h \
78ad1eb0 1188 utils.c utils.h \
ebbde173
CB
1189 uuid.c uuid.h \
1190 $(LSM_SOURCES)
d6e12907 1191if ENABLE_SECCOMP
8e43f33e
CB
1192lxc_info_SOURCES += seccomp.c lxcseccomp.h
1193endif
317410da
CB
1194
1195if !HAVE_STRCHRNUL
1196lxc_info_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
1197endif
646b75b5
CB
1198
1199if !HAVE_STRLCPY
1200lxc_info_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
1201endif
1202
1203if !HAVE_STRLCAT
1204lxc_info_SOURCES += ../include/strlcat.c ../include/strlcat.h
1205endif
1206
1207if !HAVE_OPENPTY
1208lxc_info_SOURCES += ../include/openpty.c ../include/openpty.h
1209endif
1210
1211if IS_BIONIC
1212lxc_info_SOURCES += ../include/fexecve.c ../include/fexecve.h \
1213 ../include/lxcmntent.c ../include/lxcmntent.h
1214endif
1215
1216if !HAVE_GETGRGID_R
1217lxc_info_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
1218endif
1219
1220if !HAVE_PRLIMIT
1221if HAVE_PRLIMIT64
1222lxc_info_SOURCES += ../include/prlimit.c ../include/prlimit.h
1223endif
1224endif
d6e12907
CB
1225endif
1226
8e43f33e
CB
1227lxc_monitor_SOURCES = tools/lxc_monitor.c \
1228 tools/arguments.c tools/arguments.h
1229
1230if ENABLE_STATIC_BINARIES
1231lxc_monitor_SOURCES += $(liblxc_la_SOURCES)
1232lxc_monitor_LDFLAGS = -all-static -pthread
1233else
1234lxc_monitor_SOURCES += af_unix.c af_unix.h \
1235 caps.c caps.h \
1236 cgroups/cgfsng.c \
1237 cgroups/cgroup.c cgroups/cgroup.h \
1238 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
1239 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
1240 commands.c commands.h \
1241 commands_utils.c commands_utils.h \
1242 conf.c conf.h \
1243 confile.c confile.h \
1244 confile_utils.c confile_utils.h \
1245 error.c error.h \
1246 file_utils.c file_utils.h \
1247 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
1248 initutils.c initutils.h \
1249 log.c log.h \
1250 lxclock.c lxclock.h \
1251 macro.h \
1252 mainloop.c mainloop.h \
1253 monitor.c monitor.h \
74ed30d7 1254 mount_utils.c mount_utils.h \
8e43f33e
CB
1255 namespace.c namespace.h \
1256 network.c network.h \
1257 nl.c nl.h \
1258 parse.c parse.h \
1259 process_utils.c process_utils.h \
1260 ringbuf.c ringbuf.h \
1261 start.c start.h \
1262 state.c state.h \
1263 storage/btrfs.c storage/btrfs.h \
1264 storage/dir.c storage/dir.h \
1265 storage/loop.c storage/loop.h \
1266 storage/lvm.c storage/lvm.h \
1267 storage/nbd.c storage/nbd.h \
1268 storage/overlay.c storage/overlay.h \
1269 storage/rbd.c storage/rbd.h \
1270 storage/rsync.c storage/rsync.h \
1271 storage/storage.c storage/storage.h \
1272 storage/storage_utils.c storage/storage_utils.h \
1273 storage/zfs.c storage/zfs.h \
1274 string_utils.c string_utils.h \
1275 sync.c sync.h \
1276 terminal.c terminal.h \
1277 utils.c utils.h \
1278 uuid.c uuid.h \
1279 $(LSM_SOURCES)
d6e12907 1280if ENABLE_SECCOMP
8e43f33e
CB
1281lxc_monitor_SOURCES += seccomp.c lxcseccomp.h
1282endif
317410da
CB
1283
1284if !HAVE_STRCHRNUL
1285lxc_monitor_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
1286endif
646b75b5
CB
1287
1288if !HAVE_STRLCPY
1289lxc_monitor_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
1290endif
1291
1292if !HAVE_STRLCAT
1293lxc_monitor_SOURCES += ../include/strlcat.c ../include/strlcat.h
1294endif
1295
1296if !HAVE_OPENPTY
1297lxc_monitor_SOURCES += ../include/openpty.c ../include/openpty.h
1298endif
1299
1300if IS_BIONIC
1301lxc_monitor_SOURCES += ../include/fexecve.c ../include/fexecve.h \
1302 ../include/lxcmntent.c ../include/lxcmntent.h
1303endif
1304
1305if !HAVE_GETGRGID_R
1306lxc_monitor_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
1307endif
1308
1309if !HAVE_PRLIMIT
1310if HAVE_PRLIMIT64
1311lxc_monitor_SOURCES += ../include/prlimit.c ../include/prlimit.h
1312endif
1313endif
d6e12907
CB
1314endif
1315
8e43f33e
CB
1316lxc_ls_SOURCES = tools/lxc_ls.c \
1317 tools/arguments.c tools/arguments.h
1318
1319if ENABLE_STATIC_BINARIES
1320lxc_ls_SOURCES += $(liblxc_la_SOURCES)
1321lxc_ls_LDFLAGS = -all-static -pthread
1322else
1323lxc_ls_SOURCES += af_unix.c af_unix.h \
efb7e304 1324 caps.c caps.h \
59eac805 1325 cgroups/cgfsng.c \
c332ec90
CB
1326 cgroups/cgroup.c cgroups/cgroup.h \
1327 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
1328 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
8c8cd087
CB
1329 commands.c commands.h \
1330 commands_utils.c commands_utils.h \
efb7e304 1331 conf.c conf.h \
63c2a0bf 1332 confile.c confile.h \
f64e249d 1333 confile_utils.c confile_utils.h \
8c8cd087 1334 error.c error.h \
4a9ee78a 1335 file_utils.c file_utils.h \
59eac805 1336 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
f575e7ef 1337 initutils.c initutils.h \
07d1f84a 1338 log.c log.h \
8c8cd087 1339 lxclock.c lxclock.h \
d50aa57f 1340 mainloop.c mainloop.h \
8e43f33e 1341 memory_utils.h \
8c8cd087 1342 monitor.c monitor.h \
74ed30d7 1343 mount_utils.c mount_utils.h \
9e20bf04 1344 namespace.c namespace.h \
1d332c47
CB
1345 network.c network.h \
1346 nl.c nl.h \
a804cff7 1347 parse.c parse.h \
92a10958 1348 process_utils.c process_utils.h \
8c8cd087
CB
1349 ringbuf.c ringbuf.h \
1350 start.c start.h \
1bf5f812 1351 state.c state.h \
2284f8a5
CB
1352 storage/btrfs.c storage/btrfs.h \
1353 storage/dir.c storage/dir.h \
1354 storage/loop.c storage/loop.h \
1355 storage/lvm.c storage/lvm.h \
1356 storage/nbd.c storage/nbd.h \
1357 storage/overlay.c storage/overlay.h \
1358 storage/rbd.c storage/rbd.h \
1359 storage/rsync.c storage/rsync.h \
1360 storage/storage.c storage/storage.h \
1361 storage/storage_utils.c storage/storage_utils.h \
1362 storage/zfs.c storage/zfs.h \
bf1ca416 1363 string_utils.c string_utils.h \
cd6b82e4 1364 sync.c sync.h \
5f1b0986 1365 terminal.c terminal.h \
78ad1eb0 1366 utils.c utils.h \
ebbde173
CB
1367 uuid.c uuid.h \
1368 $(LSM_SOURCES)
d6e12907 1369if ENABLE_SECCOMP
8e43f33e
CB
1370lxc_ls_SOURCES += seccomp.c lxcseccomp.h
1371endif
317410da
CB
1372
1373if !HAVE_STRCHRNUL
1374lxc_ls_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
1375endif
646b75b5
CB
1376
1377if !HAVE_STRLCPY
1378lxc_ls_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
1379endif
1380
1381if !HAVE_STRLCAT
1382lxc_ls_SOURCES += ../include/strlcat.c ../include/strlcat.h
1383endif
1384
1385if !HAVE_OPENPTY
1386lxc_ls_SOURCES += ../include/openpty.c ../include/openpty.h
1387endif
1388
1389if IS_BIONIC
1390lxc_ls_SOURCES += ../include/fexecve.c ../include/fexecve.h \
1391 ../include/lxcmntent.c ../include/lxcmntent.h
1392endif
1393
1394if !HAVE_GETGRGID_R
1395lxc_ls_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
1396endif
1397
1398if !HAVE_PRLIMIT
1399if HAVE_PRLIMIT64
1400lxc_ls_SOURCES += ../include/prlimit.c ../include/prlimit.h
1401endif
1402endif
d6e12907
CB
1403endif
1404
8e43f33e
CB
1405lxc_copy_SOURCES = tools/lxc_copy.c \
1406 tools/arguments.c tools/arguments.h
1407
1408if ENABLE_STATIC_BINARIES
1409lxc_copy_SOURCES += $(liblxc_la_SOURCES)
1410lxc_copy_LDFLAGS = -all-static -pthread
1411else
1412lxc_copy_SOURCES += af_unix.c af_unix.h \
1413 caps.c caps.h \
1414 cgroups/cgfsng.c \
1415 cgroups/cgroup.c cgroups/cgroup.h \
1416 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
1417 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
1418 commands.c commands.h \
1419 commands_utils.c commands_utils.h \
1420 conf.c conf.h \
1421 confile.c confile.h \
1422 confile_utils.c confile_utils.h \
1423 error.c error.h \
1424 file_utils.c file_utils.h \
1425 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
1426 initutils.c initutils.h \
1427 log.c log.h \
1428 lxclock.c lxclock.h \
1429 mainloop.c mainloop.h \
1430 monitor.c monitor.h \
74ed30d7 1431 mount_utils.c mount_utils.h \
8e43f33e
CB
1432 namespace.c namespace.h \
1433 network.c network.h \
1434 nl.c nl.h \
1435 parse.c parse.h \
1436 process_utils.c process_utils.h \
1437 ringbuf.c ringbuf.h \
1438 start.c start.h \
1439 state.c state.h \
1440 storage/btrfs.c storage/btrfs.h \
1441 storage/dir.c storage/dir.h \
1442 storage/loop.c storage/loop.h \
1443 storage/lvm.c storage/lvm.h \
1444 storage/nbd.c storage/nbd.h \
1445 storage/overlay.c storage/overlay.h \
1446 storage/rbd.c storage/rbd.h \
1447 storage/rsync.c storage/rsync.h \
1448 storage/storage.c storage/storage.h \
1449 storage/storage_utils.c storage/storage_utils.h \
1450 storage/zfs.c storage/zfs.h \
1451 string_utils.c string_utils.h \
1452 sync.c sync.h \
1453 terminal.c terminal.h \
1454 utils.c utils.h \
1455 uuid.c uuid.h \
1456 $(LSM_SOURCES)
1457if ENABLE_SECCOMP
1458lxc_copy_SOURCES += seccomp.c lxcseccomp.h
1459endif
317410da
CB
1460
1461if !HAVE_STRCHRNUL
1462lxc_copy_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
1463endif
646b75b5
CB
1464
1465if !HAVE_STRLCPY
1466lxc_copy_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
1467endif
1468
1469if !HAVE_STRLCAT
1470lxc_copy_SOURCES += ../include/strlcat.c ../include/strlcat.h
1471endif
1472
1473if !HAVE_OPENPTY
1474lxc_copy_SOURCES += ../include/openpty.c ../include/openpty.h
1475endif
1476
1477if IS_BIONIC
1478lxc_copy_SOURCES += ../include/fexecve.c ../include/fexecve.h \
1479 ../include/lxcmntent.c ../include/lxcmntent.h
1480endif
1481
1482if !HAVE_GETGRGID_R
1483lxc_copy_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
1484endif
1485
1486if !HAVE_PRLIMIT
1487if HAVE_PRLIMIT64
1488lxc_copy_SOURCES += ../include/prlimit.c ../include/prlimit.h
1489endif
1490endif
8e43f33e
CB
1491endif
1492
1493lxc_start_SOURCES = tools/lxc_start.c \
1494 tools/arguments.c tools/arguments.h
1495
1496if ENABLE_STATIC_BINARIES
1497lxc_start_SOURCES += $(liblxc_la_SOURCES)
1498lxc_start_LDFLAGS = -all-static -pthread
1499else
1500lxc_start_SOURCES += af_unix.c af_unix.h \
1501 caps.c caps.h \
1502 cgroups/cgfsng.c \
1503 cgroups/cgroup.c cgroups/cgroup.h \
1504 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
1505 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
1506 commands.c commands.h \
1507 commands_utils.c commands_utils.h \
1508 conf.c conf.h \
1509 confile.c confile.h \
1510 confile_utils.c confile_utils.h \
1511 error.c error.h \
1512 file_utils.c file_utils.h \
1513 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
1514 initutils.c initutils.h \
1515 log.c log.h \
1516 lxclock.c lxclock.h \
1517 mainloop.c mainloop.h \
1518 monitor.c monitor.h \
74ed30d7 1519 mount_utils.c mount_utils.h \
8e43f33e
CB
1520 namespace.c namespace.h \
1521 network.c network.h \
1522 nl.c nl.h \
1523 parse.c parse.h \
1524 process_utils.c process_utils.h \
1525 ringbuf.c ringbuf.h \
1526 start.c start.h \
1527 state.c state.h \
1528 storage/btrfs.c storage/btrfs.h \
1529 storage/dir.c storage/dir.h \
1530 storage/loop.c storage/loop.h \
1531 storage/lvm.c storage/lvm.h \
1532 storage/nbd.c storage/nbd.h \
1533 storage/overlay.c storage/overlay.h \
1534 storage/rbd.c storage/rbd.h \
1535 storage/rsync.c storage/rsync.h \
1536 storage/storage.c storage/storage.h \
1537 storage/storage_utils.c storage/storage_utils.h \
1538 storage/zfs.c storage/zfs.h \
1539 string_utils.c string_utils.h \
1540 sync.c sync.h \
1541 terminal.c terminal.h \
1542 utils.c utils.h \
1543 uuid.c uuid.h \
1544 $(LSM_SOURCES)
1545if ENABLE_SECCOMP
1546lxc_start_SOURCES += seccomp.c lxcseccomp.h
1547endif
317410da
CB
1548
1549if !HAVE_STRCHRNUL
1550lxc_start_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
1551endif
646b75b5
CB
1552
1553if !HAVE_STRLCPY
1554lxc_start_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
1555endif
1556
1557if !HAVE_STRLCAT
1558lxc_start_SOURCES += ../include/strlcat.c ../include/strlcat.h
1559endif
1560
1561if !HAVE_OPENPTY
1562lxc_start_SOURCES += ../include/openpty.c ../include/openpty.h
1563endif
1564
1565if IS_BIONIC
1566lxc_start_SOURCES += ../include/fexecve.c ../include/fexecve.h \
1567 ../include/lxcmntent.c ../include/lxcmntent.h
1568endif
1569
1570if !HAVE_GETGRGID_R
1571lxc_start_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
1572endif
1573
1574if !HAVE_PRLIMIT
1575if HAVE_PRLIMIT64
1576lxc_start_SOURCES += ../include/prlimit.c ../include/prlimit.h
1577endif
1578endif
8e43f33e
CB
1579endif
1580
1581lxc_stop_SOURCES = tools/lxc_stop.c \
1582 tools/arguments.c tools/arguments.h
1583
1584if ENABLE_STATIC_BINARIES
1585lxc_stop_SOURCES += $(liblxc_la_SOURCES)
1586lxc_stop_LDFLAGS = -all-static -pthread
1587else
1588lxc_stop_SOURCES += af_unix.c af_unix.h \
1589 caps.c caps.h \
1590 cgroups/cgfsng.c \
1591 cgroups/cgroup.c cgroups/cgroup.h \
1592 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
1593 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
1594 commands.c commands.h \
1595 commands_utils.c commands_utils.h \
1596 conf.c conf.h \
1597 confile.c confile.h \
1598 confile_utils.c confile_utils.h \
1599 error.c error.h \
1600 file_utils.c file_utils.h \
1601 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
1602 initutils.c initutils.h \
1603 log.c log.h \
1604 lxclock.c lxclock.h \
1605 mainloop.c mainloop.h \
1606 monitor.c monitor.h \
74ed30d7 1607 mount_utils.c mount_utils.h \
8e43f33e
CB
1608 namespace.c namespace.h \
1609 network.c network.h \
1610 nl.c nl.h \
1611 parse.c parse.h \
1612 process_utils.c process_utils.h \
1613 ringbuf.c ringbuf.h \
1614 start.c start.h \
1615 state.c state.h \
1616 storage/btrfs.c storage/btrfs.h \
1617 storage/dir.c storage/dir.h \
1618 storage/loop.c storage/loop.h \
1619 storage/lvm.c storage/lvm.h \
1620 storage/nbd.c storage/nbd.h \
1621 storage/overlay.c storage/overlay.h \
1622 storage/rbd.c storage/rbd.h \
1623 storage/rsync.c storage/rsync.h \
1624 storage/storage.c storage/storage.h \
1625 storage/storage_utils.c storage/storage_utils.h \
1626 storage/zfs.c storage/zfs.h \
1627 string_utils.c string_utils.h \
1628 sync.c sync.h \
1629 terminal.c terminal.h \
1630 utils.c utils.h \
1631 uuid.c uuid.h \
1632 $(LSM_SOURCES)
1633if ENABLE_SECCOMP
1634lxc_stop_SOURCES += seccomp.c lxcseccomp.h
1635endif
317410da
CB
1636
1637if !HAVE_STRCHRNUL
1638lxc_stop_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
1639endif
646b75b5
CB
1640
1641if !HAVE_STRLCPY
1642lxc_stop_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
1643endif
1644
1645if !HAVE_STRLCAT
1646lxc_stop_SOURCES += ../include/strlcat.c ../include/strlcat.h
1647endif
1648
1649if !HAVE_OPENPTY
1650lxc_stop_SOURCES += ../include/openpty.c ../include/openpty.h
1651endif
1652
1653if IS_BIONIC
1654lxc_stop_SOURCES += ../include/fexecve.c ../include/fexecve.h \
1655 ../include/lxcmntent.c ../include/lxcmntent.h
1656endif
1657
1658if !HAVE_GETGRGID_R
1659lxc_stop_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
1660endif
1661
1662if !HAVE_PRLIMIT
1663if HAVE_PRLIMIT64
1664lxc_stop_SOURCES += ../include/prlimit.c ../include/prlimit.h
1665endif
1666endif
8e43f33e
CB
1667endif
1668
1669lxc_top_SOURCES = tools/lxc_top.c \
1670 tools/arguments.c tools/arguments.h
1671
1672if ENABLE_STATIC_BINARIES
1673lxc_top_SOURCES += $(liblxc_la_SOURCES)
1674lxc_top_LDFLAGS = -all-static -pthread
1675else
1676lxc_top_SOURCES += af_unix.c af_unix.h \
1677 caps.c caps.h \
1678 cgroups/cgfsng.c \
1679 cgroups/cgroup.c cgroups/cgroup.h \
1680 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
1681 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
1682 commands.c commands.h \
1683 commands_utils.c commands_utils.h \
1684 conf.c conf.h \
1685 confile.c confile.h \
1686 confile_utils.c confile_utils.h \
1687 error.c error.h \
1688 file_utils.c file_utils.h \
1689 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
1690 initutils.c initutils.h \
1691 log.c log.h \
1692 lxclock.c lxclock.h \
1693 mainloop.c mainloop.h \
1694 monitor.c monitor.h \
74ed30d7 1695 mount_utils.c mount_utils.h \
8e43f33e
CB
1696 namespace.c namespace.h \
1697 network.c network.h \
1698 nl.c nl.h \
1699 parse.c parse.h \
1700 process_utils.c process_utils.h \
1701 ringbuf.c ringbuf.h \
1702 start.c start.h \
1703 state.c state.h \
1704 storage/btrfs.c storage/btrfs.h \
1705 storage/dir.c storage/dir.h \
1706 storage/loop.c storage/loop.h \
1707 storage/lvm.c storage/lvm.h \
1708 storage/nbd.c storage/nbd.h \
1709 storage/overlay.c storage/overlay.h \
1710 storage/rbd.c storage/rbd.h \
1711 storage/rsync.c storage/rsync.h \
1712 storage/storage.c storage/storage.h \
1713 storage/storage_utils.c storage/storage_utils.h \
1714 storage/zfs.c storage/zfs.h \
1715 string_utils.c string_utils.h \
1716 sync.c sync.h \
1717 terminal.c terminal.h \
1718 utils.c utils.h \
1719 uuid.c uuid.h \
1720 $(LSM_SOURCES)
1721if ENABLE_SECCOMP
1722lxc_top_SOURCES += seccomp.c lxcseccomp.h
1723endif
317410da
CB
1724
1725if !HAVE_STRCHRNUL
1726lxc_top_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
1727endif
646b75b5
CB
1728
1729if !HAVE_STRLCPY
1730lxc_top_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
1731endif
1732
1733if !HAVE_STRLCAT
1734lxc_top_SOURCES += ../include/strlcat.c ../include/strlcat.h
1735endif
1736
1737if !HAVE_OPENPTY
1738lxc_top_SOURCES += ../include/openpty.c ../include/openpty.h
1739endif
1740
1741if IS_BIONIC
1742lxc_top_SOURCES += ../include/fexecve.c ../include/fexecve.h \
1743 ../include/lxcmntent.c ../include/lxcmntent.h
1744endif
1745
1746if !HAVE_GETGRGID_R
1747lxc_top_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
1748endif
1749
1750if !HAVE_PRLIMIT
1751if HAVE_PRLIMIT64
1752lxc_top_SOURCES += ../include/prlimit.c ../include/prlimit.h
1753endif
1754endif
8e43f33e
CB
1755endif
1756
1757lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
1758 tools/arguments.c tools/arguments.h
1759
1760if ENABLE_STATIC_BINARIES
1761lxc_unfreeze_SOURCES += $(liblxc_la_SOURCES)
1762lxc_unfreeze_LDFLAGS = -all-static -pthread
1763else
1764lxc_unfreeze_SOURCES += af_unix.c af_unix.h \
1765 caps.c caps.h \
1766 cgroups/cgfsng.c \
1767 cgroups/cgroup.c cgroups/cgroup.h \
1768 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
1769 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
1770 commands.c commands.h \
1771 commands_utils.c commands_utils.h \
1772 conf.c conf.h \
1773 confile.c confile.h \
1774 confile_utils.c confile_utils.h \
1775 error.c error.h \
1776 file_utils.c file_utils.h \
1777 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
1778 initutils.c initutils.h \
1779 log.c log.h \
1780 lxclock.c lxclock.h \
1781 mainloop.c mainloop.h \
1782 monitor.c monitor.h \
74ed30d7 1783 mount_utils.c mount_utils.h \
8e43f33e
CB
1784 namespace.c namespace.h \
1785 network.c network.h \
1786 nl.c nl.h \
1787 parse.c parse.h \
1788 process_utils.c process_utils.h \
1789 ringbuf.c ringbuf.h \
1790 start.c start.h \
1791 state.c state.h \
1792 storage/btrfs.c storage/btrfs.h \
1793 storage/dir.c storage/dir.h \
1794 storage/loop.c storage/loop.h \
1795 storage/lvm.c storage/lvm.h \
1796 storage/nbd.c storage/nbd.h \
1797 storage/overlay.c storage/overlay.h \
1798 storage/rbd.c storage/rbd.h \
1799 storage/rsync.c storage/rsync.h \
1800 storage/storage.c storage/storage.h \
1801 storage/storage_utils.c storage/storage_utils.h \
1802 storage/zfs.c storage/zfs.h \
1803 string_utils.c string_utils.h \
1804 sync.c sync.h \
1805 terminal.c terminal.h \
1806 utils.c utils.h \
1807 uuid.c uuid.h \
1808 $(LSM_SOURCES)
1809if ENABLE_SECCOMP
1810lxc_unfreeze_SOURCES += seccomp.c lxcseccomp.h
1811endif
317410da
CB
1812
1813if !HAVE_STRCHRNUL
1814lxc_unfreeze_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
1815endif
646b75b5
CB
1816
1817if !HAVE_STRLCPY
1818lxc_unfreeze_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
1819endif
1820
1821if !HAVE_STRLCAT
1822lxc_unfreeze_SOURCES += ../include/strlcat.c ../include/strlcat.h
1823endif
1824
1825if !HAVE_OPENPTY
1826lxc_unfreeze_SOURCES += ../include/openpty.c ../include/openpty.h
1827endif
1828
1829if IS_BIONIC
1830lxc_unfreeze_SOURCES += ../include/fexecve.c ../include/fexecve.h \
1831 ../include/lxcmntent.c ../include/lxcmntent.h
1832endif
1833
1834if !HAVE_GETGRGID_R
1835lxc_unfreeze_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
1836endif
1837
1838if !HAVE_PRLIMIT
1839if HAVE_PRLIMIT64
1840lxc_unfreeze_SOURCES += ../include/prlimit.c ../include/prlimit.h
1841endif
1842endif
8e43f33e
CB
1843endif
1844
1845lxc_unshare_SOURCES = tools/lxc_unshare.c \
1846 tools/arguments.c tools/arguments.h
1847
1848if ENABLE_STATIC_BINARIES
1849lxc_unshare_SOURCES += $(liblxc_la_SOURCES)
1850lxc_unshare_LDFLAGS = -all-static -pthread
1851else
1852lxc_unshare_SOURCES += af_unix.c af_unix.h \
1853 caps.c caps.h \
1854 cgroups/cgfsng.c \
1855 cgroups/cgroup.c cgroups/cgroup.h \
1856 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
1857 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
1858 commands.c commands.h \
1859 commands_utils.c commands_utils.h \
1860 conf.c conf.h \
1861 confile.c confile.h \
f64e249d 1862 confile_utils.c confile_utils.h \
8c8cd087 1863 error.c error.h \
4a9ee78a 1864 file_utils.c file_utils.h \
59eac805 1865 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
f575e7ef 1866 initutils.c initutils.h \
07d1f84a 1867 log.c log.h \
8c8cd087
CB
1868 lxclock.c lxclock.h \
1869 mainloop.c mainloop.h \
1870 monitor.c monitor.h \
74ed30d7 1871 mount_utils.c mount_utils.h \
9e20bf04 1872 namespace.c namespace.h \
1d332c47
CB
1873 network.c network.h \
1874 nl.c nl.h \
a804cff7 1875 parse.c parse.h \
92a10958 1876 process_utils.c process_utils.h \
8c8cd087
CB
1877 ringbuf.c ringbuf.h \
1878 start.c start.h \
1bf5f812 1879 state.c state.h \
2284f8a5
CB
1880 storage/btrfs.c storage/btrfs.h \
1881 storage/dir.c storage/dir.h \
1882 storage/loop.c storage/loop.h \
1883 storage/lvm.c storage/lvm.h \
1884 storage/nbd.c storage/nbd.h \
1885 storage/overlay.c storage/overlay.h \
1886 storage/rbd.c storage/rbd.h \
1887 storage/rsync.c storage/rsync.h \
1888 storage/storage.c storage/storage.h \
1889 storage/storage_utils.c storage/storage_utils.h \
1890 storage/zfs.c storage/zfs.h \
bf1ca416 1891 string_utils.c string_utils.h \
cd6b82e4 1892 sync.c sync.h \
8e43f33e
CB
1893 syscall_numbers.h \
1894 syscall_wrappers.h \
5f1b0986 1895 terminal.c terminal.h \
78ad1eb0 1896 utils.c utils.h \
ebbde173
CB
1897 uuid.c uuid.h \
1898 $(LSM_SOURCES)
d6e12907 1899if ENABLE_SECCOMP
8e43f33e
CB
1900lxc_unshare_SOURCES += seccomp.c lxcseccomp.h
1901endif
317410da
CB
1902
1903if !HAVE_STRCHRNUL
1904lxc_unshare_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
1905endif
646b75b5
CB
1906
1907if !HAVE_STRLCPY
1908lxc_unshare_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
1909endif
1910
1911if !HAVE_STRLCAT
1912lxc_unshare_SOURCES += ../include/strlcat.c ../include/strlcat.h
1913endif
1914
1915if !HAVE_OPENPTY
1916lxc_unshare_SOURCES += ../include/openpty.c ../include/openpty.h
1917endif
1918
1919if IS_BIONIC
1920lxc_unshare_SOURCES += ../include/fexecve.c ../include/fexecve.h \
1921 ../include/lxcmntent.c ../include/lxcmntent.h
1922endif
1923
1924if !HAVE_GETGRGID_R
1925lxc_unshare_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
1926endif
1927
1928if !HAVE_PRLIMIT
1929if HAVE_PRLIMIT64
1930lxc_unshare_SOURCES += ../include/prlimit.c ../include/prlimit.h
1931endif
1932endif
8e43f33e
CB
1933endif
1934
1935lxc_wait_SOURCES = tools/lxc_wait.c \
1936 tools/arguments.c tools/arguments.h
1937
1938if ENABLE_STATIC_BINARIES
1939lxc_wait_SOURCES += $(liblxc_la_SOURCES)
1940lxc_wait_LDFLAGS = -all-static -pthread
1941else
1942lxc_wait_SOURCES += af_unix.c af_unix.h \
1943 caps.c caps.h \
1944 cgroups/cgfsng.c \
1945 cgroups/cgroup.c cgroups/cgroup.h \
1946 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
1947 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
1948 commands.c commands.h \
1949 commands_utils.c commands_utils.h \
1950 conf.c conf.h \
1951 confile.c confile.h \
1952 confile_utils.c confile_utils.h \
1953 error.c error.h \
1954 file_utils.c file_utils.h \
1955 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
1956 initutils.c initutils.h \
1957 log.c log.h \
1958 lxclock.c lxclock.h \
1959 mainloop.c mainloop.h \
1960 monitor.c monitor.h \
74ed30d7 1961 mount_utils.c mount_utils.h \
8e43f33e
CB
1962 namespace.c namespace.h \
1963 network.c network.h \
1964 nl.c nl.h \
1965 parse.c parse.h \
1966 process_utils.c process_utils.h \
1967 ringbuf.c ringbuf.h \
1968 start.c start.h \
1969 state.c state.h \
1970 storage/btrfs.c storage/btrfs.h \
1971 storage/dir.c storage/dir.h \
1972 storage/loop.c storage/loop.h \
1973 storage/lvm.c storage/lvm.h \
1974 storage/nbd.c storage/nbd.h \
1975 storage/overlay.c storage/overlay.h \
1976 storage/rbd.c storage/rbd.h \
1977 storage/rsync.c storage/rsync.h \
1978 storage/storage.c storage/storage.h \
1979 storage/storage_utils.c storage/storage_utils.h \
1980 storage/zfs.c storage/zfs.h \
1981 string_utils.c string_utils.h \
1982 sync.c sync.h \
1983 terminal.c terminal.h \
1984 utils.c utils.h \
1985 uuid.c uuid.h \
1986 $(LSM_SOURCES)
1987if ENABLE_SECCOMP
1988lxc_wait_SOURCES += seccomp.c lxcseccomp.h
1989endif
317410da
CB
1990
1991if !HAVE_STRCHRNUL
1992lxc_wait_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
1993endif
646b75b5
CB
1994
1995if !HAVE_STRLCPY
1996lxc_wait_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
1997endif
1998
1999if !HAVE_STRLCAT
2000lxc_wait_SOURCES += ../include/strlcat.c ../include/strlcat.h
2001endif
2002
2003if !HAVE_OPENPTY
2004lxc_wait_SOURCES += ../include/openpty.c ../include/openpty.h
2005endif
2006
2007if IS_BIONIC
2008lxc_wait_SOURCES += ../include/fexecve.c ../include/fexecve.h \
2009 ../include/lxcmntent.c ../include/lxcmntent.h
2010endif
2011
2012if !HAVE_GETGRGID_R
2013lxc_wait_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
2014endif
2015
2016if !HAVE_PRLIMIT
2017if HAVE_PRLIMIT64
2018lxc_wait_SOURCES += ../include/prlimit.c ../include/prlimit.h
2019endif
2020endif
d6e12907
CB
2021endif
2022
8e43f33e
CB
2023lxc_create_SOURCES = tools/lxc_create.c \
2024 tools/arguments.c tools/arguments.h
2025
2026if ENABLE_STATIC_BINARIES
2027lxc_create_SOURCES += $(liblxc_la_SOURCES)
2028lxc_create_LDFLAGS = -all-static -pthread
2029else
2030lxc_create_SOURCES += af_unix.c af_unix.h \
0550496b 2031 caps.c caps.h \
59eac805 2032 cgroups/cgfsng.c \
c332ec90
CB
2033 cgroups/cgroup.c cgroups/cgroup.h \
2034 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
2035 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
8c8cd087
CB
2036 commands.c commands.h \
2037 commands_utils.c commands_utils.h \
efb7e304 2038 conf.c conf.h \
63c2a0bf 2039 confile.c confile.h \
f64e249d 2040 confile_utils.c confile_utils.h \
8c8cd087 2041 error.c error.h \
4a9ee78a 2042 file_utils.c file_utils.h \
59eac805 2043 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
f575e7ef 2044 initutils.c initutils.h \
07d1f84a 2045 log.c log.h \
8c8cd087
CB
2046 lxclock.c lxclock.h \
2047 mainloop.c mainloop.h \
2048 monitor.c monitor.h \
74ed30d7 2049 mount_utils.c mount_utils.h \
9e20bf04 2050 namespace.c namespace.h \
1d332c47
CB
2051 network.c network.h \
2052 nl.c nl.h \
a804cff7 2053 parse.c parse.h \
92a10958 2054 process_utils.c process_utils.h \
8c8cd087
CB
2055 ringbuf.c ringbuf.h \
2056 start.c start.h \
1bf5f812 2057 state.c state.h \
2284f8a5
CB
2058 storage/btrfs.c storage/btrfs.h \
2059 storage/dir.c storage/dir.h \
2060 storage/loop.c storage/loop.h \
2061 storage/lvm.c storage/lvm.h \
2062 storage/nbd.c storage/nbd.h \
2063 storage/overlay.c storage/overlay.h \
2064 storage/rbd.c storage/rbd.h \
2065 storage/rsync.c storage/rsync.h \
2066 storage/storage.c storage/storage.h \
2067 storage/storage_utils.c storage/storage_utils.h \
2068 storage/zfs.c storage/zfs.h \
99bf8f21 2069 string_utils.c string_utils.h \
bf1ca416 2070 sync.c sync.h \
5f1b0986 2071 terminal.c terminal.h \
78ad1eb0 2072 utils.c utils.h \
ebbde173
CB
2073 uuid.c uuid.h \
2074 $(LSM_SOURCES)
d6e12907 2075if ENABLE_SECCOMP
d6e12907
CB
2076lxc_create_SOURCES += seccomp.c lxcseccomp.h
2077endif
317410da
CB
2078
2079if !HAVE_STRCHRNUL
2080lxc_create_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
2081endif
646b75b5
CB
2082
2083if !HAVE_STRLCPY
2084lxc_create_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
2085endif
2086
2087if !HAVE_STRLCAT
2088lxc_create_SOURCES += ../include/strlcat.c ../include/strlcat.h
2089endif
2090
2091if !HAVE_OPENPTY
2092lxc_create_SOURCES += ../include/openpty.c ../include/openpty.h
2093endif
2094
2095if IS_BIONIC
2096lxc_create_SOURCES += ../include/fexecve.c ../include/fexecve.h \
2097 ../include/lxcmntent.c ../include/lxcmntent.h
2098endif
2099
2100if !HAVE_GETGRGID_R
2101lxc_create_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
2102endif
2103
2104if !HAVE_PRLIMIT
2105if HAVE_PRLIMIT64
2106lxc_create_SOURCES += ../include/prlimit.c ../include/prlimit.h
2107endif
2108endif
8e43f33e 2109endif
d6e12907 2110
ba7bd8c8 2111lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
8e43f33e
CB
2112 tools/arguments.c tools/arguments.h
2113
2114if ENABLE_STATIC_BINARIES
2115lxc_snapshot_SOURCES += $(liblxc_la_SOURCES)
2116lxc_snapshot_LDFLAGS = -all-static -pthread
2117else
2118lxc_snapshot_SOURCES += af_unix.c af_unix.h \
2119 caps.c caps.h \
2120 cgroups/cgfsng.c \
2121 cgroups/cgroup.c cgroups/cgroup.h \
2122 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
2123 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
2124 commands.c commands.h \
2125 commands_utils.c commands_utils.h \
2126 conf.c conf.h \
2127 confile.c confile.h \
2128 confile_utils.c confile_utils.h \
2129 error.c error.h \
2130 file_utils.c file_utils.h \
2131 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
2132 initutils.c initutils.h \
2133 log.c log.h \
2134 lxclock.c lxclock.h \
2135 mainloop.c mainloop.h \
2136 monitor.c monitor.h \
74ed30d7 2137 mount_utils.c mount_utils.h \
8e43f33e
CB
2138 namespace.c namespace.h \
2139 network.c network.h \
2140 nl.c nl.h \
2141 parse.c parse.h \
2142 process_utils.c process_utils.h \
2143 ringbuf.c ringbuf.h \
2144 start.c start.h \
2145 state.c state.h \
2146 storage/btrfs.c storage/btrfs.h \
2147 storage/dir.c storage/dir.h \
2148 storage/loop.c storage/loop.h \
2149 storage/lvm.c storage/lvm.h \
2150 storage/nbd.c storage/nbd.h \
2151 storage/overlay.c storage/overlay.h \
2152 storage/rbd.c storage/rbd.h \
2153 storage/rsync.c storage/rsync.h \
2154 storage/storage.c storage/storage.h \
2155 storage/storage_utils.c storage/storage_utils.h \
2156 storage/zfs.c storage/zfs.h \
2157 string_utils.c string_utils.h \
2158 sync.c sync.h \
2159 terminal.c terminal.h \
2160 utils.c utils.h \
2161 uuid.c uuid.h \
2162 $(LSM_SOURCES)
d6e12907
CB
2163if ENABLE_SECCOMP
2164lxc_snapshot_SOURCES += seccomp.c lxcseccomp.h
2165endif
317410da
CB
2166
2167if !HAVE_STRCHRNUL
2168lxc_snapshot_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
2169endif
646b75b5
CB
2170
2171if !HAVE_STRLCPY
2172lxc_snapshot_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
2173endif
2174
2175if !HAVE_STRLCAT
2176lxc_snapshot_SOURCES += ../include/strlcat.c ../include/strlcat.h
2177endif
2178
2179if !HAVE_OPENPTY
2180lxc_snapshot_SOURCES += ../include/openpty.c ../include/openpty.h
2181endif
2182
2183if IS_BIONIC
2184lxc_snapshot_SOURCES += ../include/fexecve.c ../include/fexecve.h \
2185 ../include/lxcmntent.c ../include/lxcmntent.h
2186endif
2187
2188if !HAVE_GETGRGID_R
2189lxc_snapshot_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
2190endif
2191
2192if !HAVE_PRLIMIT
2193if HAVE_PRLIMIT64
2194lxc_snapshot_SOURCES += ../include/prlimit.c ../include/prlimit.h
2195endif
2196endif
8e43f33e 2197endif
d6e12907 2198
ba7bd8c8 2199lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
8e43f33e
CB
2200 tools/arguments.c tools/arguments.h
2201
2202if ENABLE_STATIC_BINARIES
2203lxc_checkpoint_SOURCES += $(liblxc_la_SOURCES)
2204lxc_checkpoint_LDFLAGS = -all-static -pthread
2205else
2206lxc_checkpoint_SOURCES += af_unix.c af_unix.h \
2207 caps.c caps.h \
2208 cgroups/cgfsng.c \
2209 cgroups/cgroup.c cgroups/cgroup.h \
2210 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
2211 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
2212 commands.c commands.h \
2213 commands_utils.c commands_utils.h \
2214 conf.c conf.h \
2215 confile.c confile.h \
2216 confile_utils.c confile_utils.h \
2217 error.c error.h \
2218 file_utils.c file_utils.h \
2219 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
2220 initutils.c initutils.h \
2221 log.c log.h \
2222 lxclock.c lxclock.h \
2223 mainloop.c mainloop.h \
2224 monitor.c monitor.h \
74ed30d7 2225 mount_utils.c mount_utils.h \
8e43f33e
CB
2226 namespace.c namespace.h \
2227 network.c network.h \
2228 nl.c nl.h \
2229 parse.c parse.h \
2230 process_utils.c process_utils.h \
2231 ringbuf.c ringbuf.h \
2232 start.c start.h \
2233 state.c state.h \
2234 storage/btrfs.c storage/btrfs.h \
2235 storage/dir.c storage/dir.h \
2236 storage/loop.c storage/loop.h \
2237 storage/lvm.c storage/lvm.h \
2238 storage/nbd.c storage/nbd.h \
2239 storage/overlay.c storage/overlay.h \
2240 storage/rbd.c storage/rbd.h \
2241 storage/rsync.c storage/rsync.h \
2242 storage/storage.c storage/storage.h \
2243 storage/storage_utils.c storage/storage_utils.h \
2244 storage/zfs.c storage/zfs.h \
2245 string_utils.c string_utils.h \
2246 sync.c sync.h \
2247 terminal.c terminal.h \
2248 utils.c utils.h \
2249 uuid.c uuid.h \
2250 $(LSM_SOURCES)
d6e12907
CB
2251if ENABLE_SECCOMP
2252lxc_checkpoint_SOURCES += seccomp.c lxcseccomp.h
2253endif
317410da
CB
2254
2255if !HAVE_STRCHRNUL
2256lxc_checkpoint_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
2257endif
2258
646b75b5
CB
2259if !HAVE_STRLCPY
2260lxc_checkpoint_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
2261endif
2262
2263if !HAVE_STRLCAT
2264lxc_checkpoint_SOURCES += ../include/strlcat.c ../include/strlcat.h
2265endif
2266
2267if !HAVE_OPENPTY
2268lxc_checkpoint_SOURCES += ../include/openpty.c ../include/openpty.h
2269endif
2270
2271if IS_BIONIC
2272lxc_checkpoint_SOURCES += ../include/fexecve.c ../include/fexecve.h \
2273 ../include/lxcmntent.c ../include/lxcmntent.h
2274endif
2275
2276if !HAVE_GETGRGID_R
2277lxc_checkpoint_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
2278endif
2279
2280if !HAVE_PRLIMIT
2281if HAVE_PRLIMIT64
2282lxc_checkpoint_SOURCES += ../include/prlimit.c ../include/prlimit.h
2283endif
2284endif
8e43f33e 2285endif
8d060937 2286endif
5b46e19c 2287
8d060937 2288if ENABLE_COMMANDS
844d9eac 2289# Binaries shipping with liblxc
37ef15bb 2290init_lxc_SOURCES = cmd/lxc_init.c \
7a728639 2291 af_unix.c af_unix.h \
07d1f84a 2292 caps.c caps.h \
a10ce5a8 2293 error.c error.h \
4a9ee78a 2294 file_utils.c file_utils.h \
f575e7ef 2295 initutils.c initutils.h \
07d1f84a 2296 log.c log.h \
7a728639 2297 macro.h \
3cf7d8c2 2298 memory_utils.h \
7a728639
CB
2299 namespace.c namespace.h \
2300 string_utils.c string_utils.h
646b75b5
CB
2301
2302if !HAVE_STRLCPY
2303init_lxc_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
2304endif
2305
2306if !HAVE_STRLCAT
2307init_lxc_SOURCES += ../include/strlcat.c ../include/strlcat.h
2308endif
2309
b816bdde
CB
2310init_lxc_LDFLAGS = -pthread
2311
1d918801
CB
2312lxc_monitord_SOURCES = cmd/lxc_monitord.c
2313
2314if ENABLE_STATIC_BINARIES
2315lxc_monitord_SOURCES += $(liblxc_la_SOURCES)
2316lxc_monitord_LDFLAGS = -all-static -pthread
2317else
2318lxc_monitord_SOURCES += af_unix.c af_unix.h \
2319 caps.c caps.h \
2320 cgroups/cgfsng.c \
2321 cgroups/cgroup.c cgroups/cgroup.h \
2322 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
2323 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
2324 commands.c commands.h \
2325 commands_utils.c commands_utils.h \
2326 conf.c conf.h \
2327 confile.c confile.h \
2328 confile_utils.c confile_utils.h \
2329 error.c error.h \
2330 file_utils.c file_utils.h \
2331 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
2332 initutils.c initutils.h \
2333 log.c log.h \
2334 lxclock.c lxclock.h \
2335 mainloop.c mainloop.h \
2336 monitor.c monitor.h \
74ed30d7 2337 mount_utils.c mount_utils.h \
1d918801
CB
2338 namespace.c namespace.h \
2339 network.c network.h \
2340 nl.c nl.h \
2341 parse.c parse.h \
2342 process_utils.c process_utils.h \
2343 ringbuf.c ringbuf.h \
2344 start.c start.h \
2345 state.c state.h \
2346 storage/btrfs.c storage/btrfs.h \
2347 storage/dir.c storage/dir.h \
2348 storage/loop.c storage/loop.h \
2349 storage/lvm.c storage/lvm.h \
2350 storage/nbd.c storage/nbd.h \
2351 storage/overlay.c storage/overlay.h \
2352 storage/rbd.c storage/rbd.h \
2353 storage/rsync.c storage/rsync.h \
2354 storage/storage.c storage/storage.h \
2355 storage/storage_utils.c storage/storage_utils.h \
2356 storage/zfs.c storage/zfs.h \
2357 string_utils.c string_utils.h \
2358 sync.c sync.h \
2359 syscall_numbers.h \
2360 terminal.c terminal.h \
2361 utils.c utils.h \
2362 uuid.c uuid.h \
2363 $(LSM_SOURCES)
d6e12907
CB
2364if ENABLE_SECCOMP
2365lxc_monitord_SOURCES += seccomp.c lxcseccomp.h
2366endif
317410da
CB
2367
2368if !HAVE_STRCHRNUL
2369lxc_monitord_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
2370endif
646b75b5
CB
2371
2372if !HAVE_STRLCPY
2373lxc_monitord_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
2374endif
2375
2376if !HAVE_STRLCAT
2377lxc_monitord_SOURCES += ../include/strlcat.c ../include/strlcat.h
2378endif
2379
2380if !HAVE_OPENPTY
2381lxc_monitord_SOURCES += ../include/openpty.c ../include/openpty.h
2382endif
2383
2384if IS_BIONIC
2385lxc_monitord_SOURCES += ../include/fexecve.c ../include/fexecve.h \
2386 ../include/lxcmntent.c ../include/lxcmntent.h
2387endif
2388
2389if !HAVE_GETGRGID_R
2390lxc_monitord_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
2391endif
2392
2393if !HAVE_PRLIMIT
2394if HAVE_PRLIMIT64
2395lxc_monitord_SOURCES += ../include/prlimit.c ../include/prlimit.h
2396endif
2397endif
1d918801 2398endif
d6e12907 2399
1d918801
CB
2400lxc_user_nic_SOURCES = cmd/lxc_user_nic.c
2401
2402if ENABLE_STATIC_BINARIES
2403lxc_user_nic_SOURCES += $(liblxc_la_SOURCES)
2404lxc_user_nic_LDFLAGS = -all-static -pthread
2405else
2406lxc_user_nic_SOURCES += af_unix.c af_unix.h \
2407 caps.c caps.h \
2408 cgroups/cgfsng.c \
2409 cgroups/cgroup.c cgroups/cgroup.h \
2410 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
2411 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
2412 commands.c commands.h \
2413 commands_utils.c commands_utils.h \
2414 conf.c conf.h \
2415 confile.c confile.h \
2416 confile_utils.c confile_utils.h \
2417 error.c error.h \
2418 file_utils.c file_utils.h \
2419 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
2420 initutils.c initutils.h \
2421 log.c log.h \
2422 lxclock.c lxclock.h \
2423 mainloop.c mainloop.h \
2424 memory_utils.h \
2425 monitor.c monitor.h \
74ed30d7 2426 mount_utils.c mount_utils.h \
1d918801
CB
2427 namespace.c namespace.h \
2428 network.c network.h \
2429 nl.c nl.h \
2430 parse.c parse.h \
2431 process_utils.c process_utils.h \
2432 ringbuf.c ringbuf.h \
2433 start.c start.h \
2434 state.c state.h \
2435 storage/btrfs.c storage/btrfs.h \
2436 storage/dir.c storage/dir.h \
2437 storage/loop.c storage/loop.h \
2438 storage/lvm.c storage/lvm.h \
2439 storage/nbd.c storage/nbd.h \
2440 storage/overlay.c storage/overlay.h \
2441 storage/rbd.c storage/rbd.h \
2442 storage/rsync.c storage/rsync.h \
2443 storage/storage.c storage/storage.h \
2444 storage/storage_utils.c storage/storage_utils.h \
2445 storage/zfs.c storage/zfs.h \
2446 string_utils.c string_utils.h \
2447 sync.c sync.h \
2448 syscall_numbers.h \
2449 syscall_wrappers.h \
2450 terminal.c terminal.h \
2451 utils.c utils.h \
2452 uuid.c uuid.h \
2453 $(LSM_SOURCES)
d6e12907
CB
2454if ENABLE_SECCOMP
2455lxc_user_nic_SOURCES += seccomp.c lxcseccomp.h
2456endif
317410da
CB
2457
2458if !HAVE_STRCHRNUL
2459lxc_user_nic_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
2460endif
646b75b5
CB
2461
2462if !HAVE_STRLCPY
2463lxc_user_nic_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
2464endif
2465
2466if !HAVE_STRLCAT
2467lxc_user_nic_SOURCES += ../include/strlcat.c ../include/strlcat.h
2468endif
2469
2470if !HAVE_OPENPTY
2471lxc_user_nic_SOURCES += ../include/openpty.c ../include/openpty.h
2472endif
2473
2474if IS_BIONIC
2475lxc_user_nic_SOURCES += ../include/fexecve.c ../include/fexecve.h \
2476 ../include/lxcmntent.c ../include/lxcmntent.h
2477endif
2478
2479if !HAVE_GETGRGID_R
2480lxc_user_nic_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
2481endif
2482
2483if !HAVE_PRLIMIT
2484if HAVE_PRLIMIT64
2485lxc_user_nic_SOURCES += ../include/prlimit.c ../include/prlimit.h
2486endif
2487endif
1d918801 2488endif
d6e12907 2489
1d918801
CB
2490lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c
2491
2492if ENABLE_STATIC_BINARIES
2493lxc_usernsexec_SOURCES += $(liblxc_la_SOURCES)
2494lxc_usernsexec_LDFLAGS = -all-static -pthread
2495else
2496lxc_usernsexec_SOURCES += af_unix.c af_unix.h \
2497 caps.c caps.h \
2498 cgroups/cgfsng.c \
2499 cgroups/cgroup.c cgroups/cgroup.h \
2500 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
2501 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
2502 commands.c commands.h \
2503 commands_utils.c commands_utils.h \
2504 conf.c conf.h \
2505 confile.c confile.h \
2506 confile_utils.c confile_utils.h \
2507 error.c error.h \
2508 file_utils.c file_utils.h \
922c3352 2509 hlist.h \
1d918801
CB
2510 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
2511 initutils.c initutils.h \
2512 list.h \
2513 log.c log.h \
2514 lxclock.c lxclock.h \
2515 macro.h \
2516 mainloop.c mainloop.h \
2517 memory_utils.h \
2518 monitor.c monitor.h \
74ed30d7 2519 mount_utils.c mount_utils.h \
1d918801
CB
2520 namespace.c namespace.h \
2521 network.c network.h \
2522 nl.c nl.h \
2523 parse.c parse.h \
2524 process_utils.c process_utils.h \
2525 ringbuf.c ringbuf.h \
2526 start.c start.h \
2527 state.c state.h \
2528 storage/btrfs.c storage/btrfs.h \
2529 storage/dir.c storage/dir.h \
2530 storage/loop.c storage/loop.h \
2531 storage/lvm.c storage/lvm.h \
2532 storage/nbd.c storage/nbd.h \
2533 storage/overlay.c storage/overlay.h \
2534 storage/rbd.c storage/rbd.h \
2535 storage/rsync.c storage/rsync.h \
2536 storage/storage.c storage/storage.h \
2537 storage/storage_utils.c storage/storage_utils.h \
2538 storage/zfs.c storage/zfs.h \
2539 string_utils.c string_utils.h \
2540 sync.c sync.h \
2541 syscall_wrappers.h \
2542 terminal.c terminal.h \
2543 utils.c utils.h \
2544 uuid.c uuid.h \
2545 $(LSM_SOURCES)
d6e12907
CB
2546if ENABLE_SECCOMP
2547lxc_usernsexec_SOURCES += seccomp.c lxcseccomp.h
2548endif
317410da
CB
2549
2550if !HAVE_STRCHRNUL
2551lxc_usernsexec_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
2552endif
646b75b5
CB
2553
2554if !HAVE_STRLCPY
2555lxc_usernsexec_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
2556endif
2557
2558if !HAVE_STRLCAT
2559lxc_usernsexec_SOURCES += ../include/strlcat.c ../include/strlcat.h
2560endif
2561
2562if !HAVE_OPENPTY
2563lxc_usernsexec_SOURCES += ../include/openpty.c ../include/openpty.h
2564endif
2565
2566if IS_BIONIC
2567lxc_usernsexec_SOURCES += ../include/fexecve.c ../include/fexecve.h \
2568 ../include/lxcmntent.c ../include/lxcmntent.h
2569endif
2570
2571if !HAVE_GETGRGID_R
2572lxc_usernsexec_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
2573endif
2574
2575if !HAVE_PRLIMIT
2576if HAVE_PRLIMIT64
2577lxc_usernsexec_SOURCES += ../include/prlimit.c ../include/prlimit.h
2578endif
2579endif
8d060937 2580endif
1d918801 2581endif
8d060937 2582
844d9eac 2583
8d060937 2584if ENABLE_TOOLS
9dbcd668 2585if !HAVE_GETSUBOPT
c6668710 2586lxc_copy_SOURCES += tools/include/getsubopt.c tools/include/getsubopt.h
9dbcd668 2587endif
8d060937 2588endif
9dbcd668 2589
8d060937 2590if ENABLE_COMMANDS
e78884c9
DE
2591if HAVE_STATIC_LIBCAP
2592sbin_PROGRAMS += init.lxc.static
2593
ba7bd8c8 2594init_lxc_static_SOURCES = cmd/lxc_init.c \
efb7e304 2595 af_unix.c af_unix.h \
ba7bd8c8
CB
2596 caps.c caps.h \
2597 error.c error.h \
37ef15bb 2598 file_utils.c file_utils.h \
f575e7ef 2599 initutils.c initutils.h \
ba7bd8c8 2600 log.c log.h \
279c45ee 2601 macro.h \
3cf7d8c2 2602 memory_utils.h \
ba7bd8c8 2603 namespace.c namespace.h \
37ef15bb 2604 string_utils.c string_utils.h
77ae87cd
SH
2605
2606if !HAVE_GETLINE
2607if HAVE_FGETLN
ba7bd8c8 2608init_lxc_static_SOURCES += ../include/getline.c ../include/getline.h
77ae87cd
SH
2609endif
2610endif
2611
91c272a5
CB
2612if !HAVE_STRLCPY
2613init_lxc_static_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
2614endif
2615
3afafe55
CB
2616if !HAVE_STRLCAT
2617init_lxc_static_SOURCES += ../include/strlcat.c ../include/strlcat.h
2618endif
2619
b816bdde 2620init_lxc_static_LDFLAGS = -all-static -pthread
2d4b3e3d 2621init_lxc_static_LDADD = @CAP_LIBS@
858377e4 2622init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
bab29e09
EV
2623if ENABLE_SANITIZERS
2624init_lxc_static_CFLAGS += -fno-sanitize=address,undefined
2625endif
4a6af918
EV
2626if ENABLE_FUZZERS
2627init_lxc_static_CFLAGS += -fno-sanitize=fuzzer-no-link
2628endif
e78884c9 2629endif
8d060937 2630endif
2d4b3e3d 2631
f7a8609f 2632if ENABLE_PAM
7ac43d3d
CB
2633if HAVE_PAM
2634pam_LTLIBRARIES = pam_cgfs.la
71174d46 2635
ba7bd8c8 2636pam_cgfs_la_SOURCES = pam/pam_cgfs.c \
71174d46 2637 file_utils.c file_utils.h \
f4274ae8 2638 macro.h \
6421783a 2639 memory_utils.h \
71174d46
CB
2640 string_utils.c string_utils.h
2641
2642if !HAVE_STRLCAT
2643pam_cgfs_la_SOURCES += ../include/strlcat.c ../include/strlcat.h
2644endif
2645
2646if !HAVE_STRLCPY
2647pam_cgfs_la_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
2648endif
2649
f4274ae8 2650pam_cgfs_la_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
71174d46 2651
ba7bd8c8
CB
2652pam_cgfs_la_LIBADD = $(AM_LIBS) \
2653 $(PAM_LIBS) \
a8eed52c 2654 $(DLOG_LIBS) \
ba7bd8c8 2655 -L$(top_srcdir)
71174d46 2656
ba7bd8c8
CB
2657pam_cgfs_la_LDFLAGS = $(AM_LDFLAGS) \
2658 -avoid-version \
2659 -module \
792a48b1 2660 -shared
7ac43d3d 2661endif
f7a8609f 2662endif
7ac43d3d 2663
26419a7a 2664install-exec-local: install-libLTLIBRARIES
2a59a681
SH
2665 mkdir -p $(DESTDIR)$(datadir)/lxc
2666 install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
f4790f1f
SG
2667 mv $(shell readlink -f $(DESTDIR)$(libdir)/liblxc.so) $(DESTDIR)$(libdir)/liblxc.so.@LXC_ABI@
2668 rm -f $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.1
5b46e19c 2669 cd $(DESTDIR)$(libdir); \
26419a7a
SG
2670 ln -sf liblxc.so.@LXC_ABI@ liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)); \
2671 ln -sf liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) liblxc.so
45e854dc 2672
9760cfcc 2673if ENABLE_COMMANDS
45e854dc
SG
2674install-exec-hook:
2675 chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
7d552285
EFA
2676if ENABLE_BASH
2677install-data-local:
2678 cd $(DESTDIR)$(bashcompdir); \
2679 for bin in $(bin_PROGRAMS) ; do \
2680 ln -sf lxc $$bin ; \
2681 done
2682endif
9760cfcc 2683endif
5b46e19c
CLG
2684
2685uninstall-local:
2686 $(RM) $(DESTDIR)$(libdir)/liblxc.so*
57d533fb 2687 $(RM) $(DESTDIR)$(libdir)/liblxc.a
7d552285
EFA
2688if ENABLE_BASH
2689 for bin in $(bin_PROGRAMS) ; do \
2690 $(RM) $(DESTDIR)$(bashcompdir)/$$bin ; \
2691 done
2692endif
2693
f7a8609f 2694if ENABLE_PAM
7ac43d3d
CB
2695if HAVE_PAM
2696 $(RM) $(DESTDIR)$(pamdir)/pam_cgfs.so*
2697
2698install-data-hook: install-pamLTLIBRARIES
2699 $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.la"
2700 $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.a"
2701endif
f7a8609f 2702endif