1 ## $Id$ -*- makefile -*-
3 ## Copyright (C) 2003,2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2, or (at your option)
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 src_pkglib_CXX_PROGS =
23 src_pkglib_C99_PROGS = src/vunify src/vcopy src/vclone
26 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \
38 DIETPROGS += src/chcontext-compat \
65 src/rpm-fake-resolver \
90 if ENSC_CAN_CRYPTO_WITH_DIETLIBC
91 DIETPROGS += src/vhashify
94 noinst_HEADERS += src/capability-compat.h \
97 src/compat-pivot_root.h \
103 src/vhashify-init.hc \
104 src/vserver-visitdir.hc \
105 src/context-sync.hc \
108 pkglib_PROGRAMS += src/capchroot \
110 src/chcontext-compat \
122 src/rpm-fake-resolver \
130 $(src_pkglib_C99_X_PROGS) \
131 $(src_pkglib_CXX_X_PROGS)
133 if ENSC_HAVE_C99_COMPILER
135 pkglib_PROGRAMS += src/vhashify
136 endif ENSC_HAVE_CRYPTO
137 endif ENSC_HAVE_C99_COMPILER
139 legacy_PROGRAMS += src/ifspec \
146 pkglib_LTLIBRARIES += src/rpm-fake.la
148 sbin_PROGRAMS += src/exec-cd \
173 $(src_sbin_CXX_X_PROGS)
175 if ENSC_HAVE_C99_COMPILER
176 sbin_PROGRAMS += src/vdlimit
180 src_capchroot_SOURCES = src/capchroot.c
181 src_capchroot_LDADD = $(VSERVER_LDADDS)
182 src_capchroot_LDFLAGS = $(VSERVER_LDFLGS)
184 src_chbind_compat_SOURCES = src/chbind.c
185 src_chbind_compat_LDADD = $(VSERVER_LDADDS)
186 src_chbind_compat_LDFLAGS = $(VSERVER_LDFLGS)
188 src_chcontext_compat_SOURCES = src/chcontext.c
189 src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
190 src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS)
192 src_vcontext_SOURCES = src/vcontext.c src/vlogin.c
193 src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
194 src_vcontext_LDFLAGS = $(VSERVER_LDFLGS)
196 src_vsched_SOURCES = src/vsched.c
197 src_vsched_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
198 src_vsched_LDFLAGS = $(VSERVER_LDFLGS)
200 src_filetime_SOURCES = src/filetime.c
201 src_filetime_LDADD = $(VSERVER_LDADDS)
202 src_filetime_LDFLAGS = $(VSERVER_LDFLGS)
204 src_chain_echo_SOURCES = src/chain-echo.c
205 src_chroot_sh_SOURCES = src/chroot-sh.c
206 src_chroot_sh_LDADD = $(LIBINTERNAL)
207 src_exec_cd_SOURCES = src/exec-cd.c
208 src_fakerunlevel_SOURCES = src/fakerunlevel.c
209 src_ifspec_SOURCES = src/ifspec.c
210 src_listdevip_SOURCES = src/listdevip.c
211 src_lockfile_SOURCES = src/lockfile.c
212 src_parserpmdump_SOURCES = src/parserpmdump.c
213 src_readlink_SOURCES = src/readlink.c
214 src_rebootmgr_SOURCES = src/rebootmgr.c
215 src_exec_ulimit_SOURCES = src/exec-ulimit.c
216 src_vshelper_sync_SOURCES = src/vshelper-sync.c
218 src_reducecap_SOURCES = src/reducecap.c
219 src_reducecap_LDADD = $(VSERVER_LDADDS)
220 src_reducecap_LDFLAGS = $(VSERVER_LDFLGS)
222 src_vkill_SOURCES = src/vkill.c
223 src_vkill_LDADD = $(VSERVER_LDADDS)
224 src_vkill_LDFLAGS = $(VSERVER_LDFLGS) $(LIBINTERNAL)
225 src_vkill_CPPFLAGS = $(AM_CPPFLAGS) -DLEGACYDIR=\"$(legacydir)\"
227 src_vlimit_SOURCES = src/vlimit.c
228 src_vlimit_LDADD = $(VSERVER_LDADDS)
229 src_vlimit_LDFLAGS = $(VSERVER_LDFLGS)
231 src_save_ctxinfo_SOURCES = src/save_ctxinfo.c
232 src_save_ctxinfo_LDADD = $(VSERVER_LDADDS)
233 src_save_ctxinfo_LDFLAGS = $(VSERVER_LDFLGS)
235 src_vdu_SOURCES = src/vdu.c
236 src_vdu_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
237 src_vdu_LDFLAGS = $(VSERVER_LDFLGS)
239 src_vreboot_SOURCES = src/vreboot.c
241 src_secure_mount_SOURCES = src/secure-mount.c
242 src_secure_mount_LDADD = $(VSERVER_LDADDS)
243 src_secure_mount_LDFLAGS = $(VSERVER_LDFLGS)
245 src_vattribute_SOURCES = src/vattribute.c
246 src_vattribute_LDADD = $(VSERVER_LDADDS)
247 src_vattribute_LDFLAGS = $(VSERVER_LDFLGS)
249 src_rpm_fake_resolver_SOURCES = src/rpm-fake-resolver.c
250 src_rpm_fake_resolver_LDADD = $(VSERVER_LDADDS)
251 src_rpm_fake_resolver_LDFLAGS = $(VSERVER_LDFLGS)
253 src_mask2prefix_SOURCES = src/mask2prefix.c
255 src_vps_SOURCES = src/vps.c
256 src_vps_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
257 src_vps_LDFLAGS = $(VSERVER_LDFLGS)
259 src_vserver_info_SOURCES = src/vserver-info.c
260 src_vserver_info_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
261 src_vserver_info_LDFLAGS = $(VSERVER_LDFLGS)
263 src_vserver_stat_SOURCES = src/vserver-stat.c
264 src_vserver_stat_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS) $(LIBENSCVECTOR)
265 src_vserver_stat_LDFLAGS = $(VSERVER_LDFLGS)
267 src_lsxid_SOURCES = src/fstool.c src/lsxid.c
268 src_lsxid_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS) $(LIBENSCVECTOR)
269 src_lsxid_LDFLAGS = $(VSERVER_LDFLGS)
271 src_chxid_SOURCES = src/fstool.c src/chxid.c
272 src_chxid_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
273 src_chxid_LDFLAGS = $(VSERVER_LDFLGS)
275 src_showattr_SOURCES = src/fstool.c src/showattr.c
276 src_showattr_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
277 src_showattr_LDFLAGS = $(VSERVER_LDFLGS)
279 src_setattr_SOURCES = src/fstool.c src/setattr.c
280 src_setattr_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
281 src_setattr_LDFLAGS = $(VSERVER_LDFLGS)
283 src_keep_ctx_alive_SOURCES = src/keep-ctx-alive.c
284 src_keep_ctx_alive_LDADD = $(VSERVER_LDADDS)
285 src_keep_ctx_alive_LDFLAGS = $(VSERVER_LDFLGS)
288 src_vcopy_SOURCES = src/vcopy.c
289 src_vcopy_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
290 src_vcopy_LDFLAGS = $(VSERVER_LDFLGS)
292 src_vunify_SOURCES = src/vunify.c
293 src_vunify_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
294 src_vunify_LDFLAGS = $(VSERVER_LDFLGS)
296 src_vhashify_SOURCES = src/vhashify.c
297 src_vhashify_CFLAGS = $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
298 if ENSC_CAN_CRYPTO_WITH_DIETLIBC
299 src_vhashify_LDADD = $(LIBINTERNAL) $(LIBENSCVECTOR) $(ENSC_CRYPTO_LIB) $(VSERVER_LDADDS)
300 src_vhashify_LDFLAGS = $(VSERVER_LDFLGS)
302 src_vhashify_LDADD = $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) $(ENSC_CRYPTO_LIB)
303 src_vhashify_LDFLAGS = -Wl,--as-needed
306 src_vuname_SOURCES = src/vuname.c
307 src_vuname_LDADD = $(VSERVER_LDADDS)
308 src_vuname_LDFLAGS = $(VSERVER_LDFLGS)
310 src_rpm_fake_la_SOURCES = src/rpm-fake.c
311 src_rpm_fake_la_CFLAGS = $(AM_CFLAGS)
312 src_rpm_fake_la_LDFLAGS = -module -avoid-version -rpath $(pkglibdir)
313 src_rpm_fake_la_LIBADD = $(LIBVSERVER_GLIBC) -ldl
315 src_vdlimit_SOURCES = src/vdlimit.c
316 src_vdlimit_LDADD = $(VSERVER_LDADDS)
317 src_vdlimit_LDFLAGS = $(VSERVER_LDFLGS)
319 src_vwait_SOURCES = src/vwait.c
320 src_vwait_LDADD = $(VSERVER_LDADDS)
321 src_vwait_LDFLAGS = $(VSERVER_LDFLGS)
323 src_ncontext_SOURCES = src/ncontext.c
324 src_ncontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
325 src_ncontext_LDFLAGS = $(VSERVER_LDFLGS)
327 src_nattribute_SOURCES = src/nattribute.c
328 src_nattribute_LDADD = $(VSERVER_LDADDS)
329 src_nattribute_LDFLAGS = $(VSERVER_LDFLGS)
331 src_naddress_SOURCES = src/naddress.c
332 src_naddress_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
333 src_naddress_LDFLAGS = $(VSERVER_LDFLGS)
335 src_vdevmap_SOURCES = src/vdevmap.c
336 src_vdevmap_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
337 src_vdevmap_LDFLAGS = $(VSERVER_LDFLGS)
339 src_vsysctl_SOURCES = src/vsysctl.c
340 src_vsysctl_LDADD = $(VSERVER_LDADDS)
341 src_vsysctl_LDFLAGS = $(VSERVER_LDFLGS)
343 src_vclone_SOURCES = src/vclone.c
344 src_vclone_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
345 src_vclone_LDFLAGS = $(VSERVER_LDLFGS)
347 src_h2ext_SOURCES = src/h2ext.c
348 src_h2ext_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
349 src_h2ext_LDFLAGS = $(VSERVER_LDFLGS)
351 src_vtag_SOURCES = src/vtag.c
352 src_vtag_LDADD = $(VSERVER_LDADDS)
353 src_vtag_LDFLAGS = $(VSERVER_LDADDS)
355 src_vspace_SOURCES = src/vspace.c
356 src_vspace_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
357 src_vspace_LDFLAGS = $(VSERVER_LDFLGS)
359 src_vmemctrl_SOURCES = src/vmemctrl.c
360 src_vmemctrl_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
361 src_vmemctrl_LDFLAGS = $(VSERVER_LDFLGS)
363 src_tunctl_SOURCES = src/tunctl.c
364 src_tunctl_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
365 src_tunctl_LDFLAGS = $(VSERVER_LDFLGS)
367 src_exec_remount_SOURCES = src/exec-remount.c
368 src_exec_remount_LDADD = $(VSERVER_LDADDS)
369 src_exec_remount_LDFLAGS = $(VSERVER_LDFLGS)
371 EXTRA_PROGRAMS += $(src_sbin_CXX_PROGS) $(src_pkglib_CXX_PROGS)
373 TESTS_ENVIRONMENT += srctestsuitedir=$(top_builddir)/src/testsuite
375 if ENSC_HAVE_C99_COMPILER
376 src_sbin_C99_X_PROGS = $(src_sbin_C99_PROGS)
377 src_pkglib_C99_X_PROGS = $(src_pkglib_C99_PROGS)
379 src_sbin_C99_X_PROGS =
380 src_pkglib_C99_X_PROGS =
383 if ENSC_HAVE_CXX_COMPILER
384 src_sbin_CXX_X_PROGS = $(src_sbin_CXX_PROGS)
385 src_pkglib_CXX_X_PROGS = $(src_pkglib_CXX_PROGS)
387 src_sbin_CXX_X_PROGS =
388 src_pkglib_CXX_X_PROGS =
391 install-exec-hook: src_install_exec_hook
393 src_install_exec_hook:
394 -rm -f $(DESTDIR)$(pkglibdir)/rpm-fake.a $(DESTDIR)$(pkglibdir)/rpm-fake.la
396 include $(top_srcdir)/src/testsuite/Makefile-files