31 ../include/ifaddrs.h \
32 ../include/openpty.h \
33 ../include/lxcmntent.h
38 noinst_HEADERS += ../include/getline.h
43 noinst_HEADERS += ../include/getsubopt.h
47 # use PROGRAMS to avoid complains from automake
48 so_PROGRAMS = liblxc.so
55 LSM_SOURCES += lsm/apparmor.c
59 LSM_SOURCES += lsm/selinux.c
63 arguments.c arguments.h \
64 bdev/bdev.c bdev/bdev.h bdev/overlay.c bdev/overlay.h bdev/lxc-btrfs.h \
65 commands.c commands.h \
76 initutils.c initutils.h \
79 namespace.h namespace.c \
95 mainloop.c mainloop.h \
100 lxccontainer.c lxccontainer.h \
106 liblxc_so_SOURCES += cgmanager.c
110 liblxc_so_SOURCES += \
111 ../include/ifaddrs.c ../include/ifaddrs.h \
112 ../include/openpty.c ../include/openpty.h \
113 ../include/lxcmntent.c ../include/lxcmntent.h
118 liblxc_so_SOURCES += ../include/getline.c ../include/getline.h
122 AM_CFLAGS=-I$(top_srcdir)/src \
123 -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
124 -DLXCPATH=\"$(LXCPATH)\" \
125 -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
126 -DLXCINITDIR=\"$(LXCINITDIR)\" \
127 -DLIBEXECDIR=\"$(LIBEXECDIR)\" \
128 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
129 -DLOGPATH=\"$(LOGPATH)\" \
130 -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
131 -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
132 -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
133 -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
134 -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
135 -DSBINDIR=\"$(SBINDIR)\"
138 AM_CFLAGS += -DHAVE_APPARMOR
142 AM_CFLAGS += -DHAVE_CGMANAGER
146 AM_CFLAGS += -DHAVE_SELINUX
149 if USE_CONFIGPATH_LOGS
150 AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
154 AM_CFLAGS += -DHAVE_SECCOMP $(SECCOMP_CFLAGS)
155 liblxc_so_SOURCES += seccomp.c
158 liblxc_so_CFLAGS = -fPIC -DPIC $(AM_CFLAGS) -pthread
160 liblxc_so_LDFLAGS = \
163 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,$(VERSION)))
165 liblxc_so_LDADD = $(CAP_LIBS) $(APPARMOR_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS)
168 liblxc_so_LDADD += $(CGMANAGER_LIBS) $(DBUS_LIBS) $(NIH_LIBS) $(NIH_DBUS_LIBS)
169 liblxc_so_CFLAGS += $(CGMANAGER_CFLAGS) $(DBUS_CFLAGS) $(NIH_CFLAGS) $(NIH_DBUS_CFLAGS)
172 bin_SCRIPTS = lxc-checkconfig
179 bin_SCRIPTS += lxc-ls
180 bin_SCRIPTS += lxc-start-ephemeral
182 bin_SCRIPTS += legacy/lxc-ls
210 sbin_PROGRAMS = init.lxc
211 pkglibexec_PROGRAMS = \
217 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
219 LDADD=liblxc.so @CAP_LIBS@ @APPARMOR_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@
221 lxc_attach_SOURCES = lxc_attach.c
222 lxc_autostart_SOURCES = lxc_autostart.c
223 lxc_cgroup_SOURCES = lxc_cgroup.c
224 lxc_config_SOURCES = lxc_config.c
225 lxc_console_SOURCES = lxc_console.c
226 lxc_destroy_SOURCES = lxc_destroy.c
227 lxc_device_SOURCES = lxc_device.c
228 lxc_execute_SOURCES = lxc_execute.c
229 lxc_freeze_SOURCES = lxc_freeze.c
230 lxc_info_SOURCES = lxc_info.c
231 init_lxc_SOURCES = lxc_init.c
232 lxc_monitor_SOURCES = lxc_monitor.c
233 lxc_monitord_SOURCES = lxc_monitord.c
234 lxc_clone_SOURCES = lxc_clone.c
235 lxc_copy_SOURCES = lxc_copy.c
236 lxc_start_SOURCES = lxc_start.c
237 lxc_stop_SOURCES = lxc_stop.c
238 lxc_top_SOURCES = lxc_top.c
239 lxc_unfreeze_SOURCES = lxc_unfreeze.c
240 lxc_unshare_SOURCES = lxc_unshare.c
241 lxc_wait_SOURCES = lxc_wait.c
242 lxc_create_SOURCES = lxc_create.c
243 lxc_snapshot_SOURCES = lxc_snapshot.c
244 lxc_usernsexec_SOURCES = lxc_usernsexec.c
245 lxc_user_nic_SOURCES = lxc_user_nic.c network.c network.h
246 lxc_checkpoint_SOURCES = lxc_checkpoint.c
249 lxc_copy_SOURCES += ../include/getsubopt.c ../include/getsubopt.h
252 if HAVE_STATIC_LIBCAP
253 sbin_PROGRAMS += init.lxc.static
255 init_lxc_static_SOURCES = lxc_init.c error.c log.c initutils.c caps.c
259 init_lxc_static_SOURCES += ../include/getline.c
263 init_lxc_static_LDFLAGS = -static
264 init_lxc_static_LDADD = @CAP_LIBS@
265 init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
268 install-exec-local: install-soPROGRAMS
269 mkdir -p $(DESTDIR)$(datadir)/lxc
270 install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
271 mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
272 cd $(DESTDIR)$(libdir); \
273 ln -sf liblxc.so.$(VERSION) liblxc.so.$(firstword $(subst ., ,$(VERSION))); \
274 ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so
277 chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
280 $(RM) $(DESTDIR)$(libdir)/liblxc.so*