1 pkginclude_HEADERS = attach_options.h \
5 noinst_HEADERS = api_extensions.h \
9 cgroups/cgroup_utils.h \
17 ../include/netns_ifaddrs.h \
37 storage/storage_utils.h \
46 noinst_HEADERS += ../include/lxcmntent.h \
52 noinst_HEADERS += ../include/prlimit.h
58 noinst_HEADERS += ../include/getline.h
63 noinst_HEADERS += tools/include/getsubopt.h
67 noinst_HEADERS += ../include/getgrgid_r.h
72 LSM_SOURCES = lsm/lsm.c \
77 LSM_SOURCES += lsm/apparmor.c
81 LSM_SOURCES += lsm/selinux.c
84 lib_LTLIBRARIES = liblxc.la
85 liblxc_la_SOURCES = af_unix.c af_unix.h \
90 cgroups/cgroup.c cgroups/cgroup.h \
91 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
93 commands.c commands.h \
94 commands_utils.c commands_utils.h \
97 confile_utils.c confile_utils.h \
102 file_utils.c file_utils.h \
103 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
104 initutils.c initutils.h \
108 lxccontainer.c lxccontainer.h \
109 lxclock.c lxclock.h \
112 mainloop.c mainloop.h \
113 namespace.c namespace.h \
115 network.c network.h \
116 monitor.c monitor.h \
118 ringbuf.c ringbuf.h \
122 storage/btrfs.c storage/btrfs.h \
123 storage/dir.c storage/dir.h \
124 storage/loop.c storage/loop.h \
125 storage/lvm.c storage/lvm.h \
126 storage/nbd.c storage/nbd.h \
127 storage/overlay.c storage/overlay.h \
128 storage/rbd.c storage/rbd.h \
129 storage/rsync.c storage/rsync.h \
130 storage/storage.c storage/storage.h \
131 storage/storage_utils.c storage/storage_utils.h \
132 storage/zfs.c storage/zfs.h \
133 string_utils.c string_utils.h \
141 liblxc_la_SOURCES += ../include/lxcmntent.c ../include/lxcmntent.h \
142 ../include/openpty.c ../include/openpty.h
146 liblxc_la_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
151 liblxc_la_SOURCES += ../include/getline.c ../include/getline.h
157 liblxc_la_SOURCES += ../include/prlimit.c ../include/prlimit.h
162 liblxc_la_SOURCES += seccomp.c
166 liblxc_la_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
170 liblxc_la_SOURCES += ../include/strlcat.c ../include/strlcat.h
173 AM_CFLAGS = -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
174 -DLXCPATH=\"$(LXCPATH)\" \
175 -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
176 -DLXCINITDIR=\"$(LXCINITDIR)\" \
177 -DLIBEXECDIR=\"$(LIBEXECDIR)\" \
178 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
179 -DLXCTEMPLATECONFIG=\"$(LXCTEMPLATECONFIG)\" \
180 -DLOGPATH=\"$(LOGPATH)\" \
181 -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
182 -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
183 -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
184 -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
185 -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
186 -DSBINDIR=\"$(SBINDIR)\" \
187 -DAPPARMOR_CACHE_DIR=\"$(APPARMOR_CACHE_DIR)\" \
188 -I $(top_srcdir)/src \
189 -I $(top_srcdir)/src/lxc \
190 -I $(top_srcdir)/src/lxc/storage \
191 -I $(top_srcdir)/src/lxc/cgroups
194 AM_CFLAGS += -DHAVE_APPARMOR
198 AM_CFLAGS += -DHAVE_LIBGNUTLS
202 AM_CFLAGS += -DHAVE_SECCOMP \
207 AM_CFLAGS += -DHAVE_SELINUX
211 AM_CFLAGS += -DHAVE_DLOG \
215 if USE_CONFIGPATH_LOGS
216 AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
219 # build the shared library
220 liblxc_la_CFLAGS = -fPIC \
225 liblxc_la_LDFLAGS = -pthread \
227 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) \
228 -version-info @LXC_ABI_MAJOR@
230 liblxc_la_LIBADD = $(CAP_LIBS) \
239 bin_SCRIPTS += cmd/lxc-checkconfig \
240 cmd/lxc-update-config
244 bin_PROGRAMS = lxc-attach \
270 sbin_PROGRAMS = init.lxc
272 pkglibexec_PROGRAMS = lxc-monitord \
279 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
290 lxc_attach_SOURCES = tools/lxc_attach.c \
291 tools/arguments.c tools/arguments.h
292 lxc_autostart_SOURCES = tools/lxc_autostart.c \
293 tools/arguments.c tools/arguments.h
294 lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
295 tools/arguments.c tools/arguments.h
296 lxc_config_SOURCES = tools/lxc_config.c \
297 tools/arguments.c tools/arguments.h
298 lxc_console_SOURCES = tools/lxc_console.c \
299 tools/arguments.c tools/arguments.h
300 lxc_destroy_SOURCES = tools/lxc_destroy.c \
301 tools/arguments.c tools/arguments.h
302 lxc_device_SOURCES = tools/lxc_device.c \
303 tools/arguments.c tools/arguments.h
304 lxc_execute_SOURCES = tools/lxc_execute.c \
305 tools/arguments.c tools/arguments.h
306 lxc_freeze_SOURCES = tools/lxc_freeze.c \
307 tools/arguments.c tools/arguments.h
308 lxc_info_SOURCES = tools/lxc_info.c \
309 tools/arguments.c tools/arguments.h
310 lxc_monitor_SOURCES = tools/lxc_monitor.c \
312 tools/arguments.c tools/arguments.h
313 lxc_ls_SOURCES = tools/lxc_ls.c \
314 tools/arguments.c tools/arguments.h
315 lxc_copy_SOURCES = tools/lxc_copy.c \
316 tools/arguments.c tools/arguments.h
317 lxc_start_SOURCES = tools/lxc_start.c \
318 tools/arguments.c tools/arguments.h
319 lxc_stop_SOURCES = tools/lxc_stop.c \
320 tools/arguments.c tools/arguments.h
321 lxc_top_SOURCES = tools/lxc_top.c \
322 tools/arguments.c tools/arguments.h
323 lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
324 tools/arguments.c tools/arguments.h
325 lxc_unshare_SOURCES = tools/lxc_unshare.c \
326 tools/arguments.c tools/arguments.h
327 lxc_wait_SOURCES = tools/lxc_wait.c \
328 tools/arguments.c tools/arguments.h
329 lxc_create_SOURCES = tools/lxc_create.c \
330 tools/arguments.c tools/arguments.h
331 lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
332 tools/arguments.c tools/arguments.h
333 lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
334 tools/arguments.c tools/arguments.h
338 # Binaries shipping with liblxc
339 init_lxc_SOURCES = cmd/lxc_init.c \
340 initutils.c initutils.h \
341 string_utils.c string_utils.h
342 lxc_monitord_SOURCES = cmd/lxc_monitord.c
343 lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \
344 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
346 namespace.c namespace.h \
347 network.c network.h \
349 lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
354 namespace.c namespace.h \
355 file_utils.c file_utils.h \
356 string_utils.c string_utils.h \
363 lxc_copy_SOURCES += tools/include/getsubopt.c tools/include/getsubopt.h
368 if HAVE_STATIC_LIBCAP
369 sbin_PROGRAMS += init.lxc.static
371 init_lxc_static_SOURCES = cmd/lxc_init.c \
374 initutils.c initutils.h \
375 file_utils.c file_utils.h \
378 namespace.c namespace.h \
379 string_utils.c string_utils.h
383 init_lxc_static_SOURCES += ../include/getline.c ../include/getline.h
388 init_lxc_static_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
392 init_lxc_static_SOURCES += ../include/strlcat.c ../include/strlcat.h
395 init_lxc_static_LDFLAGS = -all-static
396 init_lxc_static_LDADD = @CAP_LIBS@
397 init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
403 pam_LTLIBRARIES = pam_cgfs.la
405 pam_cgfs_la_SOURCES = pam/pam_cgfs.c \
407 file_utils.c file_utils.h \
410 string_utils.c string_utils.h
413 pam_cgfs_la_SOURCES += ../include/strlcat.c ../include/strlcat.h
417 pam_cgfs_la_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
420 pam_cgfs_la_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
422 pam_cgfs_la_LIBADD = $(AM_LIBS) \
427 pam_cgfs_la_LDFLAGS = $(AM_LDFLAGS) \
435 install-exec-local: install-libLTLIBRARIES
436 mkdir -p $(DESTDIR)$(datadir)/lxc
437 install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
438 mv $(shell readlink -f $(DESTDIR)$(libdir)/liblxc.so) $(DESTDIR)$(libdir)/liblxc.so.@LXC_ABI@
439 rm -f $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.1
440 cd $(DESTDIR)$(libdir); \
441 ln -sf liblxc.so.@LXC_ABI@ liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)); \
442 ln -sf liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) liblxc.so
445 chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
448 $(RM) $(DESTDIR)$(libdir)/liblxc.so*
449 $(RM) $(DESTDIR)$(libdir)/liblxc.a
452 $(RM) $(DESTDIR)$(pamdir)/pam_cgfs.so*
454 install-data-hook: install-pamLTLIBRARIES
455 $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.la"
456 $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.a"