1 pkginclude_HEADERS = attach_options.h \
5 noinst_HEADERS = api_extensions.h \
9 cgroups/cgroup_utils.h \
17 ../include/netns_ifaddrs.h \
38 storage/storage_utils.h \
48 noinst_HEADERS += ../include/lxcmntent.h \
54 noinst_HEADERS += ../include/prlimit.h
60 noinst_HEADERS += ../include/getline.h
65 noinst_HEADERS += tools/include/getsubopt.h
69 noinst_HEADERS += ../include/getgrgid_r.h
74 LSM_SOURCES = lsm/lsm.c \
79 LSM_SOURCES += lsm/apparmor.c
83 LSM_SOURCES += lsm/selinux.c
86 lib_LTLIBRARIES = liblxc.la
87 liblxc_la_SOURCES = af_unix.c af_unix.h \
92 cgroups/cgroup.c cgroups/cgroup.h \
93 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
95 commands.c commands.h \
96 commands_utils.c commands_utils.h \
99 confile_utils.c confile_utils.h \
104 file_utils.c file_utils.h \
105 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
106 initutils.c initutils.h \
110 lxccontainer.c lxccontainer.h \
111 lxclock.c lxclock.h \
114 mainloop.c mainloop.h \
115 namespace.c namespace.h \
117 network.c network.h \
118 monitor.c monitor.h \
120 raw_syscalls.c raw_syscalls.h \
121 ringbuf.c ringbuf.h \
125 storage/btrfs.c storage/btrfs.h \
126 storage/dir.c storage/dir.h \
127 storage/loop.c storage/loop.h \
128 storage/lvm.c storage/lvm.h \
129 storage/nbd.c storage/nbd.h \
130 storage/overlay.c storage/overlay.h \
131 storage/rbd.c storage/rbd.h \
132 storage/rsync.c storage/rsync.h \
133 storage/storage.c storage/storage.h \
134 storage/storage_utils.c storage/storage_utils.h \
135 storage/zfs.c storage/zfs.h \
136 string_utils.c string_utils.h \
145 liblxc_la_SOURCES += ../include/lxcmntent.c ../include/lxcmntent.h \
146 ../include/openpty.c ../include/openpty.h
150 liblxc_la_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
155 liblxc_la_SOURCES += ../include/getline.c ../include/getline.h
161 liblxc_la_SOURCES += ../include/prlimit.c ../include/prlimit.h
166 liblxc_la_SOURCES += seccomp.c
170 liblxc_la_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
174 liblxc_la_SOURCES += ../include/strlcat.c ../include/strlcat.h
177 AM_CFLAGS = -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
178 -DLXCPATH=\"$(LXCPATH)\" \
179 -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
180 -DLXCINITDIR=\"$(LXCINITDIR)\" \
181 -DLIBEXECDIR=\"$(LIBEXECDIR)\" \
182 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
183 -DLXCTEMPLATECONFIG=\"$(LXCTEMPLATECONFIG)\" \
184 -DLOGPATH=\"$(LOGPATH)\" \
185 -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
186 -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
187 -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
188 -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
189 -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
190 -DSBINDIR=\"$(SBINDIR)\" \
191 -DAPPARMOR_CACHE_DIR=\"$(APPARMOR_CACHE_DIR)\" \
192 -I $(top_srcdir)/src \
193 -I $(top_srcdir)/src/lxc \
194 -I $(top_srcdir)/src/lxc/storage \
195 -I $(top_srcdir)/src/lxc/cgroups
198 AM_CFLAGS += -DHAVE_APPARMOR
202 AM_CFLAGS += -DHAVE_LIBGNUTLS
206 AM_CFLAGS += -DHAVE_SECCOMP \
211 AM_CFLAGS += -DHAVE_SELINUX
215 AM_CFLAGS += -DHAVE_DLOG \
219 if USE_CONFIGPATH_LOGS
220 AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
223 # build the shared library
224 liblxc_la_CFLAGS = -fPIC \
229 liblxc_la_LDFLAGS = -pthread \
231 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) \
232 -version-info @LXC_ABI_MAJOR@
234 liblxc_la_LIBADD = $(CAP_LIBS) \
243 bin_SCRIPTS += cmd/lxc-checkconfig \
244 cmd/lxc-update-config
248 bin_PROGRAMS = lxc-attach \
275 bin_PROGRAMS += lxc-usernsexec
277 bin_PROGRAMS = lxc-usernsexec
280 sbin_PROGRAMS = init.lxc
282 pkglibexec_PROGRAMS = lxc-monitord \
289 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
300 lxc_attach_SOURCES = tools/lxc_attach.c \
301 tools/arguments.c tools/arguments.h
302 lxc_autostart_SOURCES = tools/lxc_autostart.c \
303 tools/arguments.c tools/arguments.h
304 lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
305 tools/arguments.c tools/arguments.h
306 lxc_config_SOURCES = tools/lxc_config.c \
307 tools/arguments.c tools/arguments.h
308 lxc_console_SOURCES = tools/lxc_console.c \
309 tools/arguments.c tools/arguments.h
310 lxc_destroy_SOURCES = tools/lxc_destroy.c \
311 tools/arguments.c tools/arguments.h
312 lxc_device_SOURCES = tools/lxc_device.c \
313 tools/arguments.c tools/arguments.h
314 lxc_execute_SOURCES = tools/lxc_execute.c \
315 tools/arguments.c tools/arguments.h
316 lxc_freeze_SOURCES = tools/lxc_freeze.c \
317 tools/arguments.c tools/arguments.h
318 lxc_info_SOURCES = tools/lxc_info.c \
319 tools/arguments.c tools/arguments.h
320 lxc_monitor_SOURCES = tools/lxc_monitor.c \
322 tools/arguments.c tools/arguments.h
323 lxc_ls_SOURCES = tools/lxc_ls.c \
324 tools/arguments.c tools/arguments.h
325 lxc_copy_SOURCES = tools/lxc_copy.c \
326 tools/arguments.c tools/arguments.h
327 lxc_start_SOURCES = tools/lxc_start.c \
328 tools/arguments.c tools/arguments.h
329 lxc_stop_SOURCES = tools/lxc_stop.c \
330 tools/arguments.c tools/arguments.h
331 lxc_top_SOURCES = tools/lxc_top.c \
332 tools/arguments.c tools/arguments.h
333 lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
334 tools/arguments.c tools/arguments.h
335 lxc_unshare_SOURCES = tools/lxc_unshare.c \
336 tools/arguments.c tools/arguments.h
337 lxc_wait_SOURCES = tools/lxc_wait.c \
338 tools/arguments.c tools/arguments.h
339 lxc_create_SOURCES = tools/lxc_create.c \
340 tools/arguments.c tools/arguments.h
341 lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
342 tools/arguments.c tools/arguments.h
343 lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
344 tools/arguments.c tools/arguments.h
348 # Binaries shipping with liblxc
349 init_lxc_SOURCES = cmd/lxc_init.c \
352 initutils.c initutils.h \
354 raw_syscalls.c raw_syscalls.h \
355 string_utils.c string_utils.h
356 lxc_monitord_SOURCES = cmd/lxc_monitord.c \
357 af_unix.c af_unix.h \
359 mainloop.c mainloop.h \
360 monitor.c monitor.h \
361 raw_syscalls.c raw_syscalls.h \
363 lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \
364 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
366 network.c network.h \
368 raw_syscalls.c raw_syscalls.h \
370 lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
375 file_utils.c file_utils.h \
376 string_utils.c string_utils.h \
384 lxc_copy_SOURCES += tools/include/getsubopt.c tools/include/getsubopt.h
389 if HAVE_STATIC_LIBCAP
390 sbin_PROGRAMS += init.lxc.static
392 init_lxc_static_SOURCES = cmd/lxc_init.c \
395 initutils.c initutils.h \
396 file_utils.c file_utils.h \
399 namespace.c namespace.h \
400 string_utils.c string_utils.h
404 init_lxc_static_SOURCES += ../include/getline.c ../include/getline.h
409 init_lxc_static_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
413 init_lxc_static_SOURCES += ../include/strlcat.c ../include/strlcat.h
416 init_lxc_static_LDFLAGS = -all-static
417 init_lxc_static_LDADD = @CAP_LIBS@
418 init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
424 pam_LTLIBRARIES = pam_cgfs.la
426 pam_cgfs_la_SOURCES = pam/pam_cgfs.c \
428 file_utils.c file_utils.h \
431 string_utils.c string_utils.h
434 pam_cgfs_la_SOURCES += ../include/strlcat.c ../include/strlcat.h
438 pam_cgfs_la_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
441 pam_cgfs_la_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
443 pam_cgfs_la_LIBADD = $(AM_LIBS) \
448 pam_cgfs_la_LDFLAGS = $(AM_LDFLAGS) \
456 install-exec-local: install-libLTLIBRARIES
457 mkdir -p $(DESTDIR)$(datadir)/lxc
458 install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
459 mv $(shell readlink -f $(DESTDIR)$(libdir)/liblxc.so) $(DESTDIR)$(libdir)/liblxc.so.@LXC_ABI@
460 rm -f $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.1
461 cd $(DESTDIR)$(libdir); \
462 ln -sf liblxc.so.@LXC_ABI@ liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)); \
463 ln -sf liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) liblxc.so
466 chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
469 $(RM) $(DESTDIR)$(libdir)/liblxc.so*
470 $(RM) $(DESTDIR)$(libdir)/liblxc.a
473 $(RM) $(DESTDIR)$(pamdir)/pam_cgfs.so*
475 install-data-hook: install-pamLTLIBRARIES
476 $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.la"
477 $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.a"