43 ../include/ifaddrs.h \
44 ../include/openpty.h \
45 ../include/lxcmntent.h
47 noinst_HEADERS += ../include/prlimit.h
53 noinst_HEADERS += ../include/getline.h
58 noinst_HEADERS += ../include/getsubopt.h
68 LSM_SOURCES += lsm/apparmor.c
72 LSM_SOURCES += lsm/selinux.c
75 lib_LTLIBRARIES = liblxc.la
77 arguments.c arguments.h \
78 bdev/bdev.c bdev/bdev.h \
79 bdev/lxcaufs.c bdev/lxcaufs.h \
80 bdev/lxcbtrfs.c bdev/lxcbtrfs.h \
81 bdev/lxcdir.c bdev/lxcdir.h \
82 bdev/lxcloop.c bdev/lxcloop.h \
83 bdev/lxclvm.c bdev/lxclvm.h \
84 bdev/lxcnbd.c bdev/lxcnbd.h \
85 bdev/lxcoverlay.c bdev/lxcoverlay.h \
86 bdev/lxcrbd.c bdev/lxcrbd.h \
87 bdev/lxcrsync.c bdev/lxcrsync.h \
88 bdev/lxczfs.c bdev/lxczfs.h \
91 cgroups/cgroup.c cgroups/cgroup.h \
92 commands.c commands.h \
101 initutils.c initutils.h \
104 namespace.h namespace.c \
106 confile.c confile.h \
107 confile_legacy.c confile_legacy.h \
108 confile_utils.c confile_utils.h \
115 network.c network.h \
122 mainloop.c mainloop.h \
123 af_unix.c af_unix.h \
125 lxcutmp.c lxcutmp.h \
126 lxclock.h lxclock.c \
127 lxccontainer.c lxccontainer.h \
133 liblxc_la_SOURCES += cgroups/cgmanager.c
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
142 liblxc_la_SOURCES += ../include/prlimit.c ../include/prlimit.h
148 liblxc_la_SOURCES += ../include/getline.c ../include/getline.h
152 AM_CFLAGS=-DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
153 -DLXCPATH=\"$(LXCPATH)\" \
154 -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
155 -DLXCINITDIR=\"$(LXCINITDIR)\" \
156 -DLIBEXECDIR=\"$(LIBEXECDIR)\" \
157 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
158 -DLXCTEMPLATECONFIG=\"$(LXCTEMPLATECONFIG)\" \
159 -DLOGPATH=\"$(LOGPATH)\" \
160 -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
161 -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
162 -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
163 -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
164 -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
165 -DSBINDIR=\"$(SBINDIR)\" \
166 -I $(top_srcdir)/src \
167 -I $(top_srcdir)/src/lxc \
168 -I $(top_srcdir)/src/lxc/bdev \
169 -I $(top_srcdir)/src/lxc/cgroups
172 AM_CFLAGS += -DHAVE_APPARMOR
176 AM_CFLAGS += -DHAVE_CGMANAGER
180 AM_CFLAGS += -DHAVE_SELINUX
183 if USE_CONFIGPATH_LOGS
184 AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
188 AM_CFLAGS += -DHAVE_SECCOMP $(SECCOMP_CFLAGS)
189 liblxc_la_SOURCES += seccomp.c
192 liblxc_la_CFLAGS = -fPIC -DPIC $(AM_CFLAGS) -pthread
194 liblxc_la_LDFLAGS = \
197 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) \
198 -version-info @LXC_ABI_MAJOR@
200 liblxc_la_LIBADD = $(CAP_LIBS) $(APPARMOR_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS)
203 liblxc_la_LIBADD += $(CGMANAGER_LIBS) $(DBUS_LIBS) $(NIH_LIBS) $(NIH_DBUS_LIBS)
204 liblxc_la_CFLAGS += $(CGMANAGER_CFLAGS) $(DBUS_CFLAGS) $(NIH_CFLAGS) $(NIH_DBUS_CFLAGS)
207 bin_SCRIPTS = tools/lxc-checkconfig
214 bin_SCRIPTS += tools/lxc-start-ephemeral
244 bin_PROGRAMS += lxc-clone
247 sbin_PROGRAMS = init.lxc
248 pkglibexec_PROGRAMS = \
254 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
256 LDADD=liblxc.la @CAP_LIBS@ @APPARMOR_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@
258 lxc_attach_SOURCES = tools/lxc_attach.c
259 lxc_autostart_SOURCES = tools/lxc_autostart.c
260 lxc_cgroup_SOURCES = tools/lxc_cgroup.c
261 lxc_config_SOURCES = tools/lxc_config.c
262 lxc_console_SOURCES = tools/lxc_console.c
263 lxc_destroy_SOURCES = tools/lxc_destroy.c
264 lxc_device_SOURCES = tools/lxc_device.c
265 lxc_execute_SOURCES = tools/lxc_execute.c
266 lxc_freeze_SOURCES = tools/lxc_freeze.c
267 lxc_info_SOURCES = tools/lxc_info.c
268 init_lxc_SOURCES = tools/lxc_init.c
269 lxc_monitor_SOURCES = tools/lxc_monitor.c
270 lxc_ls_SOURCES = tools/lxc_ls.c
271 lxc_copy_SOURCES = tools/lxc_copy.c
272 lxc_start_SOURCES = tools/lxc_start.c
273 lxc_stop_SOURCES = tools/lxc_stop.c
274 lxc_top_SOURCES = tools/lxc_top.c
275 lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c
276 lxc_unshare_SOURCES = tools/lxc_unshare.c
277 lxc_wait_SOURCES = tools/lxc_wait.c
278 lxc_create_SOURCES = tools/lxc_create.c
279 lxc_snapshot_SOURCES = tools/lxc_snapshot.c
280 lxc_usernsexec_SOURCES = tools/lxc_usernsexec.c
281 lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c
282 lxc_user_nic_SOURCES = lxc_user_nic.c network.c network.h
283 lxc_monitord_SOURCES = lxc_monitord.c
286 lxc_clone_SOURCES = tools/lxc_clone.c
290 lxc_copy_SOURCES += ../include/getsubopt.c ../include/getsubopt.h
293 if HAVE_STATIC_LIBCAP
294 sbin_PROGRAMS += init.lxc.static
296 init_lxc_static_SOURCES = tools/lxc_init.c error.c log.c initutils.c caps.c
300 init_lxc_static_SOURCES += ../include/getline.c
304 init_lxc_static_LDFLAGS = -all-static
305 init_lxc_static_LDADD = @CAP_LIBS@
306 init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
309 install-exec-local: install-libLTLIBRARIES
310 mkdir -p $(DESTDIR)$(datadir)/lxc
311 install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
312 mv $(shell readlink -f $(DESTDIR)$(libdir)/liblxc.so) $(DESTDIR)$(libdir)/liblxc.so.@LXC_ABI@
313 rm -f $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.1
314 cd $(DESTDIR)$(libdir); \
315 ln -sf liblxc.so.@LXC_ABI@ liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)); \
316 ln -sf liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) liblxc.so
319 chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
322 $(RM) $(DESTDIR)$(libdir)/liblxc.so*