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 \
47 noinst_HEADERS += ../include/lxcmntent.h \
53 noinst_HEADERS += ../include/prlimit.h
59 noinst_HEADERS += ../include/getline.h
64 noinst_HEADERS += tools/include/getsubopt.h
68 noinst_HEADERS += ../include/getgrgid_r.h
73 LSM_SOURCES = lsm/lsm.c \
78 LSM_SOURCES += lsm/apparmor.c
82 LSM_SOURCES += lsm/selinux.c
85 lib_LTLIBRARIES = liblxc.la
86 liblxc_la_SOURCES = af_unix.c af_unix.h \
91 cgroups/cgroup.c cgroups/cgroup.h \
92 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
94 commands.c commands.h \
95 commands_utils.c commands_utils.h \
98 confile_utils.c confile_utils.h \
103 file_utils.c file_utils.h \
104 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
105 initutils.c initutils.h \
109 lxccontainer.c lxccontainer.h \
110 lxclock.c lxclock.h \
113 mainloop.c mainloop.h \
114 namespace.c namespace.h \
116 network.c network.h \
117 monitor.c monitor.h \
119 ringbuf.c ringbuf.h \
123 storage/btrfs.c storage/btrfs.h \
124 storage/dir.c storage/dir.h \
125 storage/loop.c storage/loop.h \
126 storage/lvm.c storage/lvm.h \
127 storage/nbd.c storage/nbd.h \
128 storage/overlay.c storage/overlay.h \
129 storage/rbd.c storage/rbd.h \
130 storage/rsync.c storage/rsync.h \
131 storage/storage.c storage/storage.h \
132 storage/storage_utils.c storage/storage_utils.h \
133 storage/zfs.c storage/zfs.h \
134 string_utils.c string_utils.h \
143 liblxc_la_SOURCES += ../include/lxcmntent.c ../include/lxcmntent.h \
144 ../include/openpty.c ../include/openpty.h
148 liblxc_la_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
153 liblxc_la_SOURCES += ../include/getline.c ../include/getline.h
159 liblxc_la_SOURCES += ../include/prlimit.c ../include/prlimit.h
164 liblxc_la_SOURCES += seccomp.c
168 liblxc_la_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
172 liblxc_la_SOURCES += ../include/strlcat.c ../include/strlcat.h
175 AM_CFLAGS = -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
176 -DLXCPATH=\"$(LXCPATH)\" \
177 -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
178 -DLXCINITDIR=\"$(LXCINITDIR)\" \
179 -DLIBEXECDIR=\"$(LIBEXECDIR)\" \
180 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
181 -DLXCTEMPLATECONFIG=\"$(LXCTEMPLATECONFIG)\" \
182 -DLOGPATH=\"$(LOGPATH)\" \
183 -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
184 -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
185 -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
186 -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
187 -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
188 -DSBINDIR=\"$(SBINDIR)\" \
189 -DAPPARMOR_CACHE_DIR=\"$(APPARMOR_CACHE_DIR)\" \
190 -I $(top_srcdir)/src \
191 -I $(top_srcdir)/src/lxc \
192 -I $(top_srcdir)/src/lxc/storage \
193 -I $(top_srcdir)/src/lxc/cgroups
196 AM_CFLAGS += -DHAVE_APPARMOR
200 AM_CFLAGS += -DHAVE_LIBGNUTLS
204 AM_CFLAGS += -DHAVE_SECCOMP \
209 AM_CFLAGS += -DHAVE_SELINUX
213 AM_CFLAGS += -DHAVE_DLOG \
217 if USE_CONFIGPATH_LOGS
218 AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
221 # build the shared library
222 liblxc_la_CFLAGS = -fPIC \
227 liblxc_la_LDFLAGS = -pthread \
229 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) \
230 -version-info @LXC_ABI_MAJOR@
232 liblxc_la_LIBADD = $(CAP_LIBS) \
241 bin_SCRIPTS += cmd/lxc-checkconfig \
242 cmd/lxc-update-config
246 bin_PROGRAMS = lxc-attach \
272 sbin_PROGRAMS = init.lxc
274 pkglibexec_PROGRAMS = lxc-monitord \
281 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
292 lxc_attach_SOURCES = tools/lxc_attach.c \
293 tools/arguments.c tools/arguments.h
294 lxc_autostart_SOURCES = tools/lxc_autostart.c \
295 tools/arguments.c tools/arguments.h
296 lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
297 tools/arguments.c tools/arguments.h
298 lxc_config_SOURCES = tools/lxc_config.c \
299 tools/arguments.c tools/arguments.h
300 lxc_console_SOURCES = tools/lxc_console.c \
301 tools/arguments.c tools/arguments.h
302 lxc_destroy_SOURCES = tools/lxc_destroy.c \
303 tools/arguments.c tools/arguments.h
304 lxc_device_SOURCES = tools/lxc_device.c \
305 tools/arguments.c tools/arguments.h
306 lxc_execute_SOURCES = tools/lxc_execute.c \
307 tools/arguments.c tools/arguments.h
308 lxc_freeze_SOURCES = tools/lxc_freeze.c \
309 tools/arguments.c tools/arguments.h
310 lxc_info_SOURCES = tools/lxc_info.c \
311 tools/arguments.c tools/arguments.h
312 lxc_monitor_SOURCES = tools/lxc_monitor.c \
314 tools/arguments.c tools/arguments.h
315 lxc_ls_SOURCES = tools/lxc_ls.c \
316 tools/arguments.c tools/arguments.h
317 lxc_copy_SOURCES = tools/lxc_copy.c \
318 tools/arguments.c tools/arguments.h
319 lxc_start_SOURCES = tools/lxc_start.c \
320 tools/arguments.c tools/arguments.h
321 lxc_stop_SOURCES = tools/lxc_stop.c \
322 tools/arguments.c tools/arguments.h
323 lxc_top_SOURCES = tools/lxc_top.c \
324 tools/arguments.c tools/arguments.h
325 lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
326 tools/arguments.c tools/arguments.h
327 lxc_unshare_SOURCES = tools/lxc_unshare.c \
328 tools/arguments.c tools/arguments.h
329 lxc_wait_SOURCES = tools/lxc_wait.c \
330 tools/arguments.c tools/arguments.h
331 lxc_create_SOURCES = tools/lxc_create.c \
332 tools/arguments.c tools/arguments.h
333 lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
334 tools/arguments.c tools/arguments.h
335 lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
336 tools/arguments.c tools/arguments.h
340 # Binaries shipping with liblxc
341 init_lxc_SOURCES = cmd/lxc_init.c \
342 initutils.c initutils.h \
343 string_utils.c string_utils.h
344 lxc_monitord_SOURCES = cmd/lxc_monitord.c
345 lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \
346 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
348 namespace.c namespace.h \
349 network.c network.h \
351 lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
356 namespace.c namespace.h \
357 file_utils.c file_utils.h \
358 string_utils.c string_utils.h \
365 lxc_copy_SOURCES += tools/include/getsubopt.c tools/include/getsubopt.h
370 if HAVE_STATIC_LIBCAP
371 sbin_PROGRAMS += init.lxc.static
373 init_lxc_static_SOURCES = cmd/lxc_init.c \
376 initutils.c initutils.h \
377 file_utils.c file_utils.h \
380 namespace.c namespace.h \
381 string_utils.c string_utils.h
385 init_lxc_static_SOURCES += ../include/getline.c ../include/getline.h
390 init_lxc_static_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
394 init_lxc_static_SOURCES += ../include/strlcat.c ../include/strlcat.h
397 init_lxc_static_LDFLAGS = -all-static
398 init_lxc_static_LDADD = @CAP_LIBS@
399 init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
405 pam_LTLIBRARIES = pam_cgfs.la
407 pam_cgfs_la_SOURCES = pam/pam_cgfs.c \
409 file_utils.c file_utils.h \
412 string_utils.c string_utils.h
415 pam_cgfs_la_SOURCES += ../include/strlcat.c ../include/strlcat.h
419 pam_cgfs_la_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
422 pam_cgfs_la_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
424 pam_cgfs_la_LIBADD = $(AM_LIBS) \
429 pam_cgfs_la_LDFLAGS = $(AM_LDFLAGS) \
437 install-exec-local: install-libLTLIBRARIES
438 mkdir -p $(DESTDIR)$(datadir)/lxc
439 install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
440 mv $(shell readlink -f $(DESTDIR)$(libdir)/liblxc.so) $(DESTDIR)$(libdir)/liblxc.so.@LXC_ABI@
441 rm -f $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.1
442 cd $(DESTDIR)$(libdir); \
443 ln -sf liblxc.so.@LXC_ABI@ liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)); \
444 ln -sf liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) liblxc.so
447 chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
450 $(RM) $(DESTDIR)$(libdir)/liblxc.so*
451 $(RM) $(DESTDIR)$(libdir)/liblxc.a
454 $(RM) $(DESTDIR)$(pamdir)/pam_cgfs.so*
456 install-data-hook: install-pamLTLIBRARIES
457 $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.la"
458 $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.a"