fix vsomething arguments in gentoo wrappers
[util-vserver.git] / src / Makefile-files
1 ## $Id$  -*- makefile -*-
2
3 ## Copyright (C) 2003,2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
4 ##  
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)
8 ## any later version.
9 ##  
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.
14 ##  
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.
18 ##  
19
20 src_sbin_CXX_PROGS =    
21 src_pkglib_CXX_PROGS =  
22
23 src_pkglib_C99_PROGS =  src/vunify src/vcopy src/vclone
24
25
26 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \
27                         src/parserpmdump \
28                         src/showperm \
29                         src/vbuild \
30                         src/vcheck \
31                         src/vreboot \
32                         src/save_ctxinfo \
33                         src/mask2prefix \
34                         src/ifspec \
35                         src/rebootmgr \
36                         src/vfiles
37
38 DIETPROGS +=            src/chcontext-compat \
39                         src/capchroot \
40                         src/chain-echo \
41                         src/check-unixfile \
42                         src/chroot-sh \
43                         src/filetime \
44                         src/lockfile \
45                         src/readlink \
46                         src/secure-mount \
47                         src/save_ctxinfo \
48                         src/mask2prefix \
49                         src/chbind-compat \
50                         src/exec-cd \
51                         src/fakerunlevel \
52                         src/keep-ctx-alive \
53                         src/exec-ulimit \
54                         src/vps \
55                         src/lsxid \
56                         src/chxid \
57                         src/reducecap \
58                         src/showattr \
59                         src/setattr \
60                         src/sigexec \
61                         src/vattribute \
62                         src/vlimit \
63                         src/vnamespace \
64                         src/vunify \
65                         src/vuname \
66                         src/rpm-fake-resolver \
67                         src/vcontext \
68                         src/vcopy \
69                         src/vkill \
70                         src/vsched \
71                         src/vshelper-sync \
72                         src/vrsetup \
73                         src/vserver-stat \
74                         src/vserver-info \
75                         src/vdlimit \
76                         src/vdu \
77                         src/vwait \
78                         src/ncontext \
79                         src/nattribute \
80                         src/naddress \
81                         src/vdevmap \
82                         src/vsysctl \
83                         src/vclone
84
85 if ENSC_CAN_BEECRYPT_WITH_DIETLIBC
86 DIETPROGS +=            src/vhashify
87 endif
88
89 noinst_HEADERS +=       src/capability-compat.h \
90                         src/util.h \
91                         src/fstool.h \
92                         src/compat-pivot_root.h \
93                         src/stack-start.h \
94                         src/vcopy-init.hc \
95                         src/vunify.h \
96                         src/vunify-init.hc \
97                         src/vhashify.h \
98                         src/vhashify-init.hc \
99                         src/vserver-visitdir.hc \
100                         src/context-sync.hc
101
102 pkglib_PROGRAMS +=      src/capchroot \
103                         src/chain-echo \
104                         src/chcontext-compat \
105                         src/check-unixfile \
106                         src/chroot-sh \
107                         src/fakerunlevel \
108                         src/filetime \
109                         src/keep-ctx-alive \
110                         src/lockfile \
111                         src/readlink \
112                         src/save_ctxinfo \
113                         src/secure-mount \
114                         src/mask2prefix \
115                         src/exec-ulimit \
116                         src/rpm-fake-resolver \
117                         src/vshelper-sync \
118                         src/sigexec \
119                         src/chbind-compat \
120                         src/vsysctl \
121                         $(src_pkglib_C99_X_PROGS) \
122                         $(src_pkglib_CXX_X_PROGS)
123
124 if ENSC_HAVE_C99_COMPILER
125 if ENSC_HAVE_BEECRYPT
126 pkglib_PROGRAMS +=      src/vhashify
127 endif ENSC_HAVE_BEECRYPT
128 endif ENSC_HAVE_C99_COMPILER
129
130 legacy_PROGRAMS +=      src/ifspec \
131                         src/listdevip \
132                         src/parserpmdump \
133                         src/rebootmgr \
134                         src/showperm \
135                         src/vreboot
136
137 pkglib_LTLIBRARIES +=   src/rpm-fake.la
138
139 sbin_PROGRAMS +=        src/exec-cd \
140                         src/lsxid \
141                         src/chxid \
142                         src/vps \
143                         src/showattr \
144                         src/setattr \
145                         src/reducecap \
146                         src/vdu \
147                         src/vattribute \
148                         src/vcontext \
149                         src/vlimit \
150                         src/vkill \
151                         src/vnamespace \
152                         src/vrsetup \
153                         src/vsched \
154                         src/vserver-stat \
155                         src/vserver-info \
156                         src/vuname \
157                         src/vwait \
158                         src/ncontext \
159                         src/nattribute \
160                         src/naddress \
161                         src/vdevmap \
162                         $(src_sbin_CXX_X_PROGS)
163
164 if ENSC_HAVE_C99_COMPILER
165 sbin_PROGRAMS +=        src/vdlimit
166 endif
167
168
169 src_capchroot_SOURCES =         src/capchroot.c
170 src_capchroot_LDADD =           $(VSERVER_LDADDS)
171 src_capchroot_LDFLAGS =         $(VSERVER_LDFLGS)
172
173 src_chbind_compat_SOURCES =     src/chbind.c
174 src_chbind_compat_LDADD =       $(VSERVER_LDADDS)
175 src_chbind_compat_LDFLAGS =     $(VSERVER_LDFLGS)
176
177 src_chcontext_compat_SOURCES =  src/chcontext.c
178 src_chcontext_compat_LDADD =    $(VSERVER_LDADDS) $(LIBINTERNAL)
179 src_chcontext_compat_LDFLAGS =  $(VSERVER_LDFLGS)
180
181 src_vcontext_SOURCES            =  src/vcontext.c src/vlogin.c
182 src_vcontext_LDADD              =  $(VSERVER_LDADDS) $(LIBINTERNAL)
183 src_vcontext_LDFLAGS            =  $(VSERVER_LDFLGS)
184
185 src_vsched_SOURCES              =  src/vsched.c
186 src_vsched_LDADD                =  $(VSERVER_LDADDS) $(LIBINTERNAL)
187 src_vsched_LDFLAGS              =  $(VSERVER_LDFLGS)
188
189 src_filetime_SOURCES            =  src/filetime.c
190 src_filetime_LDADD              =  $(VSERVER_LDADDS)
191 src_filetime_LDFLAGS            =  $(VSERVER_LDFLGS)
192
193 src_chain_echo_SOURCES          =  src/chain-echo.c
194 src_chroot_sh_SOURCES           =  src/chroot-sh.c
195 src_chroot_sh_LDADD             =  $(LIBINTERNAL)
196 src_exec_cd_SOURCES             =  src/exec-cd.c
197 src_fakerunlevel_SOURCES        =  src/fakerunlevel.c
198 src_ifspec_SOURCES              =  src/ifspec.c
199 src_listdevip_SOURCES           =  src/listdevip.c
200 src_lockfile_SOURCES            =  src/lockfile.c
201 src_parserpmdump_SOURCES        =  src/parserpmdump.c
202 src_readlink_SOURCES            =  src/readlink.c
203 src_rebootmgr_SOURCES           =  src/rebootmgr.c
204 src_exec_ulimit_SOURCES         =  src/exec-ulimit.c
205 src_vshelper_sync_SOURCES       =  src/vshelper-sync.c
206
207 src_reducecap_SOURCES           =  src/reducecap.c
208 src_reducecap_LDADD             =  $(VSERVER_LDADDS)
209 src_reducecap_LDFLAGS           =  $(VSERVER_LDFLGS)
210
211 src_vkill_SOURCES               =  src/vkill.c
212 src_vkill_LDADD                 =  $(VSERVER_LDADDS)
213 src_vkill_LDFLAGS               =  $(VSERVER_LDFLGS)
214 src_vkill_CPPFLAGS              =  $(AM_CPPFLAGS) -DLEGACYDIR=\"$(legacydir)\"
215
216 src_vlimit_SOURCES              =  src/vlimit.c
217 src_vlimit_LDADD                =  $(VSERVER_LDADDS)
218 src_vlimit_LDFLAGS              =  $(VSERVER_LDFLGS)
219
220 src_save_ctxinfo_SOURCES        =  src/save_ctxinfo.c
221 src_save_ctxinfo_LDADD          =  $(VSERVER_LDADDS)
222 src_save_ctxinfo_LDFLAGS        =  $(VSERVER_LDFLGS)
223
224 src_vdu_SOURCES                 =  src/vdu.c
225 src_vdu_LDADD                   =  $(VSERVER_LDADDS) $(LIBINTERNAL)
226 src_vdu_LDFLAGS                 =  $(VSERVER_LDFLGS)
227
228 src_vreboot_SOURCES =           src/vreboot.c
229
230 src_secure_mount_SOURCES =      src/secure-mount.c
231 src_secure_mount_LDADD =        $(VSERVER_LDADDS)
232 src_secure_mount_LDFLAGS =      $(VSERVER_LDFLGS)
233
234 src_vattribute_SOURCES =        src/vattribute.c
235 src_vattribute_LDADD =          $(VSERVER_LDADDS)
236 src_vattribute_LDFLAGS =        $(VSERVER_LDFLGS)
237
238 src_vnamespace_SOURCES =        src/vnamespace.c
239 src_vnamespace_LDADD =          $(VSERVER_LDADDS) $(LIBINTERNAL)
240 src_vnamespace_LDFLAGS =        $(VSERVER_LDFLGS)
241
242 src_rpm_fake_resolver_SOURCES   =  src/rpm-fake-resolver.c
243 src_rpm_fake_resolver_LDADD     =  $(VSERVER_LDADDS)
244 src_rpm_fake_resolver_LDFLAGS   =  $(VSERVER_LDFLGS)
245
246 src_mask2prefix_SOURCES         =  src/mask2prefix.c
247
248 src_vps_SOURCES                 =  src/vps.c
249 src_vps_LDADD                   =  $(LIBINTERNAL) $(VSERVER_LDADDS)
250 src_vps_LDFLAGS                 =  $(VSERVER_LDFLGS)
251
252 src_vserver_info_SOURCES        =  src/vserver-info.c
253 src_vserver_info_LDADD          =  $(LIBINTERNAL) $(VSERVER_LDADDS)
254 src_vserver_info_LDFLAGS        =  $(VSERVER_LDFLGS)
255
256 src_vserver_stat_SOURCES        =  src/vserver-stat.c
257 src_vserver_stat_LDADD          =  $(LIBINTERNAL) $(VSERVER_LDADDS) $(LIBENSCVECTOR)
258 src_vserver_stat_LDFLAGS        =  $(VSERVER_LDFLGS)
259
260 src_lsxid_SOURCES               =  src/fstool.c src/lsxid.c
261 src_lsxid_LDADD                 =  $(LIBINTERNAL) $(VSERVER_LDADDS) $(LIBENSCVECTOR)
262 src_lsxid_LDFLAGS               =  $(VSERVER_LDFLGS) 
263
264 src_chxid_SOURCES               =  src/fstool.c src/chxid.c
265 src_chxid_LDADD                 =  $(LIBINTERNAL) $(VSERVER_LDADDS)
266 src_chxid_LDFLAGS               =  $(VSERVER_LDFLGS)
267
268 src_showattr_SOURCES            =  src/fstool.c src/showattr.c
269 src_showattr_LDADD              =  $(LIBINTERNAL) $(VSERVER_LDADDS)
270 src_showattr_LDFLAGS            =  $(VSERVER_LDFLGS)
271
272 src_setattr_SOURCES             =  src/fstool.c src/setattr.c
273 src_setattr_LDADD               =  $(LIBINTERNAL) $(VSERVER_LDADDS)
274 src_setattr_LDFLAGS             =  $(VSERVER_LDFLGS)
275
276 src_keep_ctx_alive_SOURCES =    src/keep-ctx-alive.c
277 src_keep_ctx_alive_LDADD =      $(VSERVER_LDADDS)
278 src_keep_ctx_alive_LDFLAGS =    $(VSERVER_LDFLGS)
279
280
281 src_vcopy_SOURCES =             src/vcopy.c
282 src_vcopy_LDADD =               $(LIBINTERNAL) $(VSERVER_LDADDS)
283 src_vcopy_LDFLAGS =             $(VSERVER_LDFLGS)
284
285 src_vunify_SOURCES =            src/vunify.c
286 src_vunify_LDADD =              $(LIBINTERNAL) $(VSERVER_LDADDS)
287 src_vunify_LDFLAGS =            $(VSERVER_LDFLGS)
288
289 src_vhashify_SOURCES =          src/vhashify.c
290 if ENSC_CAN_BEECRYPT_WITH_DIETLIBC
291 src_vhashify_LDADD =            $(LIBINTERNAL) $(LIBENSCVECTOR) -lbeecrypt $(VSERVER_LDADDS)
292 src_vhashify_LDFLAGS =          $(VSERVER_LDFLGS)
293 else
294 src_vhashify_LDADD =            $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) -lbeecrypt
295 src_vhashify_LDFLAGS =
296 endif
297
298 src_vuname_SOURCES =            src/vuname.c
299 src_vuname_LDADD =              $(VSERVER_LDADDS)
300 src_vuname_LDFLAGS =            $(VSERVER_LDFLGS)
301
302 src_rpm_fake_la_SOURCES         =  src/rpm-fake.c
303 src_rpm_fake_la_CFLAGS          =  $(AM_CFLAGS)
304 src_rpm_fake_la_LDFLAGS         =  -module -avoid-version -rpath $(pkglibdir)
305 src_rpm_fake_la_LIBADD          =  $(LIBVSERVER_GLIBC) -ldl
306
307 src_vdlimit_SOURCES             = src/vdlimit.c
308 src_vdlimit_LDADD               = $(VSERVER_LDADDS)
309 src_vdlimit_LDFLAGS             = $(VSERVER_LDFLGS)
310
311 src_vwait_SOURCES               = src/vwait.c
312 src_vwait_LDADD                 = $(VSERVER_LDADDS)
313 src_vwait_LDFLAGS               = $(VSERVER_LDFLGS)
314
315 src_ncontext_SOURCES            = src/ncontext.c
316 src_ncontext_LDADD              = $(VSERVER_LDADDS) $(LIBINTERNAL)
317 src_ncontext_LDFLAGS            = $(VSERVER_LDFLGS)
318
319 src_nattribute_SOURCES          = src/nattribute.c
320 src_nattribute_LDADD            = $(VSERVER_LDADDS)
321 src_nattribute_LDFLAGS          = $(VSERVER_LDFLGS)
322
323 src_naddress_SOURCES            = src/naddress.c
324 src_naddress_LDADD              = $(VSERVER_LDADDS) $(LIBINTERNAL)
325 src_naddress_LDFLAGS            = $(VSERVER_LDFLGS)
326
327 src_vdevmap_SOURCES             = src/vdevmap.c
328 src_vdevmap_LDADD               = $(VSERVER_LDADDS) $(LIBINTERNAL)
329 src_vdevmap_LDFLAGS             = $(VSERVER_LDFLGS)
330
331 src_vsysctl_SOURCES             = src/vsysctl.c
332 src_vsysctl_LDADD               = $(VSERVER_LDADDS)
333 src_vsysctl_LDFLAGS             = $(VSERVER_LDFLGS)
334
335 src_vclone_SOURCES              = src/vclone.c
336 src_vclone_LDADD                = $(LIBINTERNAL) $(VSERVER_LDADDS)
337 src_vclone_LDFLAGS              = $(VSERVER_LDLFGS)
338
339 EXTRA_PROGRAMS +=               $(src_sbin_CXX_PROGS) $(src_pkglib_CXX_PROGS)
340
341 TESTS_ENVIRONMENT +=            srctestsuitedir=$(top_builddir)/src/testsuite
342
343 if ENSC_HAVE_C99_COMPILER
344 src_sbin_C99_X_PROGS =          $(src_sbin_C99_PROGS)
345 src_pkglib_C99_X_PROGS =        $(src_pkglib_C99_PROGS)
346 else
347 src_sbin_C99_X_PROGS =
348 src_pkglib_C99_X_PROGS =  
349 endif
350
351 if ENSC_HAVE_CXX_COMPILER
352 src_sbin_CXX_X_PROGS =          $(src_sbin_CXX_PROGS)
353 src_pkglib_CXX_X_PROGS =        $(src_pkglib_CXX_PROGS)
354 else
355 src_sbin_CXX_X_PROGS =
356 src_pkglib_CXX_X_PROGS =  
357 endif
358
359 install-exec-hook:              src_install_exec_hook
360
361 src_install_exec_hook:
362                                 -rm -f $(DESTDIR)$(pkglibdir)/rpm-fake.a $(DESTDIR)$(pkglibdir)/rpm-fake.la
363
364 include $(top_srcdir)/src/testsuite/Makefile-files