20 storage/storage_utils.h \
22 cgroups/cgroup_utils.h \
45 ../include/ifaddrs.h \
46 ../include/openpty.h \
47 ../include/lxcmntent.h
49 noinst_HEADERS += ../include/prlimit.h
55 noinst_HEADERS += ../include/getline.h
60 noinst_HEADERS += ../include/getsubopt.h
70 LSM_SOURCES += lsm/apparmor.c
74 LSM_SOURCES += lsm/selinux.c
77 lib_LTLIBRARIES = liblxc.la
79 arguments.c arguments.h \
80 storage/storage.c storage/storage.h \
81 storage/aufs.c storage/aufs.h \
82 storage/btrfs.c storage/btrfs.h \
83 storage/dir.c storage/dir.h \
84 storage/loop.c storage/loop.h \
85 storage/lvm.c storage/lvm.h \
86 storage/nbd.c storage/nbd.h \
87 storage/overlay.c storage/overlay.h \
88 storage/rbd.c storage/rbd.h \
89 storage/rsync.c storage/rsync.h \
90 storage/zfs.c storage/zfs.h \
91 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_legacy.c confile_legacy.h \
113 confile_utils.c confile_utils.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 += cgroups/cgmanager.c
141 liblxc_la_SOURCES += \
142 ../include/ifaddrs.c ../include/ifaddrs.h \
143 ../include/openpty.c ../include/openpty.h \
144 ../include/lxcmntent.c ../include/lxcmntent.h
146 liblxc_la_SOURCES += ../include/prlimit.c ../include/prlimit.h
152 liblxc_la_SOURCES += ../include/getline.c ../include/getline.h
156 AM_CFLAGS=-DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
157 -DLXCPATH=\"$(LXCPATH)\" \
158 -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
159 -DLXCINITDIR=\"$(LXCINITDIR)\" \
160 -DLIBEXECDIR=\"$(LIBEXECDIR)\" \
161 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
162 -DLXCTEMPLATECONFIG=\"$(LXCTEMPLATECONFIG)\" \
163 -DLOGPATH=\"$(LOGPATH)\" \
164 -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
165 -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
166 -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
167 -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
168 -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
169 -DSBINDIR=\"$(SBINDIR)\" \
170 -I $(top_srcdir)/src \
171 -I $(top_srcdir)/src/lxc \
172 -I $(top_srcdir)/src/lxc/storage \
173 -I $(top_srcdir)/src/lxc/cgroups
176 AM_CFLAGS += -DHAVE_APPARMOR
180 AM_CFLAGS += -DHAVE_CGMANAGER
184 AM_CFLAGS += -DHAVE_SELINUX
187 if USE_CONFIGPATH_LOGS
188 AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
192 AM_CFLAGS += -DHAVE_SECCOMP $(SECCOMP_CFLAGS)
193 liblxc_la_SOURCES += seccomp.c
196 liblxc_la_CFLAGS = -fPIC -DPIC $(AM_CFLAGS) -pthread
198 liblxc_la_LDFLAGS = \
201 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) \
202 -version-info @LXC_ABI_MAJOR@
204 liblxc_la_LIBADD = $(CAP_LIBS) $(APPARMOR_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS)
207 liblxc_la_LIBADD += $(CGMANAGER_LIBS) $(DBUS_LIBS) $(NIH_LIBS) $(NIH_DBUS_LIBS)
208 liblxc_la_CFLAGS += $(CGMANAGER_CFLAGS) $(DBUS_CFLAGS) $(NIH_CFLAGS) $(NIH_DBUS_CFLAGS)
211 bin_SCRIPTS = tools/lxc-checkconfig \
212 tools/lxc-update-config
219 bin_SCRIPTS += tools/lxc-start-ephemeral
249 bin_PROGRAMS += lxc-clone
252 sbin_PROGRAMS = init.lxc
253 pkglibexec_PROGRAMS = \
259 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
261 LDADD=liblxc.la @CAP_LIBS@ @APPARMOR_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@
263 lxc_attach_SOURCES = tools/lxc_attach.c
264 lxc_autostart_SOURCES = tools/lxc_autostart.c
265 lxc_cgroup_SOURCES = tools/lxc_cgroup.c
266 lxc_config_SOURCES = tools/lxc_config.c
267 lxc_console_SOURCES = tools/lxc_console.c
268 lxc_destroy_SOURCES = tools/lxc_destroy.c
269 lxc_device_SOURCES = tools/lxc_device.c
270 lxc_execute_SOURCES = tools/lxc_execute.c
271 lxc_freeze_SOURCES = tools/lxc_freeze.c
272 lxc_info_SOURCES = tools/lxc_info.c
273 init_lxc_SOURCES = tools/lxc_init.c
274 lxc_monitor_SOURCES = tools/lxc_monitor.c
275 lxc_ls_SOURCES = tools/lxc_ls.c
276 lxc_copy_SOURCES = tools/lxc_copy.c
277 lxc_start_SOURCES = tools/lxc_start.c
278 lxc_stop_SOURCES = tools/lxc_stop.c
279 lxc_top_SOURCES = tools/lxc_top.c
280 lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c
281 lxc_unshare_SOURCES = tools/lxc_unshare.c
282 lxc_wait_SOURCES = tools/lxc_wait.c
283 lxc_create_SOURCES = tools/lxc_create.c
284 lxc_snapshot_SOURCES = tools/lxc_snapshot.c
285 lxc_usernsexec_SOURCES = tools/lxc_usernsexec.c
286 lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c
287 lxc_user_nic_SOURCES = lxc_user_nic.c network.c network.h
288 lxc_monitord_SOURCES = lxc_monitord.c
291 lxc_clone_SOURCES = tools/lxc_clone.c
295 lxc_copy_SOURCES += ../include/getsubopt.c ../include/getsubopt.h
298 if HAVE_STATIC_LIBCAP
299 sbin_PROGRAMS += init.lxc.static
301 init_lxc_static_SOURCES = tools/lxc_init.c error.c log.c initutils.c caps.c
305 init_lxc_static_SOURCES += ../include/getline.c
309 init_lxc_static_LDFLAGS = -all-static
310 init_lxc_static_LDADD = @CAP_LIBS@
311 init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
314 install-exec-local: install-libLTLIBRARIES
315 mkdir -p $(DESTDIR)$(datadir)/lxc
316 install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
317 mv $(shell readlink -f $(DESTDIR)$(libdir)/liblxc.so) $(DESTDIR)$(libdir)/liblxc.so.@LXC_ABI@
318 rm -f $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.1
319 cd $(DESTDIR)$(libdir); \
320 ln -sf liblxc.so.@LXC_ABI@ liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)); \
321 ln -sf liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) liblxc.so
324 chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
327 $(RM) $(DESTDIR)$(libdir)/liblxc.so*