20 storage/storage_utils.h \
22 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 += ../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/aufs.c storage/aufs.h \
84 storage/btrfs.c storage/btrfs.h \
85 storage/dir.c storage/dir.h \
86 storage/loop.c storage/loop.h \
87 storage/lvm.c storage/lvm.h \
88 storage/nbd.c storage/nbd.h \
89 storage/overlay.c storage/overlay.h \
90 storage/rbd.c storage/rbd.h \
91 storage/rsync.c storage/rsync.h \
92 storage/zfs.c storage/zfs.h \
93 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_legacy.c confile_legacy.h \
115 confile_utils.c confile_utils.h \
121 ringbuf.c ringbuf.h \
123 network.c network.h \
130 mainloop.c mainloop.h \
131 af_unix.c af_unix.h \
133 lxclock.h lxclock.c \
134 lxccontainer.c lxccontainer.h \
140 liblxc_la_SOURCES += cgroups/cgmanager.c
144 liblxc_la_SOURCES += \
145 ../include/ifaddrs.c ../include/ifaddrs.h \
146 ../include/openpty.c ../include/openpty.h \
147 ../include/lxcmntent.c ../include/lxcmntent.h
152 liblxc_la_SOURCES += ../include/prlimit.c ../include/prlimit.h
158 liblxc_la_SOURCES += ../include/getline.c ../include/getline.h
162 AM_CFLAGS=-DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
163 -DLXCPATH=\"$(LXCPATH)\" \
164 -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
165 -DLXCINITDIR=\"$(LXCINITDIR)\" \
166 -DLIBEXECDIR=\"$(LIBEXECDIR)\" \
167 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
168 -DLXCTEMPLATECONFIG=\"$(LXCTEMPLATECONFIG)\" \
169 -DLOGPATH=\"$(LOGPATH)\" \
170 -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
171 -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
172 -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
173 -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
174 -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
175 -DSBINDIR=\"$(SBINDIR)\" \
176 -I $(top_srcdir)/src \
177 -I $(top_srcdir)/src/lxc \
178 -I $(top_srcdir)/src/lxc/storage \
179 -I $(top_srcdir)/src/lxc/cgroups
182 AM_CFLAGS += -DHAVE_APPARMOR
186 AM_CFLAGS += -DHAVE_CGMANAGER
190 AM_CFLAGS += -DHAVE_SELINUX
193 if USE_CONFIGPATH_LOGS
194 AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
198 AM_CFLAGS += -DHAVE_SECCOMP $(SECCOMP_CFLAGS)
199 liblxc_la_SOURCES += seccomp.c
202 liblxc_la_CFLAGS = -fPIC -DPIC $(AM_CFLAGS) -pthread
204 liblxc_la_LDFLAGS = \
207 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) \
208 -version-info @LXC_ABI_MAJOR@
210 liblxc_la_LIBADD = $(CAP_LIBS) $(APPARMOR_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS)
213 liblxc_la_LIBADD += $(CGMANAGER_LIBS) $(DBUS_LIBS) $(NIH_LIBS) $(NIH_DBUS_LIBS)
214 liblxc_la_CFLAGS += $(CGMANAGER_CFLAGS) $(DBUS_CFLAGS) $(NIH_CFLAGS) $(NIH_DBUS_CFLAGS)
217 bin_SCRIPTS = tools/lxc-checkconfig \
218 tools/lxc-update-config
225 bin_SCRIPTS += tools/lxc-start-ephemeral
255 bin_PROGRAMS += lxc-clone
258 sbin_PROGRAMS = init.lxc
259 pkglibexec_PROGRAMS = \
265 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
267 LDADD=liblxc.la @CAP_LIBS@ @APPARMOR_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@
269 lxc_attach_SOURCES = tools/lxc_attach.c tools/arguments.c
270 lxc_autostart_SOURCES = tools/lxc_autostart.c tools/arguments.c
271 lxc_cgroup_SOURCES = tools/lxc_cgroup.c tools/arguments.c
272 lxc_config_SOURCES = tools/lxc_config.c tools/arguments.c
273 lxc_console_SOURCES = tools/lxc_console.c tools/arguments.c
274 lxc_destroy_SOURCES = tools/lxc_destroy.c tools/arguments.c
275 lxc_device_SOURCES = tools/lxc_device.c tools/arguments.c
276 lxc_execute_SOURCES = tools/lxc_execute.c tools/arguments.c
277 lxc_freeze_SOURCES = tools/lxc_freeze.c tools/arguments.c
278 lxc_info_SOURCES = tools/lxc_info.c tools/arguments.c
279 init_lxc_SOURCES = tools/lxc_init.c tools/arguments.c
280 lxc_monitor_SOURCES = tools/lxc_monitor.c tools/arguments.c
281 lxc_ls_SOURCES = tools/lxc_ls.c tools/arguments.c
282 lxc_copy_SOURCES = tools/lxc_copy.c tools/arguments.c
283 lxc_start_SOURCES = tools/lxc_start.c tools/arguments.c
284 lxc_stop_SOURCES = tools/lxc_stop.c tools/arguments.c
285 lxc_top_SOURCES = tools/lxc_top.c tools/arguments.c
286 lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c tools/arguments.c
287 lxc_unshare_SOURCES = tools/lxc_unshare.c tools/arguments.c
288 lxc_wait_SOURCES = tools/lxc_wait.c tools/arguments.c
289 lxc_create_SOURCES = tools/lxc_create.c tools/arguments.c
290 lxc_snapshot_SOURCES = tools/lxc_snapshot.c tools/arguments.c
291 lxc_usernsexec_SOURCES = tools/lxc_usernsexec.c tools/arguments.c
292 lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c tools/arguments.c
293 lxc_user_nic_SOURCES = lxc_user_nic.c network.c network.h tools/arguments.c
294 lxc_monitord_SOURCES = lxc_monitord.c tools/arguments.c
297 lxc_clone_SOURCES = tools/lxc_clone.c tools/arguments.c
301 lxc_copy_SOURCES += ../include/getsubopt.c ../include/getsubopt.h
304 if HAVE_STATIC_LIBCAP
305 sbin_PROGRAMS += init.lxc.static
307 init_lxc_static_SOURCES = tools/lxc_init.c error.c log.c initutils.c caps.c \
312 init_lxc_static_SOURCES += ../include/getline.c
316 init_lxc_static_LDFLAGS = -all-static
317 init_lxc_static_LDADD = @CAP_LIBS@
318 init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
321 install-exec-local: install-libLTLIBRARIES
322 mkdir -p $(DESTDIR)$(datadir)/lxc
323 install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
324 mv $(shell readlink -f $(DESTDIR)$(libdir)/liblxc.so) $(DESTDIR)$(libdir)/liblxc.so.@LXC_ABI@
325 rm -f $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.1
326 cd $(DESTDIR)$(libdir); \
327 ln -sf liblxc.so.@LXC_ABI@ liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)); \
328 ln -sf liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) liblxc.so
331 chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
334 $(RM) $(DESTDIR)$(libdir)/liblxc.so*