19 storage/storage_utils.h \
24 cgroups/cgroup_utils.h \
46 ../include/ifaddrs.h \
47 ../include/openpty.h \
48 ../include/lxcmntent.h
53 noinst_HEADERS += ../include/prlimit.h
59 noinst_HEADERS += ../include/getline.h
64 noinst_HEADERS += tools/include/getsubopt.h
74 LSM_SOURCES += lsm/apparmor.c
78 LSM_SOURCES += lsm/selinux.c
81 lib_LTLIBRARIES = liblxc.la
83 storage/storage.c storage/storage.h \
84 storage/aufs.c storage/aufs.h \
85 storage/btrfs.c storage/btrfs.h \
86 storage/dir.c storage/dir.h \
87 storage/loop.c storage/loop.h \
88 storage/lvm.c storage/lvm.h \
89 storage/nbd.c storage/nbd.h \
90 storage/overlay.c storage/overlay.h \
91 storage/rbd.c storage/rbd.h \
92 storage/rsync.c storage/rsync.h \
93 storage/zfs.c storage/zfs.h \
94 storage/storage_utils.c storage/storage_utils.h \
96 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
97 cgroups/cgroup.c cgroups/cgroup.h \
98 commands.c commands.h \
99 commands_utils.c commands_utils.h \
102 monitor.c monitor.h \
108 initutils.c initutils.h \
111 namespace.h namespace.c \
113 confile.c confile.h \
114 confile_utils.c confile_utils.h \
120 ringbuf.c ringbuf.h \
122 network.c network.h \
129 mainloop.c mainloop.h \
130 af_unix.c af_unix.h \
132 lxclock.h lxclock.c \
133 lxccontainer.c lxccontainer.h \
139 liblxc_la_SOURCES += \
140 ../include/ifaddrs.c ../include/ifaddrs.h \
141 ../include/openpty.c ../include/openpty.h \
142 ../include/lxcmntent.c ../include/lxcmntent.h
147 liblxc_la_SOURCES += ../include/prlimit.c ../include/prlimit.h
153 liblxc_la_SOURCES += ../include/getline.c ../include/getline.h
157 AM_CFLAGS=-DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
158 -DLXCPATH=\"$(LXCPATH)\" \
159 -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
160 -DLXCINITDIR=\"$(LXCINITDIR)\" \
161 -DLIBEXECDIR=\"$(LIBEXECDIR)\" \
162 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
163 -DLXCTEMPLATECONFIG=\"$(LXCTEMPLATECONFIG)\" \
164 -DLOGPATH=\"$(LOGPATH)\" \
165 -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
166 -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
167 -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
168 -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
169 -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
170 -DSBINDIR=\"$(SBINDIR)\" \
171 -I $(top_srcdir)/src \
172 -I $(top_srcdir)/src/lxc \
173 -I $(top_srcdir)/src/lxc/storage \
174 -I $(top_srcdir)/src/lxc/cgroups
177 AM_CFLAGS += -DHAVE_APPARMOR
181 AM_CFLAGS += -DHAVE_SELINUX
184 if USE_CONFIGPATH_LOGS
185 AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
189 AM_CFLAGS += -DHAVE_SECCOMP $(SECCOMP_CFLAGS)
190 liblxc_la_SOURCES += seccomp.c
193 liblxc_la_CFLAGS = -fPIC -DPIC $(AM_CFLAGS) -pthread
195 liblxc_la_LDFLAGS = \
198 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) \
199 -version-info @LXC_ABI_MAJOR@
201 liblxc_la_LIBADD = $(CAP_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS)
203 bin_SCRIPTS = cmd/lxc-checkconfig \
204 cmd/lxc-update-config
211 bin_SCRIPTS += tools/lxc-start-ephemeral
241 bin_PROGRAMS += lxc-clone
244 sbin_PROGRAMS = init.lxc
245 pkglibexec_PROGRAMS = \
251 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
253 LDADD=liblxc.la @CAP_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@
255 lxc_attach_SOURCES = tools/lxc_attach.c tools/arguments.c tools/tool_utils.c
256 lxc_autostart_SOURCES = tools/lxc_autostart.c tools/arguments.c tools/tool_utils.c
257 lxc_cgroup_SOURCES = tools/lxc_cgroup.c tools/arguments.c tools/tool_utils.c
258 lxc_config_SOURCES = tools/lxc_config.c tools/arguments.c tools/tool_utils.c
259 lxc_console_SOURCES = tools/lxc_console.c tools/arguments.c tools/tool_utils.c
260 lxc_destroy_SOURCES = tools/lxc_destroy.c tools/arguments.c tools/tool_utils.c
261 lxc_device_SOURCES = tools/lxc_device.c tools/arguments.c tools/tool_utils.c
262 lxc_execute_SOURCES = tools/lxc_execute.c tools/arguments.c tools/tool_utils.c
263 lxc_freeze_SOURCES = tools/lxc_freeze.c tools/arguments.c tools/tool_utils.c
264 lxc_info_SOURCES = tools/lxc_info.c tools/arguments.c tools/tool_utils.c
265 lxc_monitor_SOURCES = tools/lxc_monitor.c tools/arguments.c tools/tool_utils.c
266 lxc_ls_SOURCES = tools/lxc_ls.c tools/arguments.c tools/tool_utils.c
267 lxc_copy_SOURCES = tools/lxc_copy.c tools/arguments.c tools/tool_utils.c
268 lxc_start_SOURCES = tools/lxc_start.c tools/arguments.c tools/tool_utils.c
269 lxc_stop_SOURCES = tools/lxc_stop.c tools/arguments.c tools/tool_utils.c
270 lxc_top_SOURCES = tools/lxc_top.c tools/arguments.c tools/tool_utils.c
271 lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c tools/arguments.c tools/tool_utils.c
272 lxc_unshare_SOURCES = tools/lxc_unshare.c tools/arguments.c tools/tool_utils.c
273 lxc_wait_SOURCES = tools/lxc_wait.c tools/arguments.c tools/tool_utils.c
274 lxc_create_SOURCES = tools/lxc_create.c tools/arguments.c tools/tool_utils.c
275 lxc_snapshot_SOURCES = tools/lxc_snapshot.c tools/arguments.c tools/tool_utils.c
276 lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c tools/arguments.c tools/tool_utils.c
278 # Binaries shipping with liblxc
279 init_lxc_SOURCES = cmd/lxc_init.c
280 lxc_monitord_SOURCES = cmd/lxc_monitord.c
281 lxc_user_nic_SOURCES = cmd/lxc_user_nic.c namespace.c network.c parse.c
282 lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c
285 lxc_clone_SOURCES = tools/lxc_clone.c tools/arguments.c
289 lxc_copy_SOURCES += tools/include/getsubopt.c tools/include/getsubopt.h
292 if HAVE_STATIC_LIBCAP
293 sbin_PROGRAMS += init.lxc.static
295 init_lxc_static_SOURCES = cmd/lxc_init.c error.c log.c initutils.c caps.c parse.c namespace.c
299 init_lxc_static_SOURCES += ../include/getline.c
303 init_lxc_static_LDFLAGS = -all-static
304 init_lxc_static_LDADD = @CAP_LIBS@
305 init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
310 pam_LTLIBRARIES = pam_cgfs.la
311 pam_cgfs_la_SOURCES = pam/pam_cgfs.c
312 pam_cgfs_la_CFLAGS = $(AM_CFLAGS)
313 pam_cgfs_la_LIBADD = $(AM_LIBS) $(PAM_LIBS) -L$(top_srcdir)
314 pam_cgfs_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version -shared
318 install-exec-local: install-libLTLIBRARIES
319 mkdir -p $(DESTDIR)$(datadir)/lxc
320 install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
321 mv $(shell readlink -f $(DESTDIR)$(libdir)/liblxc.so) $(DESTDIR)$(libdir)/liblxc.so.@LXC_ABI@
322 rm -f $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.1
323 cd $(DESTDIR)$(libdir); \
324 ln -sf liblxc.so.@LXC_ABI@ liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)); \
325 ln -sf liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) liblxc.so
328 chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
331 $(RM) $(DESTDIR)$(libdir)/liblxc.so*
334 $(RM) $(DESTDIR)$(pamdir)/pam_cgfs.so*
336 install-data-hook: install-pamLTLIBRARIES
337 $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.la"
338 $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.a"