use $(LIBENSCVECTOR) instead of libensc_vector.a
[util-vserver.git] / util-vserver / 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 =    src/vfiles
21 src_pkglib_CXX_PROGS =  src/vbuild src/vcheck
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/chroot-cat \
35                         src/ifspec \
36                         src/rebootmgr \
37                         src/vdu \
38                         src/vfiles
39
40 DIETPROGS +=            src/chcontext-compat \
41                         src/capchroot \
42                         src/chain-echo \
43                         src/check-unixfile \
44                         src/filetime \
45                         src/lockfile \
46                         src/readlink \
47                         src/secure-mount \
48                         src/save_ctxinfo \
49                         src/mask2prefix \
50                         src/chbind \
51                         src/chroot-cat \
52                         src/chroot-rm \
53                         src/exec-cd \
54                         src/fakerunlevel \
55                         src/keep-ctx-alive \
56                         src/exec-ulimit \
57                         src/vps \
58                         src/lsxid \
59                         src/chxid \
60                         src/reducecap \
61                         src/showattr \
62                         src/setattr \
63                         src/sigexec \
64                         src/vattribute \
65                         src/vlimit \
66                         src/vnamespace \
67                         src/vunify \
68                         src/vuname \
69                         src/rpm-fake-resolver \
70                         src/vcontext \
71                         src/vcopy \
72                         src/vkill \
73                         src/vsched \
74                         src/vshelper-sync \
75                         src/vrsetup \
76                         src/vserver-stat \
77                         src/vserver-info \
78                         src/vdlimit
79
80 if ENSC_CAN_BEECRYPT_WITH_DIETLIBC
81 DIETPROGS +=            src/vhashify
82 endif
83
84 noinst_HEADERS +=       src/vutil.h src/vutil.p \
85                         src/capability-compat.h \
86                         src/util.h \
87                         src/fstool.h \
88                         src/compat-pivot_root.h \
89                         src/stack-start.h \
90                         src/vcopy-init.hc \
91                         src/vunify.h \
92                         src/vunify-init.hc \
93                         src/vhashify.h \
94                         src/vhashify-init.hc \
95                         src/vserver-visitdir.hc \
96                         src/context-sync.hc \
97                         src/vserver.hh
98
99 pkglib_PROGRAMS +=      src/capchroot \
100                         src/chain-echo \
101                         src/chcontext-compat \
102                         src/check-unixfile \
103                         src/chroot-cat \
104                         src/chroot-rm \
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_pkglib_C99_X_PROGS) \
118                         $(src_pkglib_CXX_X_PROGS)
119
120 if ENSC_HAVE_C99_COMPILER
121 if ENSC_HAVE_BEECRYPT
122 pkglib_PROGRAMS +=      src/vhashify
123 endif ENSC_HAVE_BEECRYPT
124 endif ENSC_HAVE_C99_COMPILER
125
126 legacy_PROGRAMS +=      src/ifspec \
127                         src/listdevip \
128                         src/parserpmdump \
129                         src/rebootmgr \
130                         src/showperm \
131                         src/vreboot
132
133 pkglib_LTLIBRARIES +=   src/rpm-fake.la
134
135 sbin_PROGRAMS +=        src/chbind \
136                         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_sbin_CXX_X_PROGS)
155
156 if ENSC_HAVE_C99_COMPILER
157 sbin_PROGRAMS +=        src/vdlimit
158 endif
159
160
161 src_capchroot_SOURCES =         src/capchroot.c
162 src_capchroot_LDADD =           $(VSERVER_LDADDS)
163 src_capchroot_LDFLAGS =         $(VSERVER_LDFLGS)
164
165 src_chbind_SOURCES =            src/chbind.c
166 src_chbind_LDADD =              $(VSERVER_LDADDS)
167 src_chbind_LDFLAGS =            $(VSERVER_LDFLGS)
168
169 src_chcontext_compat_SOURCES =  src/chcontext.c
170 src_chcontext_compat_LDADD =    $(VSERVER_LDADDS) $(LIBINTERNAL)
171 src_chcontext_compat_LDFLAGS =  $(VSERVER_LDFLGS)
172
173 src_vcontext_SOURCES            =  src/vcontext.c
174 src_vcontext_LDADD              =  $(VSERVER_LDADDS) $(LIBINTERNAL)
175 src_vcontext_LDFLAGS            =  $(VSERVER_LDFLGS)
176
177 src_vsched_SOURCES              =  src/vsched.c
178 src_vsched_LDADD                =  $(VSERVER_LDADDS)
179 src_vsched_LDFLAGS              =  $(VSERVER_LDFLGS)
180
181 src_filetime_SOURCES            =  src/filetime.c
182 src_filetime_LDADD              =  $(VSERVER_LDADDS)
183 src_filetime_LDFLAGS            =  $(VSERVER_LDFLGS)
184
185 src_chain_echo_SOURCES          =  src/chain-echo.c
186 src_chroot_cat_SOURCES          =  src/chroot-cat.c
187 src_chroot_rm_SOURCES           =  src/chroot-rm.c
188 src_exec_cd_SOURCES             =  src/exec-cd.c
189 src_fakerunlevel_SOURCES        =  src/fakerunlevel.c
190 src_ifspec_SOURCES              =  src/ifspec.c
191 src_listdevip_SOURCES           =  src/listdevip.c
192 src_lockfile_SOURCES            =  src/lockfile.c
193 src_parserpmdump_SOURCES        =  src/parserpmdump.c
194 src_readlink_SOURCES            =  src/readlink.c
195 src_rebootmgr_SOURCES           =  src/rebootmgr.c
196 src_exec_ulimit_SOURCES         =  src/exec-ulimit.c
197 src_vshelper_sync_SOURCES       =  src/vshelper-sync.c
198
199 src_reducecap_SOURCES           =  src/reducecap.c
200 src_reducecap_LDADD             =  $(VSERVER_LDADDS)
201 src_reducecap_LDFLAGS           =  $(VSERVER_LDFLGS)
202
203 src_vkill_SOURCES               =  src/vkill.c
204 src_vkill_LDADD                 =  $(VSERVER_LDADDS)
205 src_vkill_LDFLAGS               =  $(VSERVER_LDFLGS)
206 src_vkill_CPPFLAGS              =  $(AM_CPPFLAGS) -DLEGACYDIR=\"$(legacydir)\"
207
208 src_vlimit_SOURCES              =  src/vlimit.c
209 src_vlimit_LDADD                =  $(VSERVER_LDADDS)
210 src_vlimit_LDFLAGS              =  $(VSERVER_LDFLGS)
211
212 src_save_ctxinfo_SOURCES        =  src/save_ctxinfo.c
213 src_save_ctxinfo_LDADD          =  $(VSERVER_LDADDS)
214 src_save_ctxinfo_LDFLAGS        =  $(VSERVER_LDFLGS)
215
216 src_vdu_SOURCES =               src/vdu.c
217 src_vreboot_SOURCES =           src/vreboot.c
218
219 src_secure_mount_SOURCES =      src/secure-mount.c
220 src_secure_mount_LDADD =        $(VSERVER_LDADDS)
221 src_secure_mount_LDFLAGS =      $(VSERVER_LDFLGS)
222
223 src_vattribute_SOURCES =        src/vattribute.c
224 src_vattribute_LDADD =          $(VSERVER_LDADDS)
225 src_vattribute_LDFLAGS =        $(VSERVER_LDFLGS)
226
227 src_vnamespace_SOURCES =        src/vnamespace.c
228 src_vnamespace_LDADD =          $(VSERVER_LDADDS) $(LIBINTERNAL)
229 src_vnamespace_LDFLAGS =        $(VSERVER_LDFLGS)
230
231 src_rpm_fake_resolver_SOURCES   =  src/rpm-fake-resolver.c
232 src_rpm_fake_resolver_LDADD     =  $(VSERVER_LDADDS)
233 src_rpm_fake_resolver_LDFLAGS   =  $(VSERVER_LDFLGS)
234
235 src_mask2prefix_SOURCES         =  src/mask2prefix.c
236
237 src_vps_SOURCES                 =  src/vps.c
238 src_vps_LDADD                   =  $(LIBINTERNAL) $(VSERVER_LDADDS)
239 src_vps_LDFLAGS                 =  $(VSERVER_LDFLGS)
240
241 src_vserver_info_SOURCES        =  src/vserver-info.c
242 src_vserver_info_LDADD          =  $(LIBINTERNAL) $(VSERVER_LDADDS)
243 src_vserver_info_LDFLAGS        =  $(VSERVER_LDFLGS)
244
245 src_vserver_stat_SOURCES        =  src/vserver-stat.c
246 src_vserver_stat_LDADD          =  $(LIBINTERNAL) $(VSERVER_LDADDS) $(LIBENSCVECTOR)
247 src_vserver_stat_LDFLAGS        =  $(VSERVER_LDFLGS)
248
249 src_vfiles_SOURCES              =  src/vfiles.cc src/vutil.cc src/vserver.cc
250 src_vbuild_SOURCES              =  src/vbuild.cc src/vutil.cc src/vserver.cc
251 src_vcheck_SOURCES              =  src/vcheck.cc src/vutil.cc src/vserver.cc
252
253 src_lsxid_SOURCES               =  src/fstool.c src/lsxid.c
254 src_lsxid_LDADD                 =  $(LIBINTERNAL) $(VSERVER_LDADDS) $(LIBENSCVECTOR)
255 src_lsxid_LDFLAGS               =  $(VSERVER_LDFLGS) 
256
257 src_chxid_SOURCES               =  src/fstool.c src/chxid.c
258 src_chxid_LDADD                 =  $(LIBINTERNAL) $(VSERVER_LDADDS)
259 src_chxid_LDFLAGS               =  $(VSERVER_LDFLGS)
260
261 src_showattr_SOURCES            =  src/fstool.c src/showattr.c
262 src_showattr_LDADD              =  $(LIBINTERNAL) $(VSERVER_LDADDS)
263 src_showattr_LDFLAGS            =  $(VSERVER_LDFLGS)
264
265 src_setattr_SOURCES             =  src/fstool.c src/setattr.c
266 src_setattr_LDADD               =  $(LIBINTERNAL) $(VSERVER_LDADDS)
267 src_setattr_LDFLAGS             =  $(VSERVER_LDFLGS)
268
269 src_keep_ctx_alive_SOURCES =    src/keep-ctx-alive.c
270 src_keep_ctx_alive_LDADD =      $(VSERVER_LDADDS)
271 src_keep_ctx_alive_LDFLAGS =    $(VSERVER_LDFLGS)
272
273
274 src_vcopy_SOURCES =             src/vcopy.c
275 src_vcopy_LDADD =               $(LIBINTERNAL) $(VSERVER_LDADDS)
276 src_vcopy_LDFLAGS =             $(VSERVER_LDFLGS)
277
278 src_vunify_SOURCES =            src/vunify.c
279 src_vunify_LDADD =              $(LIBINTERNAL) $(VSERVER_LDADDS)
280 src_vunify_LDFLAGS =            $(VSERVER_LDFLGS)
281
282 src_vhashify_SOURCES =          src/vhashify.c
283 if ENSC_CAN_BEECRYPT_WITH_DIETLIBC
284 src_vhashify_LDADD =            $(LIBINTERNAL) $(LIBENSCVECTOR) -lbeecrypt $(VSERVER_LDADDS)
285 src_vhashify_LDFLAGS =          $(VSERVER_LDFLGS)
286 else
287 src_vhashify_LDADD =            $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) -lbeecrypt
288 src_vhashify_LDFLAGS =
289 endif
290
291 src_vuname_SOURCES =            src/vuname.c
292 src_vuname_LDADD =              $(VSERVER_LDADDS)
293 src_vuname_LDFLAGS =            $(VSERVER_LDFLGS)
294
295 src_rpm_fake_la_SOURCES         =  src/rpm-fake.c
296 src_rpm_fake_la_CFLAGS          =  $(AM_CFLAGS)
297 src_rpm_fake_la_LDFLAGS         =  -module -avoid-version -rpath $(pkglibdir)
298 src_rpm_fake_la_LIBADD          =  $(LIBVSERVER_GLIBC) -ldl
299
300 src_vdlimit_SOURCES             = src/vdlimit.c
301 src_vdlimit_LDADD               = $(VSERVER_LDADDS)
302 src_vdlimit_LDFLAGS             = $(VSERVER_LDFLGS)
303
304 EXTRA_PROGRAMS +=               $(src_sbin_CXX_PROGS) $(src_pkglib_CXX_PROGS)
305
306 TESTS_ENVIRONMENT +=            srctestsuitedir=$(top_builddir)/src/testsuite
307
308 if ENSC_HAVE_C99_COMPILER
309 src_sbin_C99_X_PROGS =          $(src_sbin_C99_PROGS)
310 src_pkglib_C99_X_PROGS =        $(src_pkglib_C99_PROGS)
311 else
312 src_sbin_C99_X_PROGS =
313 src_pkglib_C99_X_PROGS =  
314 endif
315
316 if ENSC_HAVE_CXX_COMPILER
317 src_sbin_CXX_X_PROGS =          $(src_sbin_CXX_PROGS)
318 src_pkglib_CXX_X_PROGS =        $(src_pkglib_CXX_PROGS)
319 else
320 src_sbin_CXX_X_PROGS =
321 src_pkglib_CXX_X_PROGS =  
322 endif
323
324 install-exec-hook:              src_install_exec_hook
325
326 src_install_exec_hook:
327                                 -rm -f $(DESTDIR)$(pkglibdir)/rpm-fake.a $(DESTDIR)$(pkglibdir)/rpm-fake.la
328
329 include $(top_srcdir)/src/testsuite/Makefile-files