Merge 0.30.214.
[util-vserver.git] / src / Makefile-files
index b31a2ae..25bc2c5 100644 (file)
@@ -1,6 +1,6 @@
-## $Id: Makefile-files,v 1.1.4.8 2004/02/09 23:18:59 ensc Exp $  -*- makefile -*-
+## $Id: Makefile-files 2589 2007-08-16 03:06:50Z dhozac $  -*- makefile -*-
 
-## Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+## Copyright (C) 2003,2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 ##  
 
-src_HDRS               =  src/vutil.h src/vutil.p \
-                          src/ext2fs.h
+src_sbin_CXX_PROGS =   
 
-src_pkglib_SCRPTS      =  src/setattr
-src_pkglib_PRGS                =  src/capchroot \
-                          src/fakerunlevel \
-                          src/filetime \
-                          src/ifspec \
-                          src/listdevip \
-                          src/parserpmdump \
-                          src/readlink \
-                          src/showattr \
-                          src/showperm \
-                          src/vbuild \
-                          src/vcheck \
-                          src/vreboot \
-                          src/vunify
+src_pkglib_C99_PROGS = src/vunify src/vcopy src/vclone
 
-src_sbin_PRGS          =  src/chbind \
-                          src/chcontext \
-                          src/rebootmgr \
-                          src/reducecap \
-                          src/vdu \
-                          src/vsh \
-                          src/vdlimit \
-                          src/vfiles \
-                          src/vkill \
-                          src/vserver-stat
 
+AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \
+                       src/parserpmdump \
+                       src/showperm \
+                       src/vcheck \
+                       src/vreboot \
+                       src/save_ctxinfo \
+                       src/mask2prefix \
+                       src/ifspec \
+                       src/rebootmgr \
+                       src/vfiles
 
-src_sbin_PRGS_broken   =  src/vlimit
+DIETPROGS +=           src/chcontext-compat \
+                       src/capchroot \
+                       src/chain-echo \
+                       src/check-unixfile \
+                       src/chroot-sh \
+                       src/filetime \
+                       src/lockfile \
+                       src/readlink \
+                       src/secure-mount \
+                       src/save_ctxinfo \
+                       src/mask2prefix \
+                       src/chbind-compat \
+                       src/exec-cd \
+                       src/fakerunlevel \
+                       src/keep-ctx-alive \
+                       src/exec-ulimit \
+                       src/vps \
+                       src/lsxid \
+                       src/chxid \
+                       src/reducecap \
+                       src/showattr \
+                       src/setattr \
+                       src/sigexec \
+                       src/vattribute \
+                       src/vlimit \
+                       src/vnamespace \
+                       src/vunify \
+                       src/vuname \
+                       src/rpm-fake-resolver \
+                       src/vcontext \
+                       src/vcopy \
+                       src/vkill \
+                       src/vsched \
+                       src/vshelper-sync \
+                       src/vrsetup \
+                       src/vserver-stat \
+                       src/vserver-info \
+                       src/vdlimit \
+                       src/vsh \
+                       src/vdu \
+                       src/vwait \
+                       src/ncontext \
+                       src/nattribute \
+                       src/naddress \
+                       src/vdevmap \
+                       src/vsysctl \
+                       src/vclone \
+                       src/h2ext \
+                       src/vtag
 
+if ENSC_CAN_BEECRYPT_WITH_DIETLIBC
+DIETPROGS +=           src/vhashify
+endif
 
-src_GENFILES           =  src/setattr
+noinst_HEADERS +=      src/capability-compat.h \
+                       src/util.h \
+                       src/fstool.h \
+                       src/compat-pivot_root.h \
+                       src/stack-start.h \
+                       src/vcopy-init.hc \
+                       src/vunify.h \
+                       src/vunify-init.hc \
+                       src/vhashify.h \
+                       src/vhashify-init.hc \
+                       src/vserver-visitdir.hc \
+                       src/context-sync.hc
 
-src_capchroot_SOURCES          =  src/capchroot.c
-src_capchroot_LDADD            =  lib/libvserver.a
+pkglib_PROGRAMS +=     src/capchroot \
+                       src/chain-echo \
+                       src/chcontext-compat \
+                       src/check-unixfile \
+                       src/chroot-sh \
+                       src/fakerunlevel \
+                       src/filetime \
+                       src/keep-ctx-alive \
+                       src/lockfile \
+                       src/readlink \
+                       src/save_ctxinfo \
+                       src/secure-mount \
+                       src/mask2prefix \
+                       src/exec-ulimit \
+                       src/rpm-fake-resolver \
+                       src/vshelper-sync \
+                       src/sigexec \
+                       src/chbind-compat \
+                       src/vsysctl \
+                       src/h2ext \
+                       $(src_pkglib_C99_X_PROGS) \
+                       $(src_pkglib_CXX_X_PROGS)
 
-src_chbind_SOURCES             =  src/chbind.c
-src_chbind_LDADD               =  lib/libvserver.a
+if ENSC_HAVE_C99_COMPILER
+if ENSC_HAVE_BEECRYPT
+pkglib_PROGRAMS +=     src/vhashify
+endif ENSC_HAVE_BEECRYPT
+endif ENSC_HAVE_C99_COMPILER
 
-src_chcontext_SOURCES          =  src/chcontext.c
-src_chcontext_LDADD            =  lib/libvserver.a
+legacy_PROGRAMS +=     src/ifspec \
+                       src/listdevip \
+                       src/parserpmdump \
+                       src/rebootmgr \
+                       src/showperm \
+                       src/vreboot
+
+pkglib_LTLIBRARIES +=  src/rpm-fake.la
+
+sbin_PROGRAMS +=       src/exec-cd \
+                       src/lsxid \
+                       src/chxid \
+                       src/vps \
+                       src/showattr \
+                       src/setattr \
+                       src/reducecap \
+                       src/vdu \
+                       src/vattribute \
+                       src/vcontext \
+                       src/vlimit \
+                       src/vkill \
+                       src/vnamespace \
+                       src/vrsetup \
+                       src/vsched \
+                       src/vserver-stat \
+                       src/vserver-info \
+                       src/vuname \
+                       src/vsh \
+                       src/vwait \
+                       src/ncontext \
+                       src/nattribute \
+                       src/naddress \
+                       src/vdevmap \
+                       src/vtag \
+                       $(src_sbin_CXX_X_PROGS)
+
+if ENSC_HAVE_C99_COMPILER
+sbin_PROGRAMS +=       src/vdlimit
+endif
+
+if ENSC_HAVE_LIBNL
+sbin_PROGRAMS +=       src/vip6-autod
+endif
+
+
+src_capchroot_SOURCES =                src/capchroot.c
+src_capchroot_LDADD =          $(VSERVER_LDADDS)
+src_capchroot_LDFLAGS =                $(VSERVER_LDFLGS)
+
+src_chbind_compat_SOURCES =    src/chbind.c
+src_chbind_compat_LDADD =      $(VSERVER_LDADDS)
+src_chbind_compat_LDFLAGS =    $(VSERVER_LDFLGS)
+
+src_chcontext_compat_SOURCES = src/chcontext.c
+src_chcontext_compat_LDADD =   $(VSERVER_LDADDS) $(LIBINTERNAL)
+src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS)
+
+src_vcontext_SOURCES           =  src/vcontext.c src/vlogin.c
+src_vcontext_LDADD             =  $(VSERVER_LDADDS) $(LIBINTERNAL)
+src_vcontext_LDFLAGS           =  $(VSERVER_LDFLGS)
+
+src_vsched_SOURCES             =  src/vsched.c
+src_vsched_LDADD               =  $(VSERVER_LDADDS) $(LIBINTERNAL)
+src_vsched_LDFLAGS             =  $(VSERVER_LDFLGS)
 
-src_fakerunlevel_SOURCES       =  src/fakerunlevel.c
 src_filetime_SOURCES           =  src/filetime.c
+src_filetime_LDADD             =  $(VSERVER_LDADDS)
+src_filetime_LDFLAGS           =  $(VSERVER_LDFLGS)
+
+src_chain_echo_SOURCES         =  src/chain-echo.c
+src_chroot_sh_SOURCES          =  src/chroot-sh.c
+src_chroot_sh_LDADD            =  $(LIBINTERNAL)
+src_exec_cd_SOURCES            =  src/exec-cd.c
+src_fakerunlevel_SOURCES       =  src/fakerunlevel.c
 src_ifspec_SOURCES             =  src/ifspec.c
 src_listdevip_SOURCES          =  src/listdevip.c
+src_lockfile_SOURCES           =  src/lockfile.c
 src_parserpmdump_SOURCES       =  src/parserpmdump.c
 src_readlink_SOURCES           =  src/readlink.c
-
 src_rebootmgr_SOURCES          =  src/rebootmgr.c
-src_rebootmgr_CPPFLAGS         =  $(AM_CPPFLAGS) -DSBINDIR=\"$(sbindir)\" -DVROOTDIR=\"$(vserverdir)\"
+src_exec_ulimit_SOURCES                =  src/exec-ulimit.c
+src_vshelper_sync_SOURCES      =  src/vshelper-sync.c
 
 src_reducecap_SOURCES          =  src/reducecap.c
-src_reducecap_LDADD            =  lib/libvserver.a
-
-src_vlimit_SOURCES             =  src/vlimit.c
-src_vlimit_LDADD               =  lib/libvserver.a
+src_reducecap_LDADD            =  $(VSERVER_LDADDS)
+src_reducecap_LDFLAGS          =  $(VSERVER_LDFLGS)
 
 src_vkill_SOURCES              =  src/vkill.c
-src_vkill_LDADD                        =  lib/libvserver.a
+src_vkill_LDADD                        =  $(VSERVER_LDADDS)
+src_vkill_LDFLAGS              =  $(VSERVER_LDFLGS) $(LIBINTERNAL)
 src_vkill_CPPFLAGS             =  $(AM_CPPFLAGS) -DLEGACYDIR=\"$(legacydir)\"
 
-src_vsh_SOURCES                        =  src/vsh.c
-src_vsh_LDADD                  =  lib/libvserver.a
+src_vlimit_SOURCES             =  src/vlimit.c
+src_vlimit_LDADD               =  $(VSERVER_LDADDS)
+src_vlimit_LDFLAGS             =  $(VSERVER_LDFLGS)
+
+src_save_ctxinfo_SOURCES       =  src/save_ctxinfo.c
+src_save_ctxinfo_LDADD         =  $(VSERVER_LDADDS)
+src_save_ctxinfo_LDFLAGS       =  $(VSERVER_LDFLGS)
+
+src_vdu_SOURCES                =  src/vdu.c
+src_vdu_LDADD                  =  $(VSERVER_LDADDS) $(LIBINTERNAL)
+src_vdu_LDFLAGS                        =  $(VSERVER_LDFLGS)
+
+src_vreboot_SOURCES =          src/vreboot.c
+
+src_secure_mount_SOURCES =     src/secure-mount.c
+src_secure_mount_LDADD =       $(VSERVER_LDADDS)
+src_secure_mount_LDFLAGS =     $(VSERVER_LDFLGS)
+
+src_vattribute_SOURCES =       src/vattribute.c
+src_vattribute_LDADD =         $(VSERVER_LDADDS)
+src_vattribute_LDFLAGS =       $(VSERVER_LDFLGS)
+
+src_vnamespace_SOURCES =       src/vnamespace.c
+src_vnamespace_LDADD =         $(VSERVER_LDADDS) $(LIBINTERNAL)
+src_vnamespace_LDFLAGS =       $(VSERVER_LDFLGS)
+
+src_rpm_fake_resolver_SOURCES  =  src/rpm-fake-resolver.c
+src_rpm_fake_resolver_LDADD    =  $(VSERVER_LDADDS)
+src_rpm_fake_resolver_LDFLAGS  =  $(VSERVER_LDFLGS)
+
+src_mask2prefix_SOURCES                =  src/mask2prefix.c
 
-src_vdlimit_SOURCES            =  src/vdlimit.c
-src_vdlimit_LDADD              =  lib/libvserver.a
+src_vps_SOURCES                        =  src/vps.c
+src_vps_LDADD                  =  $(LIBINTERNAL) $(VSERVER_LDADDS)
+src_vps_LDFLAGS                        =  $(VSERVER_LDFLGS)
 
-src_showattr_SOURCES           =  src/showattr.c
-src_showperm_SOURCES           =  src/showperm.c
-src_vbuild_SOURCES             =  src/vbuild.cc src/vutil.cc
-src_vdu_SOURCES                        =  src/vdu.c
-src_vfiles_SOURCES             =  src/vfiles.cc src/vutil.cc
-src_vreboot_SOURCES            =  src/vreboot.c
+src_vserver_info_SOURCES       =  src/vserver-info.c
+src_vserver_info_LDADD         =  $(LIBINTERNAL) $(VSERVER_LDADDS)
+src_vserver_info_LDFLAGS       =  $(VSERVER_LDFLGS)
 
 src_vserver_stat_SOURCES       =  src/vserver-stat.c
-src_vserver_stat_LDADD         =  lib/libvserver.a
+src_vserver_stat_LDADD         =  $(LIBINTERNAL) $(VSERVER_LDADDS) $(LIBENSCVECTOR)
+src_vserver_stat_LDFLAGS       =  $(VSERVER_LDFLGS)
+
+src_lsxid_SOURCES              =  src/fstool.c src/lsxid.c
+src_lsxid_LDADD                        =  $(LIBINTERNAL) $(VSERVER_LDADDS) $(LIBENSCVECTOR)
+src_lsxid_LDFLAGS              =  $(VSERVER_LDFLGS) 
+
+src_chxid_SOURCES              =  src/fstool.c src/chxid.c
+src_chxid_LDADD                        =  $(LIBINTERNAL) $(VSERVER_LDADDS)
+src_chxid_LDFLAGS              =  $(VSERVER_LDFLGS)
+
+src_showattr_SOURCES           =  src/fstool.c src/showattr.c
+src_showattr_LDADD             =  $(LIBINTERNAL) $(VSERVER_LDADDS)
+src_showattr_LDFLAGS           =  $(VSERVER_LDFLGS)
+
+src_setattr_SOURCES            =  src/fstool.c src/setattr.c
+src_setattr_LDADD              =  $(LIBINTERNAL) $(VSERVER_LDADDS)
+src_setattr_LDFLAGS            =  $(VSERVER_LDFLGS)
+
+src_keep_ctx_alive_SOURCES =   src/keep-ctx-alive.c
+src_keep_ctx_alive_LDADD =     $(VSERVER_LDADDS)
+src_keep_ctx_alive_LDFLAGS =   $(VSERVER_LDFLGS)
+
+
+src_vcopy_SOURCES =            src/vcopy.c
+src_vcopy_LDADD =              $(LIBINTERNAL) $(VSERVER_LDADDS)
+src_vcopy_LDFLAGS =            $(VSERVER_LDFLGS)
+
+src_vunify_SOURCES =           src/vunify.c
+src_vunify_LDADD =             $(LIBINTERNAL) $(VSERVER_LDADDS)
+src_vunify_LDFLAGS =           $(VSERVER_LDFLGS)
+
+src_vhashify_SOURCES =         src/vhashify.c
+if ENSC_CAN_BEECRYPT_WITH_DIETLIBC
+src_vhashify_LDADD =           $(LIBINTERNAL) $(LIBENSCVECTOR) -lbeecrypt $(VSERVER_LDADDS)
+src_vhashify_LDFLAGS =         $(VSERVER_LDFLGS)
+else
+src_vhashify_LDADD =           $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) -lbeecrypt
+src_vhashify_LDFLAGS =
+endif
+
+src_vuname_SOURCES =           src/vuname.c
+src_vuname_LDADD =             $(VSERVER_LDADDS)
+src_vuname_LDFLAGS =           $(VSERVER_LDFLGS)
+
+src_rpm_fake_la_SOURCES                =  src/rpm-fake.c
+src_rpm_fake_la_CFLAGS         =  $(AM_CFLAGS)
+src_rpm_fake_la_LDFLAGS                =  -module -avoid-version -rpath $(pkglibdir)
+src_rpm_fake_la_LIBADD         =  $(LIBVSERVER_GLIBC) -ldl
+
+src_vdlimit_SOURCES            = src/vdlimit.c
+src_vdlimit_LDADD              = $(VSERVER_LDADDS)
+src_vdlimit_LDFLAGS            = $(VSERVER_LDFLGS)
+
+src_vsh_SOURCES                        = src/vsh.c
+src_vsh_LDADD                  = $(VSERVER_LDADDS)
+src_vsh_LDFLAGS                        = $(VSERVER_LDFLGS)
+
+src_vwait_SOURCES              = src/vwait.c
+src_vwait_LDADD                        = $(VSERVER_LDADDS)
+src_vwait_LDFLAGS              = $(VSERVER_LDFLGS)
+
+src_ncontext_SOURCES           = src/ncontext.c
+src_ncontext_LDADD             = $(VSERVER_LDADDS) $(LIBINTERNAL)
+src_ncontext_LDFLAGS           = $(VSERVER_LDFLGS)
+
+src_nattribute_SOURCES         = src/nattribute.c
+src_nattribute_LDADD           = $(VSERVER_LDADDS)
+src_nattribute_LDFLAGS         = $(VSERVER_LDFLGS)
+
+src_naddress_SOURCES           = src/naddress.c
+src_naddress_LDADD             = $(VSERVER_LDADDS) $(LIBINTERNAL)
+src_naddress_LDFLAGS           = $(VSERVER_LDFLGS)
+
+src_vdevmap_SOURCES            = src/vdevmap.c
+src_vdevmap_LDADD              = $(VSERVER_LDADDS) $(LIBINTERNAL)
+src_vdevmap_LDFLAGS            = $(VSERVER_LDFLGS)
+
+src_vsysctl_SOURCES            = src/vsysctl.c
+src_vsysctl_LDADD              = $(VSERVER_LDADDS)
+src_vsysctl_LDFLAGS            = $(VSERVER_LDFLGS)
+
+src_vclone_SOURCES             = src/vclone.c
+src_vclone_LDADD               = $(LIBINTERNAL) $(VSERVER_LDADDS)
+src_vclone_LDFLAGS             = $(VSERVER_LDLFGS)
+
+src_vip6_autod_SOURCES         = src/vip6-autod.c
+src_vip6_autod_LDADD           = $(VSERVER_LDADDS) -lnl
+src_vip6_autod_LDFLAGS         = $(VSERVER_LDFLGS)
+
+src_h2ext_SOURCES              = src/h2ext.c
+src_h2ext_LDADD                        = $(LIBINTERNAL) $(VSERVER_LDADDS)
+src_h2ext_LDFLAGS              = $(VSERVER_LDFLGS)
+
+src_vtag_SOURCES               = src/vtag.c
+src_vtag_LDADD                 = $(VSERVER_LDADDS)
+src_vtag_LDFLAGS               = $(VSERVER_LDADDS)
+
+EXTRA_PROGRAMS +=              $(src_sbin_CXX_PROGS) $(src_pkglib_CXX_PROGS)
+
+TESTS_ENVIRONMENT +=           srctestsuitedir=$(top_builddir)/src/testsuite
 
-src_vunify_SOURCES             =  src/vunify.cc src/vutil.cc
-src_vunify_CPPFLAGS            =  $(AM_CPPFLAGS) -DVROOTDIR=\"$(vserverdir)\"
-src_vcheck_SOURCES             =  src/vcheck.cc src/vutil.cc
+if ENSC_HAVE_C99_COMPILER
+src_sbin_C99_X_PROGS =         $(src_sbin_C99_PROGS)
+src_pkglib_C99_X_PROGS =       $(src_pkglib_C99_PROGS)
+else
+src_sbin_C99_X_PROGS =
+src_pkglib_C99_X_PROGS =  
+endif
 
-#install-data-hook:            $(DESTDIR)$(pkglibdir)/setattr
+if ENSC_HAVE_CXX_COMPILER
+src_sbin_CXX_X_PROGS =         $(src_sbin_CXX_PROGS)
+src_pkglib_CXX_X_PROGS =       $(src_pkglib_CXX_PROGS)
+else
+src_sbin_CXX_X_PROGS =
+src_pkglib_CXX_X_PROGS =  
+endif
 
-#$(DESTDIR)$(pkglibdir)/setattr:
-#                              ln -s showattr '$@'
+install-exec-hook:             src_install_exec_hook
 
-src/setattr$(EXEEXT):          src/showattr$(EXEEXT)
-                               @rm -f '$@'
-                               ln -s showattr$(EXEEXT) '$@'
+src_install_exec_hook:
+                               -rm -f $(DESTDIR)$(pkglibdir)/rpm-fake.a $(DESTDIR)$(pkglibdir)/rpm-fake.la
 
-## Local Variables:
-## compile-command: "make -C .. -k"
-## End:
+include $(top_srcdir)/src/testsuite/Makefile-files