Use the host's /etc/resolv.conf by default.
[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/vunify \
64                         src/vuname \
65                         src/rpm-fake-resolver \
66                         src/vcontext \
67                         src/vcopy \
68                         src/vkill \
69                         src/vsched \
70                         src/vshelper-sync \
71                         src/vrsetup \
72                         src/vserver-stat \
73                         src/vserver-info \
74                         src/vdlimit \
75                         src/vdu \
76                         src/vwait \
77                         src/ncontext \
78                         src/nattribute \
79                         src/naddress \
80                         src/vdevmap \
81                         src/vsysctl \
82                         src/vclone \
83                         src/h2ext \
84                         src/vtag \
85                         src/vspace \
86                         src/vmemctrl \
87                         src/tunctl \
88                         src/exec-remount
89
90 if ENSC_CAN_CRYPTO_WITH_DIETLIBC
91 DIETPROGS +=            src/vhashify
92 endif
93
94 noinst_HEADERS +=       src/capability-compat.h \
95                         src/util.h \
96                         src/fstool.h \
97                         src/compat-pivot_root.h \
98                         src/stack-start.h \
99                         src/vcopy-init.hc \
100                         src/vunify.h \
101                         src/vunify-init.hc \
102                         src/vhashify.h \
103                         src/vhashify-init.hc \
104                         src/vserver-visitdir.hc \
105                         src/context-sync.hc \
106                         src/attribute-util.h
107
108 pkglib_PROGRAMS +=      src/capchroot \
109                         src/chain-echo \
110                         src/chcontext-compat \
111                         src/check-unixfile \
112                         src/chroot-sh \
113                         src/fakerunlevel \
114                         src/filetime \
115                         src/keep-ctx-alive \
116                         src/lockfile \
117                         src/readlink \
118                         src/save_ctxinfo \
119                         src/secure-mount \
120                         src/mask2prefix \
121                         src/exec-ulimit \
122                         src/rpm-fake-resolver \
123                         src/vshelper-sync \
124                         src/sigexec \
125                         src/chbind-compat \
126                         src/vsysctl \
127                         src/h2ext \
128                         src/tunctl \
129                         src/exec-remount \
130                         $(src_pkglib_C99_X_PROGS) \
131                         $(src_pkglib_CXX_X_PROGS)
132
133 if ENSC_HAVE_C99_COMPILER
134 if ENSC_HAVE_CRYPTO
135 pkglib_PROGRAMS +=      src/vhashify
136 endif ENSC_HAVE_CRYPTO
137 endif ENSC_HAVE_C99_COMPILER
138
139 legacy_PROGRAMS +=      src/ifspec \
140                         src/listdevip \
141                         src/parserpmdump \
142                         src/rebootmgr \
143                         src/showperm \
144                         src/vreboot
145
146 pkglib_LTLIBRARIES +=   src/rpm-fake.la
147
148 sbin_PROGRAMS +=        src/exec-cd \
149                         src/lsxid \
150                         src/chxid \
151                         src/vps \
152                         src/showattr \
153                         src/setattr \
154                         src/reducecap \
155                         src/vdu \
156                         src/vattribute \
157                         src/vcontext \
158                         src/vlimit \
159                         src/vkill \
160                         src/vrsetup \
161                         src/vsched \
162                         src/vserver-stat \
163                         src/vserver-info \
164                         src/vuname \
165                         src/vwait \
166                         src/ncontext \
167                         src/nattribute \
168                         src/naddress \
169                         src/vdevmap \
170                         src/vtag \
171                         src/vspace \
172                         src/vmemctrl \
173                         $(src_sbin_CXX_X_PROGS)
174
175 if ENSC_HAVE_C99_COMPILER
176 sbin_PROGRAMS +=        src/vdlimit
177 endif
178
179
180 src_capchroot_SOURCES =         src/capchroot.c
181 src_capchroot_LDADD =           $(VSERVER_LDADDS)
182 src_capchroot_LDFLAGS =         $(VSERVER_LDFLGS)
183
184 src_chbind_compat_SOURCES =     src/chbind.c
185 src_chbind_compat_LDADD =       $(VSERVER_LDADDS)
186 src_chbind_compat_LDFLAGS =     $(VSERVER_LDFLGS)
187
188 src_chcontext_compat_SOURCES =  src/chcontext.c
189 src_chcontext_compat_LDADD =    $(VSERVER_LDADDS) $(LIBINTERNAL)
190 src_chcontext_compat_LDFLAGS =  $(VSERVER_LDFLGS)
191
192 src_vcontext_SOURCES            =  src/vcontext.c src/vlogin.c
193 src_vcontext_LDADD              =  $(VSERVER_LDADDS) $(LIBINTERNAL)
194 src_vcontext_LDFLAGS            =  $(VSERVER_LDFLGS)
195
196 src_vsched_SOURCES              =  src/vsched.c
197 src_vsched_LDADD                =  $(VSERVER_LDADDS) $(LIBINTERNAL)
198 src_vsched_LDFLAGS              =  $(VSERVER_LDFLGS)
199
200 src_filetime_SOURCES            =  src/filetime.c
201 src_filetime_LDADD              =  $(VSERVER_LDADDS)
202 src_filetime_LDFLAGS            =  $(VSERVER_LDFLGS)
203
204 src_chain_echo_SOURCES          =  src/chain-echo.c
205 src_chroot_sh_SOURCES           =  src/chroot-sh.c
206 src_chroot_sh_LDADD             =  $(LIBINTERNAL)
207 src_exec_cd_SOURCES             =  src/exec-cd.c
208 src_fakerunlevel_SOURCES        =  src/fakerunlevel.c
209 src_ifspec_SOURCES              =  src/ifspec.c
210 src_listdevip_SOURCES           =  src/listdevip.c
211 src_lockfile_SOURCES            =  src/lockfile.c
212 src_parserpmdump_SOURCES        =  src/parserpmdump.c
213 src_readlink_SOURCES            =  src/readlink.c
214 src_rebootmgr_SOURCES           =  src/rebootmgr.c
215 src_exec_ulimit_SOURCES         =  src/exec-ulimit.c
216 src_vshelper_sync_SOURCES       =  src/vshelper-sync.c
217
218 src_reducecap_SOURCES           =  src/reducecap.c
219 src_reducecap_LDADD             =  $(VSERVER_LDADDS)
220 src_reducecap_LDFLAGS           =  $(VSERVER_LDFLGS)
221
222 src_vkill_SOURCES               =  src/vkill.c
223 src_vkill_LDADD                 =  $(VSERVER_LDADDS)
224 src_vkill_LDFLAGS               =  $(VSERVER_LDFLGS) $(LIBINTERNAL)
225 src_vkill_CPPFLAGS              =  $(AM_CPPFLAGS) -DLEGACYDIR=\"$(legacydir)\"
226
227 src_vlimit_SOURCES              =  src/vlimit.c
228 src_vlimit_LDADD                =  $(VSERVER_LDADDS)
229 src_vlimit_LDFLAGS              =  $(VSERVER_LDFLGS)
230
231 src_save_ctxinfo_SOURCES        =  src/save_ctxinfo.c
232 src_save_ctxinfo_LDADD          =  $(VSERVER_LDADDS)
233 src_save_ctxinfo_LDFLAGS        =  $(VSERVER_LDFLGS)
234
235 src_vdu_SOURCES                 =  src/vdu.c
236 src_vdu_LDADD                   =  $(VSERVER_LDADDS) $(LIBINTERNAL)
237 src_vdu_LDFLAGS                 =  $(VSERVER_LDFLGS)
238
239 src_vreboot_SOURCES =           src/vreboot.c
240
241 src_secure_mount_SOURCES =      src/secure-mount.c
242 src_secure_mount_LDADD =        $(VSERVER_LDADDS)
243 src_secure_mount_LDFLAGS =      $(VSERVER_LDFLGS)
244
245 src_vattribute_SOURCES =        src/vattribute.c
246 src_vattribute_LDADD =          $(VSERVER_LDADDS)
247 src_vattribute_LDFLAGS =        $(VSERVER_LDFLGS)
248
249 src_rpm_fake_resolver_SOURCES   =  src/rpm-fake-resolver.c
250 src_rpm_fake_resolver_LDADD     =  $(VSERVER_LDADDS)
251 src_rpm_fake_resolver_LDFLAGS   =  $(VSERVER_LDFLGS)
252
253 src_mask2prefix_SOURCES         =  src/mask2prefix.c
254
255 src_vps_SOURCES                 =  src/vps.c
256 src_vps_LDADD                   =  $(LIBINTERNAL) $(VSERVER_LDADDS)
257 src_vps_LDFLAGS                 =  $(VSERVER_LDFLGS)
258
259 src_vserver_info_SOURCES        =  src/vserver-info.c
260 src_vserver_info_LDADD          =  $(LIBINTERNAL) $(VSERVER_LDADDS)
261 src_vserver_info_LDFLAGS        =  $(VSERVER_LDFLGS)
262
263 src_vserver_stat_SOURCES        =  src/vserver-stat.c
264 src_vserver_stat_LDADD          =  $(LIBINTERNAL) $(VSERVER_LDADDS) $(LIBENSCVECTOR)
265 src_vserver_stat_LDFLAGS        =  $(VSERVER_LDFLGS)
266
267 src_lsxid_SOURCES               =  src/fstool.c src/lsxid.c
268 src_lsxid_LDADD                 =  $(LIBINTERNAL) $(VSERVER_LDADDS) $(LIBENSCVECTOR)
269 src_lsxid_LDFLAGS               =  $(VSERVER_LDFLGS) 
270
271 src_chxid_SOURCES               =  src/fstool.c src/chxid.c
272 src_chxid_LDADD                 =  $(LIBINTERNAL) $(VSERVER_LDADDS)
273 src_chxid_LDFLAGS               =  $(VSERVER_LDFLGS)
274
275 src_showattr_SOURCES            =  src/fstool.c src/showattr.c
276 src_showattr_LDADD              =  $(LIBINTERNAL) $(VSERVER_LDADDS)
277 src_showattr_LDFLAGS            =  $(VSERVER_LDFLGS)
278
279 src_setattr_SOURCES             =  src/fstool.c src/setattr.c
280 src_setattr_LDADD               =  $(LIBINTERNAL) $(VSERVER_LDADDS)
281 src_setattr_LDFLAGS             =  $(VSERVER_LDFLGS)
282
283 src_keep_ctx_alive_SOURCES =    src/keep-ctx-alive.c
284 src_keep_ctx_alive_LDADD =      $(VSERVER_LDADDS)
285 src_keep_ctx_alive_LDFLAGS =    $(VSERVER_LDFLGS)
286
287
288 src_vcopy_SOURCES =             src/vcopy.c
289 src_vcopy_LDADD =               $(LIBINTERNAL) $(VSERVER_LDADDS)
290 src_vcopy_LDFLAGS =             $(VSERVER_LDFLGS)
291
292 src_vunify_SOURCES =            src/vunify.c
293 src_vunify_LDADD =              $(LIBINTERNAL) $(VSERVER_LDADDS)
294 src_vunify_LDFLAGS =            $(VSERVER_LDFLGS)
295
296 src_vhashify_SOURCES =          src/vhashify.c
297 src_vhashify_CFLAGS =           $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
298 if ENSC_CAN_CRYPTO_WITH_DIETLIBC
299 src_vhashify_LDADD =            $(LIBINTERNAL) $(LIBENSCVECTOR) $(ENSC_CRYPTO_LIB) $(VSERVER_LDADDS)
300 src_vhashify_LDFLAGS =          $(VSERVER_LDFLGS)
301 else
302 src_vhashify_LDADD =            $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) $(ENSC_CRYPTO_LIB)
303 src_vhashify_LDFLAGS =           -Wl,--as-needed
304 endif
305
306 src_vuname_SOURCES =            src/vuname.c
307 src_vuname_LDADD =              $(VSERVER_LDADDS)
308 src_vuname_LDFLAGS =            $(VSERVER_LDFLGS)
309
310 src_rpm_fake_la_SOURCES         =  src/rpm-fake.c
311 src_rpm_fake_la_CFLAGS          =  $(AM_CFLAGS)
312 src_rpm_fake_la_LDFLAGS         =  -module -avoid-version -rpath $(pkglibdir)
313 src_rpm_fake_la_LIBADD          =  $(LIBVSERVER_GLIBC) -ldl
314
315 src_vdlimit_SOURCES             = src/vdlimit.c
316 src_vdlimit_LDADD               = $(VSERVER_LDADDS)
317 src_vdlimit_LDFLAGS             = $(VSERVER_LDFLGS)
318
319 src_vwait_SOURCES               = src/vwait.c
320 src_vwait_LDADD                 = $(VSERVER_LDADDS)
321 src_vwait_LDFLAGS               = $(VSERVER_LDFLGS)
322
323 src_ncontext_SOURCES            = src/ncontext.c
324 src_ncontext_LDADD              = $(VSERVER_LDADDS) $(LIBINTERNAL)
325 src_ncontext_LDFLAGS            = $(VSERVER_LDFLGS)
326
327 src_nattribute_SOURCES          = src/nattribute.c
328 src_nattribute_LDADD            = $(VSERVER_LDADDS)
329 src_nattribute_LDFLAGS          = $(VSERVER_LDFLGS)
330
331 src_naddress_SOURCES            = src/naddress.c
332 src_naddress_LDADD              = $(VSERVER_LDADDS) $(LIBINTERNAL)
333 src_naddress_LDFLAGS            = $(VSERVER_LDFLGS)
334
335 src_vdevmap_SOURCES             = src/vdevmap.c
336 src_vdevmap_LDADD               = $(VSERVER_LDADDS) $(LIBINTERNAL)
337 src_vdevmap_LDFLAGS             = $(VSERVER_LDFLGS)
338
339 src_vsysctl_SOURCES             = src/vsysctl.c
340 src_vsysctl_LDADD               = $(VSERVER_LDADDS)
341 src_vsysctl_LDFLAGS             = $(VSERVER_LDFLGS)
342
343 src_vclone_SOURCES              = src/vclone.c
344 src_vclone_LDADD                = $(LIBINTERNAL) $(VSERVER_LDADDS)
345 src_vclone_LDFLAGS              = $(VSERVER_LDLFGS)
346
347 src_h2ext_SOURCES               = src/h2ext.c
348 src_h2ext_LDADD                 = $(LIBINTERNAL) $(VSERVER_LDADDS)
349 src_h2ext_LDFLAGS               = $(VSERVER_LDFLGS)
350
351 src_vtag_SOURCES                = src/vtag.c
352 src_vtag_LDADD                  = $(VSERVER_LDADDS)
353 src_vtag_LDFLAGS                = $(VSERVER_LDADDS)
354
355 src_vspace_SOURCES              = src/vspace.c
356 src_vspace_LDADD                = $(VSERVER_LDADDS) $(LIBINTERNAL)
357 src_vspace_LDFLAGS              = $(VSERVER_LDFLGS)
358
359 src_vmemctrl_SOURCES            = src/vmemctrl.c
360 src_vmemctrl_LDADD              = $(VSERVER_LDADDS) $(LIBINTERNAL)
361 src_vmemctrl_LDFLAGS            = $(VSERVER_LDFLGS)
362
363 src_tunctl_SOURCES              = src/tunctl.c
364 src_tunctl_LDADD                = $(VSERVER_LDADDS) $(LIBINTERNAL)
365 src_tunctl_LDFLAGS              = $(VSERVER_LDFLGS)
366
367 src_exec_remount_SOURCES        = src/exec-remount.c
368 src_exec_remount_LDADD          = $(VSERVER_LDADDS)
369 src_exec_remount_LDFLAGS        = $(VSERVER_LDFLGS)
370
371 EXTRA_PROGRAMS +=               $(src_sbin_CXX_PROGS) $(src_pkglib_CXX_PROGS)
372
373 TESTS_ENVIRONMENT +=            srctestsuitedir=$(top_builddir)/src/testsuite
374
375 if ENSC_HAVE_C99_COMPILER
376 src_sbin_C99_X_PROGS =          $(src_sbin_C99_PROGS)
377 src_pkglib_C99_X_PROGS =        $(src_pkglib_C99_PROGS)
378 else
379 src_sbin_C99_X_PROGS =
380 src_pkglib_C99_X_PROGS =  
381 endif
382
383 if ENSC_HAVE_CXX_COMPILER
384 src_sbin_CXX_X_PROGS =          $(src_sbin_CXX_PROGS)
385 src_pkglib_CXX_X_PROGS =        $(src_pkglib_CXX_PROGS)
386 else
387 src_sbin_CXX_X_PROGS =
388 src_pkglib_CXX_X_PROGS =  
389 endif
390
391 install-exec-hook:              src_install_exec_hook
392
393 src_install_exec_hook:
394                                 -rm -f $(DESTDIR)$(pkglibdir)/rpm-fake.a $(DESTDIR)$(pkglibdir)/rpm-fake.la
395
396 include $(top_srcdir)/src/testsuite/Makefile-files