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 \
66 src/rpm-fake-resolver \
91 if ENSC_CAN_CRYPTO_WITH_DIETLIBC
92 DIETPROGS += src/vhashify
95 noinst_HEADERS += src/capability-compat.h \
98 src/compat-pivot_root.h \
104 src/vhashify-init.hc \
105 src/vserver-visitdir.hc \
106 src/context-sync.hc \
109 pkglib_PROGRAMS += src/capchroot \
111 src/chcontext-compat \
123 src/rpm-fake-resolver \
131 $(src_pkglib_C99_X_PROGS) \
132 $(src_pkglib_CXX_X_PROGS)
134 if ENSC_HAVE_C99_COMPILER
136 pkglib_PROGRAMS += src/vhashify
137 endif ENSC_HAVE_CRYPTO
138 endif ENSC_HAVE_C99_COMPILER
140 legacy_PROGRAMS += src/ifspec \
147 pkglib_LTLIBRARIES += src/rpm-fake.la
149 sbin_PROGRAMS += src/exec-cd \
175 $(src_sbin_CXX_X_PROGS)
177 if ENSC_HAVE_C99_COMPILER
178 sbin_PROGRAMS += src/vdlimit
182 src_capchroot_SOURCES = src/capchroot.c
183 src_capchroot_LDADD = $(VSERVER_LDADDS)
184 src_capchroot_LDFLAGS = $(VSERVER_LDFLGS)
186 src_chbind_compat_SOURCES = src/chbind.c
187 src_chbind_compat_LDADD = $(VSERVER_LDADDS)
188 src_chbind_compat_LDFLAGS = $(VSERVER_LDFLGS)
190 src_chcontext_compat_SOURCES = src/chcontext.c
191 src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
192 src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS)
194 src_vcontext_SOURCES = src/vcontext.c src/vlogin.c
195 src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
196 src_vcontext_LDFLAGS = $(VSERVER_LDFLGS)
198 src_vsched_SOURCES = src/vsched.c
199 src_vsched_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
200 src_vsched_LDFLAGS = $(VSERVER_LDFLGS)
202 src_filetime_SOURCES = src/filetime.c
203 src_filetime_LDADD = $(VSERVER_LDADDS)
204 src_filetime_LDFLAGS = $(VSERVER_LDFLGS)
206 src_chain_echo_SOURCES = src/chain-echo.c
207 src_chroot_sh_SOURCES = src/chroot-sh.c
208 src_chroot_sh_LDADD = $(LIBINTERNAL)
209 src_exec_cd_SOURCES = src/exec-cd.c
210 src_fakerunlevel_SOURCES = src/fakerunlevel.c
211 src_ifspec_SOURCES = src/ifspec.c
212 src_listdevip_SOURCES = src/listdevip.c
213 src_lockfile_SOURCES = src/lockfile.c
214 src_parserpmdump_SOURCES = src/parserpmdump.c
215 src_readlink_SOURCES = src/readlink.c
216 src_rebootmgr_SOURCES = src/rebootmgr.c
217 src_exec_ulimit_SOURCES = src/exec-ulimit.c
218 src_vshelper_sync_SOURCES = src/vshelper-sync.c
220 src_reducecap_SOURCES = src/reducecap.c
221 src_reducecap_LDADD = $(VSERVER_LDADDS)
222 src_reducecap_LDFLAGS = $(VSERVER_LDFLGS)
224 src_vkill_SOURCES = src/vkill.c
225 src_vkill_LDADD = $(VSERVER_LDADDS)
226 src_vkill_LDFLAGS = $(VSERVER_LDFLGS) $(LIBINTERNAL)
227 src_vkill_CPPFLAGS = $(AM_CPPFLAGS) -DLEGACYDIR=\"$(legacydir)\"
229 src_vlimit_SOURCES = src/vlimit.c
230 src_vlimit_LDADD = $(VSERVER_LDADDS)
231 src_vlimit_LDFLAGS = $(VSERVER_LDFLGS)
233 src_save_ctxinfo_SOURCES = src/save_ctxinfo.c
234 src_save_ctxinfo_LDADD = $(VSERVER_LDADDS)
235 src_save_ctxinfo_LDFLAGS = $(VSERVER_LDFLGS)
237 src_vdu_SOURCES = src/vdu.c
238 src_vdu_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
239 src_vdu_LDFLAGS = $(VSERVER_LDFLGS)
241 src_vreboot_SOURCES = src/vreboot.c
243 src_secure_mount_SOURCES = src/secure-mount.c
244 src_secure_mount_LDADD = $(VSERVER_LDADDS)
245 src_secure_mount_LDFLAGS = $(VSERVER_LDFLGS)
247 src_vattribute_SOURCES = src/vattribute.c
248 src_vattribute_LDADD = $(VSERVER_LDADDS)
249 src_vattribute_LDFLAGS = $(VSERVER_LDFLGS)
251 src_vnamespace_SOURCES = src/vnamespace.c
252 src_vnamespace_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
253 src_vnamespace_LDFLAGS = $(VSERVER_LDFLGS)
255 src_rpm_fake_resolver_SOURCES = src/rpm-fake-resolver.c
256 src_rpm_fake_resolver_LDADD = $(VSERVER_LDADDS)
257 src_rpm_fake_resolver_LDFLAGS = $(VSERVER_LDFLGS)
259 src_mask2prefix_SOURCES = src/mask2prefix.c
261 src_vps_SOURCES = src/vps.c
262 src_vps_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
263 src_vps_LDFLAGS = $(VSERVER_LDFLGS)
265 src_vserver_info_SOURCES = src/vserver-info.c
266 src_vserver_info_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
267 src_vserver_info_LDFLAGS = $(VSERVER_LDFLGS)
269 src_vserver_stat_SOURCES = src/vserver-stat.c
270 src_vserver_stat_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS) $(LIBENSCVECTOR)
271 src_vserver_stat_LDFLAGS = $(VSERVER_LDFLGS)
273 src_lsxid_SOURCES = src/fstool.c src/lsxid.c
274 src_lsxid_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS) $(LIBENSCVECTOR)
275 src_lsxid_LDFLAGS = $(VSERVER_LDFLGS)
277 src_chxid_SOURCES = src/fstool.c src/chxid.c
278 src_chxid_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
279 src_chxid_LDFLAGS = $(VSERVER_LDFLGS)
281 src_showattr_SOURCES = src/fstool.c src/showattr.c
282 src_showattr_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
283 src_showattr_LDFLAGS = $(VSERVER_LDFLGS)
285 src_setattr_SOURCES = src/fstool.c src/setattr.c
286 src_setattr_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
287 src_setattr_LDFLAGS = $(VSERVER_LDFLGS)
289 src_keep_ctx_alive_SOURCES = src/keep-ctx-alive.c
290 src_keep_ctx_alive_LDADD = $(VSERVER_LDADDS)
291 src_keep_ctx_alive_LDFLAGS = $(VSERVER_LDFLGS)
294 src_vcopy_SOURCES = src/vcopy.c
295 src_vcopy_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
296 src_vcopy_LDFLAGS = $(VSERVER_LDFLGS)
298 src_vunify_SOURCES = src/vunify.c
299 src_vunify_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
300 src_vunify_LDFLAGS = $(VSERVER_LDFLGS)
302 src_vhashify_SOURCES = src/vhashify.c
303 src_vhashify_CFLAGS = $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
304 if ENSC_CAN_CRYPTO_WITH_DIETLIBC
305 src_vhashify_LDADD = $(LIBINTERNAL) $(LIBENSCVECTOR) $(ENSC_CRYPTO_LIB) $(VSERVER_LDADDS)
306 src_vhashify_LDFLAGS = $(VSERVER_LDFLGS)
308 src_vhashify_LDADD = $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) $(ENSC_CRYPTO_LIB)
309 src_vhashify_LDFLAGS = -Wl,--as-needed
312 src_vuname_SOURCES = src/vuname.c
313 src_vuname_LDADD = $(VSERVER_LDADDS)
314 src_vuname_LDFLAGS = $(VSERVER_LDFLGS)
316 src_rpm_fake_la_SOURCES = src/rpm-fake.c
317 src_rpm_fake_la_CFLAGS = $(AM_CFLAGS)
318 src_rpm_fake_la_LDFLAGS = -module -avoid-version -rpath $(pkglibdir)
319 src_rpm_fake_la_LIBADD = $(LIBVSERVER_GLIBC) -ldl
321 src_vdlimit_SOURCES = src/vdlimit.c
322 src_vdlimit_LDADD = $(VSERVER_LDADDS)
323 src_vdlimit_LDFLAGS = $(VSERVER_LDFLGS)
325 src_vwait_SOURCES = src/vwait.c
326 src_vwait_LDADD = $(VSERVER_LDADDS)
327 src_vwait_LDFLAGS = $(VSERVER_LDFLGS)
329 src_ncontext_SOURCES = src/ncontext.c
330 src_ncontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
331 src_ncontext_LDFLAGS = $(VSERVER_LDFLGS)
333 src_nattribute_SOURCES = src/nattribute.c
334 src_nattribute_LDADD = $(VSERVER_LDADDS)
335 src_nattribute_LDFLAGS = $(VSERVER_LDFLGS)
337 src_naddress_SOURCES = src/naddress.c
338 src_naddress_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
339 src_naddress_LDFLAGS = $(VSERVER_LDFLGS)
341 src_vdevmap_SOURCES = src/vdevmap.c
342 src_vdevmap_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
343 src_vdevmap_LDFLAGS = $(VSERVER_LDFLGS)
345 src_vsysctl_SOURCES = src/vsysctl.c
346 src_vsysctl_LDADD = $(VSERVER_LDADDS)
347 src_vsysctl_LDFLAGS = $(VSERVER_LDFLGS)
349 src_vclone_SOURCES = src/vclone.c
350 src_vclone_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
351 src_vclone_LDFLAGS = $(VSERVER_LDLFGS)
353 src_h2ext_SOURCES = src/h2ext.c
354 src_h2ext_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
355 src_h2ext_LDFLAGS = $(VSERVER_LDFLGS)
357 src_vtag_SOURCES = src/vtag.c
358 src_vtag_LDADD = $(VSERVER_LDADDS)
359 src_vtag_LDFLAGS = $(VSERVER_LDADDS)
361 src_vspace_SOURCES = src/vspace.c
362 src_vspace_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
363 src_vspace_LDFLAGS = $(VSERVER_LDFLGS)
365 src_vmemctrl_SOURCES = src/vmemctrl.c
366 src_vmemctrl_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
367 src_vmemctrl_LDFLAGS = $(VSERVER_LDFLGS)
369 src_tunctl_SOURCES = src/tunctl.c
370 src_tunctl_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
371 src_tunctl_LDFLAGS = $(VSERVER_LDFLGS)
373 src_exec_remount_SOURCES = src/exec-remount.c
374 src_exec_remount_LDADD = $(VSERVER_LDADDS)
375 src_exec_remount_LDFLAGS = $(VSERVER_LDFLGS)
377 EXTRA_PROGRAMS += $(src_sbin_CXX_PROGS) $(src_pkglib_CXX_PROGS)
379 TESTS_ENVIRONMENT += srctestsuitedir=$(top_builddir)/src/testsuite
381 if ENSC_HAVE_C99_COMPILER
382 src_sbin_C99_X_PROGS = $(src_sbin_C99_PROGS)
383 src_pkglib_C99_X_PROGS = $(src_pkglib_C99_PROGS)
385 src_sbin_C99_X_PROGS =
386 src_pkglib_C99_X_PROGS =
389 if ENSC_HAVE_CXX_COMPILER
390 src_sbin_CXX_X_PROGS = $(src_sbin_CXX_PROGS)
391 src_pkglib_CXX_X_PROGS = $(src_pkglib_CXX_PROGS)
393 src_sbin_CXX_X_PROGS =
394 src_pkglib_CXX_X_PROGS =
397 install-exec-hook: src_install_exec_hook
399 src_install_exec_hook:
400 -rm -f $(DESTDIR)$(pkglibdir)/rpm-fake.a $(DESTDIR)$(pkglibdir)/rpm-fake.la
402 include $(top_srcdir)/src/testsuite/Makefile-files