28 ../include/ifaddrs.h \
29 ../include/openpty.h \
30 ../include/lxcmntent.h
35 noinst_HEADERS += ../include/getline.h
40 # use PROGRAMS to avoid complains from automake
41 so_PROGRAMS = liblxc.so
48 LSM_SOURCES += lsm/apparmor.c
52 LSM_SOURCES += lsm/selinux.c
56 arguments.c arguments.h \
57 bdev.c bdev.h lxc-btrfs.h \
58 commands.c commands.h \
71 namespace.h namespace.c \
86 mainloop.c mainloop.h \
91 lxccontainer.c lxccontainer.h \
97 liblxc_so_SOURCES += cgmanager.c
101 liblxc_so_SOURCES += \
102 ../include/ifaddrs.c ../include/ifaddrs.h \
103 ../include/openpty.c ../include/openpty.h \
104 ../include/lxcmntent.c ../include/lxcmntent.h
109 liblxc_so_SOURCES += ../include/getline.c ../include/getline.h
113 AM_CFLAGS=-I$(top_srcdir)/src \
114 -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
115 -DLXCPATH=\"$(LXCPATH)\" \
116 -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
117 -DLXCINITDIR=\"$(LXCINITDIR)\" \
118 -DLIBEXECDIR=\"$(LIBEXECDIR)\" \
119 -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
120 -DLOGPATH=\"$(LOGPATH)\" \
121 -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
122 -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
123 -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
124 -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
125 -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
126 -DSBINDIR=\"$(SBINDIR)\"
129 AM_CFLAGS += -DHAVE_APPARMOR
133 AM_CFLAGS += -DHAVE_CGMANAGER
137 AM_CFLAGS += -DHAVE_SELINUX
140 if USE_CONFIGPATH_LOGS
141 AM_CFLAGS += -DUSE_CONFIGPATH_LOGS
145 AM_CFLAGS += -DHAVE_SECCOMP $(SECCOMP_CFLAGS)
146 liblxc_so_SOURCES += seccomp.c
149 liblxc_so_CFLAGS = -fPIC -DPIC $(AM_CFLAGS) -pthread
151 liblxc_so_LDFLAGS = \
154 -Wl,-soname,liblxc.so.$(firstword $(subst ., ,$(VERSION)))
156 liblxc_so_LDADD = $(CAP_LIBS) $(APPARMOR_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS)
159 liblxc_so_LDADD += $(CGMANAGER_LIBS) $(DBUS_LIBS) $(NIH_LIBS) $(NIH_DBUS_LIBS)
160 liblxc_so_CFLAGS += $(CGMANAGER_CFLAGS) $(DBUS_CFLAGS) $(NIH_CFLAGS) $(NIH_DBUS_CFLAGS)
163 bin_SCRIPTS = lxc-checkconfig
172 bin_SCRIPTS += lxc-device
173 bin_SCRIPTS += lxc-ls
174 bin_SCRIPTS += lxc-start-ephemeral
176 bin_SCRIPTS += legacy/lxc-ls
180 bin_SCRIPTS += lxc-top
205 sbin_PROGRAMS = init.lxc
206 pkglibexec_PROGRAMS = \
209 pkglibexec_SCRIPTS = \
214 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
216 LDADD=liblxc.so @CAP_LIBS@ @APPARMOR_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@
218 lxc_attach_SOURCES = lxc_attach.c
219 lxc_autostart_SOURCES = lxc_autostart.c
220 lxc_cgroup_SOURCES = lxc_cgroup.c
221 lxc_config_SOURCES = lxc_config.c
222 lxc_console_SOURCES = lxc_console.c
223 lxc_destroy_SOURCES = lxc_destroy.c
224 lxc_execute_SOURCES = lxc_execute.c
225 lxc_freeze_SOURCES = lxc_freeze.c
226 lxc_info_SOURCES = lxc_info.c
227 init_lxc_SOURCES = lxc_init.c
228 lxc_monitor_SOURCES = lxc_monitor.c
229 lxc_monitord_SOURCES = lxc_monitord.c
230 lxc_clone_SOURCES = lxc_clone.c
231 lxc_start_SOURCES = lxc_start.c
232 lxc_stop_SOURCES = lxc_stop.c
233 lxc_unfreeze_SOURCES = lxc_unfreeze.c
234 lxc_unshare_SOURCES = lxc_unshare.c
235 lxc_wait_SOURCES = lxc_wait.c
236 lxc_create_SOURCES = lxc_create.c
237 lxc_snapshot_SOURCES = lxc_snapshot.c
238 lxc_usernsexec_SOURCES = lxc_usernsexec.c
239 lxc_user_nic_SOURCES = lxc_user_nic.c network.c network.h
240 lxc_checkpoint_SOURCES = lxc_checkpoint.c
242 if HAVE_STATIC_LIBCAP
243 sbin_PROGRAMS += init.lxc.static
245 init_lxc_static_SOURCES = lxc_init.c error.c log.c utils.c caps.c
249 init_lxc_static_SOURCES += ../include/getline.c
253 init_lxc_static_LDFLAGS = -static
254 init_lxc_static_LDADD = @CAP_LIBS@
257 install-exec-local: install-soPROGRAMS
258 mkdir -p $(DESTDIR)$(datadir)/lxc
259 install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
260 install -c -m 755 lxc.net $(DESTDIR)$(datadir)/lxc
261 mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
262 cd $(DESTDIR)$(libdir); \
263 ln -sf liblxc.so.$(VERSION) liblxc.so.$(firstword $(subst ., ,$(VERSION))); \
264 ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so
267 chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
270 $(RM) $(DESTDIR)$(libdir)/liblxc.so*