1 pkginclude_HEADERS = attach_options.h \
5 noinst_HEADERS = attach.h \
8 cgroups/cgroup_utils.h \
34 storage/storage_utils.h \
43 noinst_HEADERS += ../include/ifaddrs.h \
44 ../include/lxcmntent.h \
50 noinst_HEADERS += ../include/prlimit.h
56 noinst_HEADERS += ../include/getline.h
61 noinst_HEADERS += tools/include/getsubopt.h
65 noinst_HEADERS += ../include/getgrgid_r.h
70 LSM_SOURCES = lsm/lsm.c \
75 LSM_SOURCES += lsm/apparmor.c
79 LSM_SOURCES += lsm/selinux.c
82 lib_LTLIBRARIES = liblxc.la
83 liblxc_la_SOURCES = af_unix.c af_unix.h \
87 cgroups/cgroup.c cgroups/cgroup.h \
88 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
89 commands.c commands.h \
90 commands_utils.c commands_utils.h \
93 confile_utils.c confile_utils.h \
98 file_utils.c file_utils.h \
99 initutils.c initutils.h \
103 lxccontainer.c lxccontainer.h \
104 lxclock.c lxclock.h \
107 mainloop.c mainloop.h \
108 namespace.c namespace.h \
110 network.c network.h \
111 monitor.c monitor.h \
113 ringbuf.c ringbuf.h \
117 storage/btrfs.c storage/btrfs.h \
118 storage/dir.c storage/dir.h \
119 storage/loop.c storage/loop.h \
120 storage/lvm.c storage/lvm.h \
121 storage/nbd.c storage/nbd.h \
122 storage/overlay.c storage/overlay.h \
123 storage/rbd.c storage/rbd.h \
124 storage/rsync.c storage/rsync.h \
125 storage/storage.c storage/storage.h \
126 storage/storage_utils.c storage/storage_utils.h \
127 storage/zfs.c storage/zfs.h \
128 string_utils.c string_utils.h \
136 liblxc_la_SOURCES += ../include/ifaddrs.c ../include/ifaddrs.h \
137 ../include/lxcmntent.c ../include/lxcmntent.h \
138 ../include/openpty.c ../include/openpty.h
142 liblxc_la_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
147 liblxc_la_SOURCES += ../include/getline.c ../include/getline.h
153 liblxc_la_SOURCES += ../include/prlimit.c ../include/prlimit.h
158 liblxc_la_SOURCES += seccomp.c
162 liblxc_la_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
166 liblxc_la_SOURCES += ../include/strlcat.c ../include/strlcat.h
169 AM_CFLAGS = -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
170 -DLXCPATH=\"$(LXCPATH)\" \
171 -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
172 -DLXCINITDIR=\"$(LXCINITDIR)\" \
173 -DLIBEXECDIR=\"$(LIBEXECDIR)\" \
174 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
175 -DLXCTEMPLATECONFIG=\"$(LXCTEMPLATECONFIG)\" \
176 -DLOGPATH=\"$(LOGPATH)\" \
177 -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
178 -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
179 -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
180 -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
181 -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
182 -DSBINDIR=\"$(SBINDIR)\" \
183 -DAPPARMOR_CACHE_DIR=\"$(APPARMOR_CACHE_DIR)\" \
184 -I $(top_srcdir)/src \
185 -I $(top_srcdir)/src/lxc \
186 -I $(top_srcdir)/src/lxc/storage \
187 -I $(top_srcdir)/src/lxc/cgroups
190 AM_CFLAGS += -DHAVE_APPARMOR
194 AM_CFLAGS += -DHAVE_LIBGNUTLS
198 AM_CFLAGS += -DHAVE_SECCOMP \
203 AM_CFLAGS += -DHAVE_SELINUX
206 if USE_CONFIGPATH_LOGS
207 AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
210 # build the shared library
211 liblxc_la_CFLAGS = -fPIC \
216 liblxc_la_LDFLAGS = -pthread \
217 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) \
218 -version-info @LXC_ABI_MAJOR@
220 liblxc_la_LIBADD = $(CAP_LIBS) \
228 bin_SCRIPTS += cmd/lxc-checkconfig \
229 cmd/lxc-update-config
233 bin_PROGRAMS = lxc-attach \
259 sbin_PROGRAMS = init.lxc
261 pkglibexec_PROGRAMS = lxc-monitord \
268 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
278 lxc_attach_SOURCES = tools/lxc_attach.c \
279 tools/arguments.c tools/arguments.h
280 lxc_autostart_SOURCES = tools/lxc_autostart.c \
281 tools/arguments.c tools/arguments.h
282 lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
283 tools/arguments.c tools/arguments.h
284 lxc_config_SOURCES = tools/lxc_config.c \
285 tools/arguments.c tools/arguments.h
286 lxc_console_SOURCES = tools/lxc_console.c \
287 tools/arguments.c tools/arguments.h
288 lxc_destroy_SOURCES = tools/lxc_destroy.c \
289 tools/arguments.c tools/arguments.h
290 lxc_device_SOURCES = tools/lxc_device.c \
291 tools/arguments.c tools/arguments.h
292 lxc_execute_SOURCES = tools/lxc_execute.c \
293 tools/arguments.c tools/arguments.h
294 lxc_freeze_SOURCES = tools/lxc_freeze.c \
295 tools/arguments.c tools/arguments.h
296 lxc_info_SOURCES = tools/lxc_info.c \
297 tools/arguments.c tools/arguments.h
298 lxc_monitor_SOURCES = tools/lxc_monitor.c \
299 tools/arguments.c tools/arguments.h
300 lxc_ls_SOURCES = tools/lxc_ls.c \
301 tools/arguments.c tools/arguments.h
302 lxc_copy_SOURCES = tools/lxc_copy.c \
303 tools/arguments.c tools/arguments.h
304 lxc_start_SOURCES = tools/lxc_start.c \
305 tools/arguments.c tools/arguments.h
306 lxc_stop_SOURCES = tools/lxc_stop.c \
307 tools/arguments.c tools/arguments.h
308 lxc_top_SOURCES = tools/lxc_top.c \
309 tools/arguments.c tools/arguments.h
310 lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
311 tools/arguments.c tools/arguments.h
312 lxc_unshare_SOURCES = tools/lxc_unshare.c \
313 tools/arguments.c tools/arguments.h
314 lxc_wait_SOURCES = tools/lxc_wait.c \
315 tools/arguments.c tools/arguments.h
316 lxc_create_SOURCES = tools/lxc_create.c \
317 tools/arguments.c tools/arguments.h
318 lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
319 tools/arguments.c tools/arguments.h
320 lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
321 tools/arguments.c tools/arguments.h
325 # Binaries shipping with liblxc
326 init_lxc_SOURCES = cmd/lxc_init.c \
327 string_utils.c string_utils.h
328 lxc_monitord_SOURCES = cmd/lxc_monitord.c
329 lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \
331 namespace.c namespace.h \
332 network.c network.h \
334 lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
339 namespace.c namespace.h \
340 file_utils.c file_utils.h \
341 string_utils.c string_utils.h \
348 lxc_copy_SOURCES += tools/include/getsubopt.c tools/include/getsubopt.h
353 if HAVE_STATIC_LIBCAP
354 sbin_PROGRAMS += init.lxc.static
356 init_lxc_static_SOURCES = cmd/lxc_init.c \
359 initutils.c initutils.h \
360 file_utils.c file_utils.h \
363 namespace.c namespace.h \
364 string_utils.c string_utils.h
368 init_lxc_static_SOURCES += ../include/getline.c ../include/getline.h
373 init_lxc_static_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
377 init_lxc_static_SOURCES += ../include/strlcat.c ../include/strlcat.h
380 init_lxc_static_LDFLAGS = -all-static
381 init_lxc_static_LDADD = @CAP_LIBS@
382 init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
388 pam_LTLIBRARIES = pam_cgfs.la
389 pam_cgfs_la_SOURCES = pam/pam_cgfs.c \
390 pam/utils.c pam/utils.h
391 pam_cgfs_la_CFLAGS = $(AM_CFLAGS)
392 pam_cgfs_la_LIBADD = $(AM_LIBS) \
395 pam_cgfs_la_LDFLAGS = $(AM_LDFLAGS) \
402 install-exec-local: install-libLTLIBRARIES
403 mkdir -p $(DESTDIR)$(datadir)/lxc
404 install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
405 mv $(shell readlink -f $(DESTDIR)$(libdir)/liblxc.so) $(DESTDIR)$(libdir)/liblxc.so.@LXC_ABI@
406 rm -f $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.1
407 cd $(DESTDIR)$(libdir); \
408 ln -sf liblxc.so.@LXC_ABI@ liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)); \
409 ln -sf liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) liblxc.so
412 chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
415 $(RM) $(DESTDIR)$(libdir)/liblxc.so*
416 $(RM) $(DESTDIR)$(libdir)/liblxc.a
419 $(RM) $(DESTDIR)$(pamdir)/pam_cgfs.so*
421 install-data-hook: install-pamLTLIBRARIES
422 $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.la"
423 $(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.a"