30 ../include/ifaddrs.h \
31 ../include/openpty.h \
32 ../include/lxcmntent.h
37 noinst_HEADERS += ../include/getline.h
42 noinst_HEADERS += ../include/getsubopt.h
46 # use PROGRAMS to avoid complains from automake
47 so_PROGRAMS = liblxc.so
54 LSM_SOURCES += lsm/apparmor.c
58 LSM_SOURCES += lsm/selinux.c
62 arguments.c arguments.h \
63 bdev.c bdev.h lxc-btrfs.h \
64 commands.c commands.h \
75 initutils.c initutils.h \
78 namespace.h namespace.c \
94 mainloop.c mainloop.h \
99 lxccontainer.c lxccontainer.h \
105 liblxc_so_SOURCES += cgmanager.c
109 liblxc_so_SOURCES += \
110 ../include/ifaddrs.c ../include/ifaddrs.h \
111 ../include/openpty.c ../include/openpty.h \
112 ../include/lxcmntent.c ../include/lxcmntent.h
117 liblxc_so_SOURCES += ../include/getline.c ../include/getline.h
121 AM_CFLAGS=-I$(top_srcdir)/src \
122 -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
123 -DLXCPATH=\"$(LXCPATH)\" \
124 -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
125 -DLXCINITDIR=\"$(LXCINITDIR)\" \
126 -DLIBEXECDIR=\"$(LIBEXECDIR)\" \
127 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
128 -DLOGPATH=\"$(LOGPATH)\" \
129 -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
130 -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
131 -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
132 -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
133 -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
134 -DSBINDIR=\"$(SBINDIR)\"
137 AM_CFLAGS += -DHAVE_APPARMOR
141 AM_CFLAGS += -DHAVE_CGMANAGER
145 AM_CFLAGS += -DHAVE_SELINUX
148 if USE_CONFIGPATH_LOGS
149 AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
153 AM_CFLAGS += -DHAVE_SECCOMP $(SECCOMP_CFLAGS)
154 liblxc_so_SOURCES += seccomp.c
157 liblxc_so_CFLAGS = -fPIC -DPIC $(AM_CFLAGS) -pthread
159 liblxc_so_LDFLAGS = \
162 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,$(VERSION)))
164 liblxc_so_LDADD = $(CAP_LIBS) $(APPARMOR_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS)
167 liblxc_so_LDADD += $(CGMANAGER_LIBS) $(DBUS_LIBS) $(NIH_LIBS) $(NIH_DBUS_LIBS)
168 liblxc_so_CFLAGS += $(CGMANAGER_CFLAGS) $(DBUS_CFLAGS) $(NIH_CFLAGS) $(NIH_DBUS_CFLAGS)
171 bin_SCRIPTS = lxc-checkconfig
178 bin_SCRIPTS += lxc-ls
179 bin_SCRIPTS += lxc-start-ephemeral
181 bin_SCRIPTS += legacy/lxc-ls
209 sbin_PROGRAMS = init.lxc
210 pkglibexec_PROGRAMS = \
216 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
218 LDADD=liblxc.so @CAP_LIBS@ @APPARMOR_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@
220 lxc_attach_SOURCES = lxc_attach.c
221 lxc_autostart_SOURCES = lxc_autostart.c
222 lxc_cgroup_SOURCES = lxc_cgroup.c
223 lxc_config_SOURCES = lxc_config.c
224 lxc_console_SOURCES = lxc_console.c
225 lxc_destroy_SOURCES = lxc_destroy.c
226 lxc_device_SOURCES = lxc_device.c
227 lxc_execute_SOURCES = lxc_execute.c
228 lxc_freeze_SOURCES = lxc_freeze.c
229 lxc_info_SOURCES = lxc_info.c
230 init_lxc_SOURCES = lxc_init.c
231 lxc_monitor_SOURCES = lxc_monitor.c
232 lxc_monitord_SOURCES = lxc_monitord.c
233 lxc_clone_SOURCES = lxc_clone.c
234 lxc_copy_SOURCES = lxc_copy.c
235 lxc_start_SOURCES = lxc_start.c
236 lxc_stop_SOURCES = lxc_stop.c
237 lxc_top_SOURCES = lxc_top.c
238 lxc_unfreeze_SOURCES = lxc_unfreeze.c
239 lxc_unshare_SOURCES = lxc_unshare.c
240 lxc_wait_SOURCES = lxc_wait.c
241 lxc_create_SOURCES = lxc_create.c
242 lxc_snapshot_SOURCES = lxc_snapshot.c
243 lxc_usernsexec_SOURCES = lxc_usernsexec.c
244 lxc_user_nic_SOURCES = lxc_user_nic.c network.c network.h
245 lxc_checkpoint_SOURCES = lxc_checkpoint.c
248 lxc_copy_SOURCES += ../include/getsubopt.c ../include/getsubopt.h
251 if HAVE_STATIC_LIBCAP
252 sbin_PROGRAMS += init.lxc.static
254 init_lxc_static_SOURCES = lxc_init.c error.c log.c initutils.c caps.c
258 init_lxc_static_SOURCES += ../include/getline.c
262 init_lxc_static_LDFLAGS = -static
263 init_lxc_static_LDADD = @CAP_LIBS@
264 init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
267 install-exec-local: install-soPROGRAMS
268 mkdir -p $(DESTDIR)$(datadir)/lxc
269 install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
270 mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
271 cd $(DESTDIR)$(libdir); \
272 ln -sf liblxc.so.$(VERSION) liblxc.so.$(firstword $(subst ., ,$(VERSION))); \
273 ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so
276 chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
279 $(RM) $(DESTDIR)$(libdir)/liblxc.so*