30 ../include/ifaddrs.h \
31 ../include/openpty.h \
32 ../include/lxcmntent.h
37 noinst_HEADERS += ../include/getline.h
42 # use PROGRAMS to avoid complains from automake
43 so_PROGRAMS = liblxc.so
50 LSM_SOURCES += lsm/apparmor.c
54 LSM_SOURCES += lsm/selinux.c
58 arguments.c arguments.h \
59 bdev.c bdev.h lxc-btrfs.h \
60 commands.c commands.h \
71 initutils.c initutils.h \
74 namespace.h namespace.c \
90 mainloop.c mainloop.h \
95 lxccontainer.c lxccontainer.h \
101 liblxc_so_SOURCES += cgmanager.c
105 liblxc_so_SOURCES += \
106 ../include/ifaddrs.c ../include/ifaddrs.h \
107 ../include/openpty.c ../include/openpty.h \
108 ../include/lxcmntent.c ../include/lxcmntent.h
113 liblxc_so_SOURCES += ../include/getline.c ../include/getline.h
117 AM_CFLAGS=-I$(top_srcdir)/src \
118 -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
119 -DLXCPATH=\"$(LXCPATH)\" \
120 -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
121 -DLXCINITDIR=\"$(LXCINITDIR)\" \
122 -DLIBEXECDIR=\"$(LIBEXECDIR)\" \
123 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
124 -DLOGPATH=\"$(LOGPATH)\" \
125 -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
126 -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
127 -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
128 -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
129 -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
130 -DSBINDIR=\"$(SBINDIR)\"
133 AM_CFLAGS += -DHAVE_APPARMOR
137 AM_CFLAGS += -DHAVE_CGMANAGER
141 AM_CFLAGS += -DHAVE_SELINUX
144 if USE_CONFIGPATH_LOGS
145 AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
149 AM_CFLAGS += -DHAVE_SECCOMP $(SECCOMP_CFLAGS)
150 liblxc_so_SOURCES += seccomp.c
153 liblxc_so_CFLAGS = -fPIC -DPIC $(AM_CFLAGS) -pthread
155 liblxc_so_LDFLAGS = \
158 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,$(VERSION)))
160 liblxc_so_LDADD = $(CAP_LIBS) $(APPARMOR_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS)
163 liblxc_so_LDADD += $(CGMANAGER_LIBS) $(DBUS_LIBS) $(NIH_LIBS) $(NIH_DBUS_LIBS)
164 liblxc_so_CFLAGS += $(CGMANAGER_CFLAGS) $(DBUS_CFLAGS) $(NIH_CFLAGS) $(NIH_DBUS_CFLAGS)
167 bin_SCRIPTS = lxc-checkconfig
174 bin_SCRIPTS += lxc-ls
175 bin_SCRIPTS += lxc-start-ephemeral
177 bin_SCRIPTS += legacy/lxc-ls
204 sbin_PROGRAMS = init.lxc
205 pkglibexec_PROGRAMS = \
211 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
213 LDADD=liblxc.so @CAP_LIBS@ @APPARMOR_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@
215 lxc_attach_SOURCES = lxc_attach.c
216 lxc_autostart_SOURCES = lxc_autostart.c
217 lxc_cgroup_SOURCES = lxc_cgroup.c
218 lxc_config_SOURCES = lxc_config.c
219 lxc_console_SOURCES = lxc_console.c
220 lxc_destroy_SOURCES = lxc_destroy.c
221 lxc_device_SOURCES = lxc_device.c
222 lxc_execute_SOURCES = lxc_execute.c
223 lxc_freeze_SOURCES = lxc_freeze.c
224 lxc_info_SOURCES = lxc_info.c
225 init_lxc_SOURCES = lxc_init.c
226 lxc_monitor_SOURCES = lxc_monitor.c
227 lxc_monitord_SOURCES = lxc_monitord.c
228 lxc_clone_SOURCES = lxc_clone.c
229 lxc_start_SOURCES = lxc_start.c
230 lxc_stop_SOURCES = lxc_stop.c
231 lxc_top_SOURCES = lxc_top.c
232 lxc_unfreeze_SOURCES = lxc_unfreeze.c
233 lxc_unshare_SOURCES = lxc_unshare.c
234 lxc_wait_SOURCES = lxc_wait.c
235 lxc_create_SOURCES = lxc_create.c
236 lxc_snapshot_SOURCES = lxc_snapshot.c
237 lxc_usernsexec_SOURCES = lxc_usernsexec.c
238 lxc_user_nic_SOURCES = lxc_user_nic.c network.c network.h
239 lxc_checkpoint_SOURCES = lxc_checkpoint.c
241 if HAVE_STATIC_LIBCAP
242 sbin_PROGRAMS += init.lxc.static
244 init_lxc_static_SOURCES = lxc_init.c error.c log.c initutils.c caps.c
248 init_lxc_static_SOURCES += ../include/getline.c
252 init_lxc_static_LDFLAGS = -static
253 init_lxc_static_LDADD = @CAP_LIBS@
254 init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
257 install-exec-local: install-soPROGRAMS
258 mkdir -p $(DESTDIR)$(datadir)/lxc
259 install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
260 mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
261 cd $(DESTDIR)$(libdir); \
262 ln -sf liblxc.so.$(VERSION) liblxc.so.$(firstword $(subst ., ,$(VERSION))); \
263 ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so
266 chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
269 $(RM) $(DESTDIR)$(libdir)/liblxc.so*