Add vdevmap and required functionality.
[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
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
83 if ENSC_CAN_BEECRYPT_WITH_DIETLIBC
84 DIETPROGS +=            src/vhashify
85 endif
86
87 noinst_HEADERS +=       src/capability-compat.h \
88                         src/util.h \
89                         src/fstool.h \
90                         src/compat-pivot_root.h \
91                         src/stack-start.h \
92                         src/vcopy-init.hc \
93                         src/vunify.h \
94                         src/vunify-init.hc \
95                         src/vhashify.h \
96                         src/vhashify-init.hc \
97                         src/vserver-visitdir.hc \
98                         src/context-sync.hc
99
100 pkglib_PROGRAMS +=      src/capchroot \
101                         src/chain-echo \
102                         src/chcontext-compat \
103                         src/check-unixfile \
104                         src/chroot-sh \
105                         src/fakerunlevel \
106                         src/filetime \
107                         src/keep-ctx-alive \
108                         src/lockfile \
109                         src/readlink \
110                         src/save_ctxinfo \
111                         src/secure-mount \
112                         src/mask2prefix \
113                         src/exec-ulimit \
114                         src/rpm-fake-resolver \
115                         src/vshelper-sync \
116                         src/sigexec \
117                         src/chbind-compat \
118                         $(src_pkglib_C99_X_PROGS) \
119                         $(src_pkglib_CXX_X_PROGS)
120
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
126
127 legacy_PROGRAMS +=      src/ifspec \
128                         src/listdevip \
129                         src/parserpmdump \
130                         src/rebootmgr \
131                         src/showperm \
132                         src/vreboot
133
134 pkglib_LTLIBRARIES +=   src/rpm-fake.la
135
136 sbin_PROGRAMS +=        src/exec-cd \
137                         src/lsxid \
138                         src/chxid \
139                         src/vps \
140                         src/showattr \
141                         src/setattr \
142                         src/reducecap \
143                         src/vdu \
144                         src/vattribute \
145                         src/vcontext \
146                         src/vlimit \
147                         src/vkill \
148                         src/vnamespace \
149                         src/vrsetup \
150                         src/vsched \
151                         src/vserver-stat \
152                         src/vserver-info \
153                         src/vuname \
154                         src/vwait \
155                         src/ncontext \
156                         src/nattribute \
157                         src/naddress \
158                         src/vdevmap \
159                         $(src_sbin_CXX_X_PROGS)
160
161 if ENSC_HAVE_C99_COMPILER
162 sbin_PROGRAMS +=        src/vdlimit
163 endif
164
165
166 src_capchroot_SOURCES =         src/capchroot.c
167 src_capchroot_LDADD =           $(VSERVER_LDADDS)
168 src_capchroot_LDFLAGS =         $(VSERVER_LDFLGS)
169
170 src_chbind_compat_SOURCES =     src/chbind.c
171 src_chbind_compat_LDADD =       $(VSERVER_LDADDS)
172 src_chbind_compat_LDFLAGS =     $(VSERVER_LDFLGS)
173
174 src_chcontext_compat_SOURCES =  src/chcontext.c
175 src_chcontext_compat_LDADD =    $(VSERVER_LDADDS) $(LIBINTERNAL)
176 src_chcontext_compat_LDFLAGS =  $(VSERVER_LDFLGS)
177
178 src_vcontext_SOURCES            =  src/vcontext.c src/vlogin.c
179 src_vcontext_LDADD              =  $(VSERVER_LDADDS) $(LIBINTERNAL)
180 src_vcontext_LDFLAGS            =  $(VSERVER_LDFLGS)
181
182 src_vsched_SOURCES              =  src/vsched.c
183 src_vsched_LDADD                =  $(VSERVER_LDADDS) $(LIBINTERNAL)
184 src_vsched_LDFLAGS              =  $(VSERVER_LDFLGS)
185
186 src_filetime_SOURCES            =  src/filetime.c
187 src_filetime_LDADD              =  $(VSERVER_LDADDS)
188 src_filetime_LDFLAGS            =  $(VSERVER_LDFLGS)
189
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
203
204 src_reducecap_SOURCES           =  src/reducecap.c
205 src_reducecap_LDADD             =  $(VSERVER_LDADDS)
206 src_reducecap_LDFLAGS           =  $(VSERVER_LDFLGS)
207
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)\"
212
213 src_vlimit_SOURCES              =  src/vlimit.c
214 src_vlimit_LDADD                =  $(VSERVER_LDADDS)
215 src_vlimit_LDFLAGS              =  $(VSERVER_LDFLGS)
216
217 src_save_ctxinfo_SOURCES        =  src/save_ctxinfo.c
218 src_save_ctxinfo_LDADD          =  $(VSERVER_LDADDS)
219 src_save_ctxinfo_LDFLAGS        =  $(VSERVER_LDFLGS)
220
221 src_vdu_SOURCES                 =  src/vdu.c
222 src_vdu_LDADD                   =  $(VSERVER_LDADDS) $(LIBINTERNAL)
223 src_vdu_LDFLAGS                 =  $(VSERVER_LDFLGS)
224
225 src_vreboot_SOURCES =           src/vreboot.c
226
227 src_secure_mount_SOURCES =      src/secure-mount.c
228 src_secure_mount_LDADD =        $(VSERVER_LDADDS)
229 src_secure_mount_LDFLAGS =      $(VSERVER_LDFLGS)
230
231 src_vattribute_SOURCES =        src/vattribute.c
232 src_vattribute_LDADD =          $(VSERVER_LDADDS)
233 src_vattribute_LDFLAGS =        $(VSERVER_LDFLGS)
234
235 src_vnamespace_SOURCES =        src/vnamespace.c
236 src_vnamespace_LDADD =          $(VSERVER_LDADDS) $(LIBINTERNAL)
237 src_vnamespace_LDFLAGS =        $(VSERVER_LDFLGS)
238
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)
242
243 src_mask2prefix_SOURCES         =  src/mask2prefix.c
244
245 src_vps_SOURCES                 =  src/vps.c
246 src_vps_LDADD                   =  $(LIBINTERNAL) $(VSERVER_LDADDS)
247 src_vps_LDFLAGS                 =  $(VSERVER_LDFLGS)
248
249 src_vserver_info_SOURCES        =  src/vserver-info.c
250 src_vserver_info_LDADD          =  $(LIBINTERNAL) $(VSERVER_LDADDS)
251 src_vserver_info_LDFLAGS        =  $(VSERVER_LDFLGS)
252
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)
256
257 src_lsxid_SOURCES               =  src/fstool.c src/lsxid.c
258 src_lsxid_LDADD                 =  $(LIBINTERNAL) $(VSERVER_LDADDS) $(LIBENSCVECTOR)
259 src_lsxid_LDFLAGS               =  $(VSERVER_LDFLGS) 
260
261 src_chxid_SOURCES               =  src/fstool.c src/chxid.c
262 src_chxid_LDADD                 =  $(LIBINTERNAL) $(VSERVER_LDADDS)
263 src_chxid_LDFLAGS               =  $(VSERVER_LDFLGS)
264
265 src_showattr_SOURCES            =  src/fstool.c src/showattr.c
266 src_showattr_LDADD              =  $(LIBINTERNAL) $(VSERVER_LDADDS)
267 src_showattr_LDFLAGS            =  $(VSERVER_LDFLGS)
268
269 src_setattr_SOURCES             =  src/fstool.c src/setattr.c
270 src_setattr_LDADD               =  $(LIBINTERNAL) $(VSERVER_LDADDS)
271 src_setattr_LDFLAGS             =  $(VSERVER_LDFLGS)
272
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)
276
277
278 src_vcopy_SOURCES =             src/vcopy.c
279 src_vcopy_LDADD =               $(LIBINTERNAL) $(VSERVER_LDADDS)
280 src_vcopy_LDFLAGS =             $(VSERVER_LDFLGS)
281
282 src_vunify_SOURCES =            src/vunify.c
283 src_vunify_LDADD =              $(LIBINTERNAL) $(VSERVER_LDADDS)
284 src_vunify_LDFLAGS =            $(VSERVER_LDFLGS)
285
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)
290 else
291 src_vhashify_LDADD =            $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) -lbeecrypt
292 src_vhashify_LDFLAGS =
293 endif
294
295 src_vuname_SOURCES =            src/vuname.c
296 src_vuname_LDADD =              $(VSERVER_LDADDS)
297 src_vuname_LDFLAGS =            $(VSERVER_LDFLGS)
298
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
303
304 src_vdlimit_SOURCES             = src/vdlimit.c
305 src_vdlimit_LDADD               = $(VSERVER_LDADDS)
306 src_vdlimit_LDFLAGS             = $(VSERVER_LDFLGS)
307
308 src_vwait_SOURCES               = src/vwait.c
309 src_vwait_LDADD                 = $(VSERVER_LDADDS)
310 src_vwait_LDFLAGS               = $(VSERVER_LDFLGS)
311
312 src_ncontext_SOURCES            = src/ncontext.c
313 src_ncontext_LDADD              = $(VSERVER_LDADDS) $(LIBINTERNAL)
314 src_ncontext_LDFLAGS            = $(VSERVER_LDFLGS)
315
316 src_nattribute_SOURCES          = src/nattribute.c
317 src_nattribute_LDADD            = $(VSERVER_LDADDS)
318 src_nattribute_LDFLAGS          = $(VSERVER_LDFLGS)
319
320 src_naddress_SOURCES            = src/naddress.c
321 src_naddress_LDADD              = $(VSERVER_LDADDS) $(LIBINTERNAL)
322 src_naddress_LDFLAGS            = $(VSERVER_LDFLGS)
323
324 src_vdevmap_SOURCES             = src/vdevmap.c
325 src_vdevmap_LDADD               = $(VSERVER_LDADDS) $(LIBINTERNAL)
326 src_vdevmap_LDFLAGS             = $(VSERVER_LDFLGS)
327
328 EXTRA_PROGRAMS +=               $(src_sbin_CXX_PROGS) $(src_pkglib_CXX_PROGS)
329
330 TESTS_ENVIRONMENT +=            srctestsuitedir=$(top_builddir)/src/testsuite
331
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)
335 else
336 src_sbin_C99_X_PROGS =
337 src_pkglib_C99_X_PROGS =  
338 endif
339
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)
343 else
344 src_sbin_CXX_X_PROGS =
345 src_pkglib_CXX_X_PROGS =  
346 endif
347
348 install-exec-hook:              src_install_exec_hook
349
350 src_install_exec_hook:
351                                 -rm -f $(DESTDIR)$(pkglibdir)/rpm-fake.a $(DESTDIR)$(pkglibdir)/rpm-fake.la
352
353 include $(top_srcdir)/src/testsuite/Makefile-files