18 storage/storage_utils.h \
23 cgroups/cgroup_utils.h \
45 ../include/ifaddrs.h \
46 ../include/openpty.h \
47 ../include/lxcmntent.h
52 noinst_HEADERS += ../include/prlimit.h
58 noinst_HEADERS += ../include/getline.h
63 noinst_HEADERS += tools/include/getsubopt.h
73 LSM_SOURCES += lsm/apparmor.c
77 LSM_SOURCES += lsm/selinux.c
80 lib_LTLIBRARIES = liblxc.la
82 storage/storage.c storage/storage.h \
83 storage/btrfs.c storage/btrfs.h \
84 storage/dir.c storage/dir.h \
85 storage/loop.c storage/loop.h \
86 storage/lvm.c storage/lvm.h \
87 storage/nbd.c storage/nbd.h \
88 storage/overlay.c storage/overlay.h \
89 storage/rbd.c storage/rbd.h \
90 storage/rsync.c storage/rsync.h \
91 storage/zfs.c storage/zfs.h \
92 storage/storage_utils.c storage/storage_utils.h \
94 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
95 cgroups/cgroup.c cgroups/cgroup.h \
96 commands.c commands.h \
97 commands_utils.c commands_utils.h \
100 monitor.c monitor.h \
106 initutils.c initutils.h \
109 namespace.h namespace.c \
111 confile.c confile.h \
112 confile_utils.c confile_utils.h \
118 ringbuf.c ringbuf.h \
120 network.c network.h \
127 mainloop.c mainloop.h \
128 af_unix.c af_unix.h \
130 lxclock.h lxclock.c \
131 lxccontainer.c lxccontainer.h \
137 liblxc_la_SOURCES += \
138 ../include/ifaddrs.c ../include/ifaddrs.h \
139 ../include/openpty.c ../include/openpty.h \
140 ../include/lxcmntent.c ../include/lxcmntent.h
145 liblxc_la_SOURCES += ../include/prlimit.c ../include/prlimit.h
151 liblxc_la_SOURCES += ../include/getline.c ../include/getline.h
155 AM_CFLAGS=-DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
156 -DLXCPATH=\"$(LXCPATH)\" \
157 -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
158 -DLXCINITDIR=\"$(LXCINITDIR)\" \
159 -DLIBEXECDIR=\"$(LIBEXECDIR)\" \
160 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
161 -DLXCTEMPLATECONFIG=\"$(LXCTEMPLATECONFIG)\" \
162 -DLOGPATH=\"$(LOGPATH)\" \
163 -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
164 -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
165 -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
166 -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
167 -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
168 -DSBINDIR=\"$(SBINDIR)\" \
169 -I $(top_srcdir)/src \
170 -I $(top_srcdir)/src/lxc \
171 -I $(top_srcdir)/src/lxc/storage \
172 -I $(top_srcdir)/src/lxc/cgroups
175 AM_CFLAGS += -DHAVE_APPARMOR
179 AM_CFLAGS += -DHAVE_SELINUX
182 if USE_CONFIGPATH_LOGS
183 AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
187 AM_CFLAGS += -DHAVE_SECCOMP $(SECCOMP_CFLAGS)
188 liblxc_la_SOURCES += seccomp.c
191 liblxc_la_CFLAGS = -fPIC -DPIC $(AM_CFLAGS) -pthread
193 liblxc_la_LDFLAGS = \
196 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) \
197 -version-info @LXC_ABI_MAJOR@
199 liblxc_la_LIBADD = $(CAP_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS)
204 bin_SCRIPTS += cmd/lxc-checkconfig \
205 cmd/lxc-update-config
236 sbin_PROGRAMS = init.lxc
237 pkglibexec_PROGRAMS = \
244 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
246 LDADD=liblxc.la @CAP_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@
249 lxc_attach_SOURCES = tools/lxc_attach.c tools/arguments.c tools/tool_utils.c
250 lxc_autostart_SOURCES = tools/lxc_autostart.c tools/arguments.c tools/tool_utils.c
251 lxc_cgroup_SOURCES = tools/lxc_cgroup.c tools/arguments.c tools/tool_utils.c
252 lxc_config_SOURCES = tools/lxc_config.c tools/arguments.c tools/tool_utils.c
253 lxc_console_SOURCES = tools/lxc_console.c tools/arguments.c tools/tool_utils.c
254 lxc_destroy_SOURCES = tools/lxc_destroy.c tools/arguments.c tools/tool_utils.c
255 lxc_device_SOURCES = tools/lxc_device.c tools/arguments.c tools/tool_utils.c
256 lxc_execute_SOURCES = tools/lxc_execute.c tools/arguments.c tools/tool_utils.c
257 lxc_freeze_SOURCES = tools/lxc_freeze.c tools/arguments.c tools/tool_utils.c
258 lxc_info_SOURCES = tools/lxc_info.c tools/arguments.c tools/tool_utils.c
259 lxc_monitor_SOURCES = tools/lxc_monitor.c tools/arguments.c tools/tool_utils.c
260 lxc_ls_SOURCES = tools/lxc_ls.c tools/arguments.c tools/tool_utils.c
261 lxc_copy_SOURCES = tools/lxc_copy.c tools/arguments.c tools/tool_utils.c
262 lxc_start_SOURCES = tools/lxc_start.c tools/arguments.c tools/tool_utils.c
263 lxc_stop_SOURCES = tools/lxc_stop.c tools/arguments.c tools/tool_utils.c
264 lxc_top_SOURCES = tools/lxc_top.c tools/arguments.c tools/tool_utils.c
265 lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c tools/arguments.c tools/tool_utils.c
266 lxc_unshare_SOURCES = tools/lxc_unshare.c tools/arguments.c tools/tool_utils.c
267 lxc_wait_SOURCES = tools/lxc_wait.c tools/arguments.c tools/tool_utils.c
268 lxc_create_SOURCES = tools/lxc_create.c tools/arguments.c tools/tool_utils.c
269 lxc_snapshot_SOURCES = tools/lxc_snapshot.c tools/arguments.c tools/tool_utils.c
270 lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c tools/arguments.c tools/tool_utils.c
274 # Binaries shipping with liblxc
275 init_lxc_SOURCES = cmd/lxc_init.c
276 lxc_monitord_SOURCES = cmd/lxc_monitord.c
277 lxc_user_nic_SOURCES = cmd/lxc_user_nic.c namespace.c network.c parse.c
278 lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c
284 lxc_copy_SOURCES += tools/include/getsubopt.c tools/include/getsubopt.h
289 if HAVE_STATIC_LIBCAP
290 sbin_PROGRAMS += init.lxc.static
292 init_lxc_static_SOURCES = cmd/lxc_init.c error.c log.c initutils.c caps.c parse.c namespace.c
296 init_lxc_static_SOURCES += ../include/getline.c
300 init_lxc_static_LDFLAGS = -all-static
301 init_lxc_static_LDADD = @CAP_LIBS@
302 init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
308 pam_LTLIBRARIES = pam_cgfs.la
309 pam_cgfs_la_SOURCES = pam/pam_cgfs.c pam/utils.c pam/utils.h
310 pam_cgfs_la_CFLAGS = $(AM_CFLAGS)
311 pam_cgfs_la_LIBADD = $(AM_LIBS) $(PAM_LIBS) -L$(top_srcdir)
312 pam_cgfs_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version -shared
316 install-exec-local: install-libLTLIBRARIES
317 mkdir -p $(DESTDIR)$(datadir)/lxc
318 install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
319 mv $(shell readlink -f $(DESTDIR)$(libdir)/liblxc.so) $(DESTDIR)$(libdir)/liblxc.so.@LXC_ABI@
320 rm -f $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.1
321 cd $(DESTDIR)$(libdir); \
322 ln -sf liblxc.so.@LXC_ABI@ liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)); \
323 ln -sf liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) liblxc.so
326 chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
329 $(RM) $(DESTDIR)$(libdir)/liblxc.so*
332 $(RM) $(DESTDIR)$(pamdir)/pam_cgfs.so*
334 install-data-hook: install-pamLTLIBRARIES
335 $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.la"
336 $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.a"