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
26 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \
38 DIETPROGS += src/chcontext-compat \
66 src/rpm-fake-resolver \
83 if ENSC_CAN_BEECRYPT_WITH_DIETLIBC
84 DIETPROGS += src/vhashify
87 noinst_HEADERS += src/capability-compat.h \
90 src/compat-pivot_root.h \
96 src/vhashify-init.hc \
97 src/vserver-visitdir.hc \
100 pkglib_PROGRAMS += src/capchroot \
102 src/chcontext-compat \
114 src/rpm-fake-resolver \
118 $(src_pkglib_C99_X_PROGS) \
119 $(src_pkglib_CXX_X_PROGS)
121 if ENSC_HAVE_C99_COMPILER
122 if ENSC_HAVE_BEECRYPT
123 pkglib_PROGRAMS += src/vhashify
124 endif ENSC_HAVE_BEECRYPT
125 endif ENSC_HAVE_C99_COMPILER
127 legacy_PROGRAMS += src/ifspec \
134 pkglib_LTLIBRARIES += src/rpm-fake.la
136 sbin_PROGRAMS += src/exec-cd \
159 $(src_sbin_CXX_X_PROGS)
161 if ENSC_HAVE_C99_COMPILER
162 sbin_PROGRAMS += src/vdlimit
166 src_capchroot_SOURCES = src/capchroot.c
167 src_capchroot_LDADD = $(VSERVER_LDADDS)
168 src_capchroot_LDFLAGS = $(VSERVER_LDFLGS)
170 src_chbind_compat_SOURCES = src/chbind.c
171 src_chbind_compat_LDADD = $(VSERVER_LDADDS)
172 src_chbind_compat_LDFLAGS = $(VSERVER_LDFLGS)
174 src_chcontext_compat_SOURCES = src/chcontext.c
175 src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
176 src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS)
178 src_vcontext_SOURCES = src/vcontext.c src/vlogin.c
179 src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
180 src_vcontext_LDFLAGS = $(VSERVER_LDFLGS)
182 src_vsched_SOURCES = src/vsched.c
183 src_vsched_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
184 src_vsched_LDFLAGS = $(VSERVER_LDFLGS)
186 src_filetime_SOURCES = src/filetime.c
187 src_filetime_LDADD = $(VSERVER_LDADDS)
188 src_filetime_LDFLAGS = $(VSERVER_LDFLGS)
190 src_chain_echo_SOURCES = src/chain-echo.c
191 src_chroot_sh_SOURCES = src/chroot-sh.c
192 src_chroot_sh_LDADD = $(LIBINTERNAL)
193 src_exec_cd_SOURCES = src/exec-cd.c
194 src_fakerunlevel_SOURCES = src/fakerunlevel.c
195 src_ifspec_SOURCES = src/ifspec.c
196 src_listdevip_SOURCES = src/listdevip.c
197 src_lockfile_SOURCES = src/lockfile.c
198 src_parserpmdump_SOURCES = src/parserpmdump.c
199 src_readlink_SOURCES = src/readlink.c
200 src_rebootmgr_SOURCES = src/rebootmgr.c
201 src_exec_ulimit_SOURCES = src/exec-ulimit.c
202 src_vshelper_sync_SOURCES = src/vshelper-sync.c
204 src_reducecap_SOURCES = src/reducecap.c
205 src_reducecap_LDADD = $(VSERVER_LDADDS)
206 src_reducecap_LDFLAGS = $(VSERVER_LDFLGS)
208 src_vkill_SOURCES = src/vkill.c
209 src_vkill_LDADD = $(VSERVER_LDADDS)
210 src_vkill_LDFLAGS = $(VSERVER_LDFLGS)
211 src_vkill_CPPFLAGS = $(AM_CPPFLAGS) -DLEGACYDIR=\"$(legacydir)\"
213 src_vlimit_SOURCES = src/vlimit.c
214 src_vlimit_LDADD = $(VSERVER_LDADDS)
215 src_vlimit_LDFLAGS = $(VSERVER_LDFLGS)
217 src_save_ctxinfo_SOURCES = src/save_ctxinfo.c
218 src_save_ctxinfo_LDADD = $(VSERVER_LDADDS)
219 src_save_ctxinfo_LDFLAGS = $(VSERVER_LDFLGS)
221 src_vdu_SOURCES = src/vdu.c
222 src_vdu_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
223 src_vdu_LDFLAGS = $(VSERVER_LDFLGS)
225 src_vreboot_SOURCES = src/vreboot.c
227 src_secure_mount_SOURCES = src/secure-mount.c
228 src_secure_mount_LDADD = $(VSERVER_LDADDS)
229 src_secure_mount_LDFLAGS = $(VSERVER_LDFLGS)
231 src_vattribute_SOURCES = src/vattribute.c
232 src_vattribute_LDADD = $(VSERVER_LDADDS)
233 src_vattribute_LDFLAGS = $(VSERVER_LDFLGS)
235 src_vnamespace_SOURCES = src/vnamespace.c
236 src_vnamespace_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
237 src_vnamespace_LDFLAGS = $(VSERVER_LDFLGS)
239 src_rpm_fake_resolver_SOURCES = src/rpm-fake-resolver.c
240 src_rpm_fake_resolver_LDADD = $(VSERVER_LDADDS)
241 src_rpm_fake_resolver_LDFLAGS = $(VSERVER_LDFLGS)
243 src_mask2prefix_SOURCES = src/mask2prefix.c
245 src_vps_SOURCES = src/vps.c
246 src_vps_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
247 src_vps_LDFLAGS = $(VSERVER_LDFLGS)
249 src_vserver_info_SOURCES = src/vserver-info.c
250 src_vserver_info_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
251 src_vserver_info_LDFLAGS = $(VSERVER_LDFLGS)
253 src_vserver_stat_SOURCES = src/vserver-stat.c
254 src_vserver_stat_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS) $(LIBENSCVECTOR)
255 src_vserver_stat_LDFLAGS = $(VSERVER_LDFLGS)
257 src_lsxid_SOURCES = src/fstool.c src/lsxid.c
258 src_lsxid_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS) $(LIBENSCVECTOR)
259 src_lsxid_LDFLAGS = $(VSERVER_LDFLGS)
261 src_chxid_SOURCES = src/fstool.c src/chxid.c
262 src_chxid_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
263 src_chxid_LDFLAGS = $(VSERVER_LDFLGS)
265 src_showattr_SOURCES = src/fstool.c src/showattr.c
266 src_showattr_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
267 src_showattr_LDFLAGS = $(VSERVER_LDFLGS)
269 src_setattr_SOURCES = src/fstool.c src/setattr.c
270 src_setattr_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
271 src_setattr_LDFLAGS = $(VSERVER_LDFLGS)
273 src_keep_ctx_alive_SOURCES = src/keep-ctx-alive.c
274 src_keep_ctx_alive_LDADD = $(VSERVER_LDADDS)
275 src_keep_ctx_alive_LDFLAGS = $(VSERVER_LDFLGS)
278 src_vcopy_SOURCES = src/vcopy.c
279 src_vcopy_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
280 src_vcopy_LDFLAGS = $(VSERVER_LDFLGS)
282 src_vunify_SOURCES = src/vunify.c
283 src_vunify_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
284 src_vunify_LDFLAGS = $(VSERVER_LDFLGS)
286 src_vhashify_SOURCES = src/vhashify.c
287 if ENSC_CAN_BEECRYPT_WITH_DIETLIBC
288 src_vhashify_LDADD = $(LIBINTERNAL) $(LIBENSCVECTOR) -lbeecrypt $(VSERVER_LDADDS)
289 src_vhashify_LDFLAGS = $(VSERVER_LDFLGS)
291 src_vhashify_LDADD = $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) -lbeecrypt
292 src_vhashify_LDFLAGS =
295 src_vuname_SOURCES = src/vuname.c
296 src_vuname_LDADD = $(VSERVER_LDADDS)
297 src_vuname_LDFLAGS = $(VSERVER_LDFLGS)
299 src_rpm_fake_la_SOURCES = src/rpm-fake.c
300 src_rpm_fake_la_CFLAGS = $(AM_CFLAGS)
301 src_rpm_fake_la_LDFLAGS = -module -avoid-version -rpath $(pkglibdir)
302 src_rpm_fake_la_LIBADD = $(LIBVSERVER_GLIBC) -ldl
304 src_vdlimit_SOURCES = src/vdlimit.c
305 src_vdlimit_LDADD = $(VSERVER_LDADDS)
306 src_vdlimit_LDFLAGS = $(VSERVER_LDFLGS)
308 src_vwait_SOURCES = src/vwait.c
309 src_vwait_LDADD = $(VSERVER_LDADDS)
310 src_vwait_LDFLAGS = $(VSERVER_LDFLGS)
312 src_ncontext_SOURCES = src/ncontext.c
313 src_ncontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
314 src_ncontext_LDFLAGS = $(VSERVER_LDFLGS)
316 src_nattribute_SOURCES = src/nattribute.c
317 src_nattribute_LDADD = $(VSERVER_LDADDS)
318 src_nattribute_LDFLAGS = $(VSERVER_LDFLGS)
320 src_naddress_SOURCES = src/naddress.c
321 src_naddress_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
322 src_naddress_LDFLAGS = $(VSERVER_LDFLGS)
324 src_vdevmap_SOURCES = src/vdevmap.c
325 src_vdevmap_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
326 src_vdevmap_LDFLAGS = $(VSERVER_LDFLGS)
328 EXTRA_PROGRAMS += $(src_sbin_CXX_PROGS) $(src_pkglib_CXX_PROGS)
330 TESTS_ENVIRONMENT += srctestsuitedir=$(top_builddir)/src/testsuite
332 if ENSC_HAVE_C99_COMPILER
333 src_sbin_C99_X_PROGS = $(src_sbin_C99_PROGS)
334 src_pkglib_C99_X_PROGS = $(src_pkglib_C99_PROGS)
336 src_sbin_C99_X_PROGS =
337 src_pkglib_C99_X_PROGS =
340 if ENSC_HAVE_CXX_COMPILER
341 src_sbin_CXX_X_PROGS = $(src_sbin_CXX_PROGS)
342 src_pkglib_CXX_X_PROGS = $(src_pkglib_CXX_PROGS)
344 src_sbin_CXX_X_PROGS =
345 src_pkglib_CXX_X_PROGS =
348 install-exec-hook: src_install_exec_hook
350 src_install_exec_hook:
351 -rm -f $(DESTDIR)$(pkglibdir)/rpm-fake.a $(DESTDIR)$(pkglibdir)/rpm-fake.la
353 include $(top_srcdir)/src/testsuite/Makefile-files