Imported Upstream version 1.8.4p4
[debian/sudo] / src / Makefile.in
1 #
2 # Copyright (c) 2011 Todd C. Miller <Todd.Miller@courtesan.com>
3 #
4 # Permission to use, copy, modify, and distribute this software for any
5 # purpose with or without fee is hereby granted, provided that the above
6 # copyright notice and this permission notice appear in all copies.
7 #
8 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16 #
17 # @configure_input@
18 #
19
20 #### Start of system configuration section. ####
21
22 srcdir = @srcdir@
23 devdir = @devdir@
24 top_builddir = @top_builddir@
25 top_srcdir = @top_srcdir@
26 incdir = $(top_srcdir)/include
27
28 # Compiler & tools to use
29 CC = @CC@
30 LIBTOOL = @LIBTOOL@ @LT_STATIC@
31
32 # Our install program supports extra flags...
33 INSTALL = $(SHELL) $(top_srcdir)/install-sh -c
34
35 # Libraries
36 LT_LIBS = $(top_builddir)/common/libcommon.la $(LIBOBJDIR)libreplace.la
37 LIBS = @LIBS@ @SUDO_LIBS@ @GETGROUPS_LIB@ @NET_LIBS@ @LIBINTL@ $(LT_LIBS)
38
39 # C preprocessor flags
40 CPPFLAGS = -I$(incdir) -I$(top_builddir) -I$(srcdir) -I$(top_srcdir) -I. @CPPFLAGS@
41
42 # Usually -O and/or -g
43 CFLAGS = @CFLAGS@
44
45 # Flags to pass to the link stage
46 LDFLAGS = @LDFLAGS@
47 LTLDFLAGS = @LTLDFLAGS@
48
49 # Where to install things...
50 prefix = @prefix@
51 exec_prefix = @exec_prefix@
52 bindir = @bindir@
53 sbindir = @sbindir@
54 sysconfdir = @sysconfdir@
55 libexecdir = @libexecdir@
56 datarootdir = @datarootdir@
57 localedir = @localedir@
58 localstatedir = @localstatedir@
59 noexecfile = @NOEXECFILE@
60 noexecdir = @NOEXECDIR@
61
62 # User and group ids the installed files should be "owned" by
63 install_uid = 0
64 install_gid = 0
65
66 # OS dependent defines
67 DEFS = @OSDEFS@ -DLOCALEDIR=\"$(localedir)\" 
68
69 #### End of system configuration section. ####
70
71 SHELL = @SHELL@
72
73 PROGS = @PROGS@
74
75 OBJS = conversation.o error.o exec.o exec_common.o exec_pty.o get_pty.o \
76        net_ifs.o load_plugins.o parse_args.o sudo.o sudo_edit.o tgetpass.o \
77        ttyname.o ttysize.o utmp.o @SUDO_OBJS@
78
79 LIBOBJDIR = $(top_builddir)/@ac_config_libobj_dir@/
80
81 VERSION = @PACKAGE_VERSION@
82
83 all: $(PROGS)
84
85 Makefile: $(srcdir)/Makefile.in
86         (cd $(top_builddir) && ./config.status --file src/Makefile)
87
88 .SUFFIXES: .c .h .lo .o
89
90 .c.o:
91         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $<
92
93 .c.lo:
94         $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $<
95
96 sudo: $(OBJS) $(LT_LIBS)
97         $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJS) $(LDFLAGS) $(LIBS) -static-libtool-libs
98
99 libsudo_noexec.la: sudo_noexec.lo
100         $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(LTLDFLAGS) -o $@ sudo_noexec.lo -avoid-version -rpath $(noexecdir)
101
102 sesh: sesh.o error.o exec_common.o @LIBINTL@ $(LT_LIBS)
103         $(LIBTOOL) --mode=link $(CC) -o $@ sesh.o error.o exec_common.o $(LDFLAGS) @LIBINTL@ $(LIBS) -static-libtool-libs
104
105 pre-install:
106
107 install: install-binaries @INSTALL_NOEXEC@
108
109 install-dirs:
110         $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir) \
111             $(DESTDIR)$(noexecdir)
112
113 install-binaries: install-dirs $(PROGS)
114         $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -M 04111 sudo $(DESTDIR)$(bindir)/sudo
115         rm -f $(DESTDIR)$(bindir)/sudoedit
116         ln $(DESTDIR)$(bindir)/sudo $(DESTDIR)$(bindir)/sudoedit
117         if [ -f sesh ]; then $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -M 0111 sesh $(DESTDIR)$(libexecdir)/sesh; fi
118
119 install-doc:
120
121 install-includes:
122
123 # We install sudo_noexec by hand so we can avoid a "lib" prefix
124 # and a version number.  Since we use LD_PRELOAD, neither is needed.
125 install-noexec: install-dirs libsudo_noexec.la
126         if [ -f .libs/lib$(noexecfile) ]; then $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -m 0755 .libs/lib$(noexecfile) $(DESTDIR)$(noexecdir)/$(noexecfile); fi
127
128 install-plugin:
129
130 uninstall:
131         -rm -f  $(DESTDIR)$(bindir)/sudo $(DESTDIR)$(bindir)/sudoedit \
132                 $(DESTDIR)$(libexecdir)/sesh \
133                 $(DESTDIR)$(noexecdir)/$(noexecfile) \
134
135 check:
136
137 clean:
138         -$(LIBTOOL) --mode=clean rm -f $(PROGS) *.lo *.o *.la *.a stamp-* core *.core core.*
139
140 mostlyclean: clean
141
142 distclean: clean
143         -rm -rf Makefile .libs sudo_usage.h
144
145 clobber: distclean
146
147 realclean: distclean
148         rm -f TAGS tags
149
150 cleandir: realclean
151
152 # Autogenerated dependencies, do not modify
153 conversation.o: $(srcdir)/conversation.c $(top_builddir)/config.h \
154                 $(srcdir)/sudo.h $(top_builddir)/pathnames.h \
155                 $(top_srcdir)/compat/stdbool.h $(incdir)/missing.h \
156                 $(incdir)/alloc.h $(incdir)/error.h $(incdir)/fileops.h \
157                 $(incdir)/list.h $(incdir)/sudo_conf.h $(incdir)/list.h \
158                 $(incdir)/sudo_debug.h $(incdir)/gettext.h \
159                 $(incdir)/sudo_plugin.h $(srcdir)/sudo_plugin_int.h
160         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/conversation.c
161 error.o: $(srcdir)/error.c $(top_builddir)/config.h $(incdir)/missing.h \
162          $(incdir)/error.h $(incdir)/gettext.h
163         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/error.c
164 exec.o: $(srcdir)/exec.c $(top_builddir)/config.h $(srcdir)/sudo.h \
165         $(top_builddir)/pathnames.h $(top_srcdir)/compat/stdbool.h \
166         $(incdir)/missing.h $(incdir)/alloc.h $(incdir)/error.h \
167         $(incdir)/fileops.h $(incdir)/list.h $(incdir)/sudo_conf.h \
168         $(incdir)/list.h $(incdir)/sudo_debug.h $(incdir)/gettext.h \
169         $(srcdir)/sudo_exec.h $(incdir)/sudo_plugin.h \
170         $(srcdir)/sudo_plugin_int.h
171         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/exec.c
172 exec_common.o: $(srcdir)/exec_common.c $(top_builddir)/config.h \
173                $(srcdir)/sudo.h $(top_builddir)/pathnames.h \
174                $(top_srcdir)/compat/stdbool.h $(incdir)/missing.h \
175                $(incdir)/alloc.h $(incdir)/error.h $(incdir)/fileops.h \
176                $(incdir)/list.h $(incdir)/sudo_conf.h $(incdir)/list.h \
177                $(incdir)/sudo_debug.h $(incdir)/gettext.h $(srcdir)/sudo_exec.h
178         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/exec_common.c
179 exec_pty.o: $(srcdir)/exec_pty.c $(top_builddir)/config.h $(srcdir)/sudo.h \
180             $(top_builddir)/pathnames.h $(top_srcdir)/compat/stdbool.h \
181             $(incdir)/missing.h $(incdir)/alloc.h $(incdir)/error.h \
182             $(incdir)/fileops.h $(incdir)/list.h $(incdir)/sudo_conf.h \
183             $(incdir)/list.h $(incdir)/sudo_debug.h $(incdir)/gettext.h \
184             $(srcdir)/sudo_exec.h $(incdir)/sudo_plugin.h \
185             $(srcdir)/sudo_plugin_int.h
186         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/exec_pty.c
187 get_pty.o: $(srcdir)/get_pty.c $(top_builddir)/config.h $(srcdir)/sudo.h \
188            $(top_builddir)/pathnames.h $(top_srcdir)/compat/stdbool.h \
189            $(incdir)/missing.h $(incdir)/alloc.h $(incdir)/error.h \
190            $(incdir)/fileops.h $(incdir)/list.h $(incdir)/sudo_conf.h \
191            $(incdir)/list.h $(incdir)/sudo_debug.h $(incdir)/gettext.h
192         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/get_pty.c
193 load_plugins.o: $(srcdir)/load_plugins.c $(top_builddir)/config.h \
194                 $(top_srcdir)/compat/dlfcn.h $(srcdir)/sudo.h \
195                 $(top_builddir)/pathnames.h $(top_srcdir)/compat/stdbool.h \
196                 $(incdir)/missing.h $(incdir)/alloc.h $(incdir)/error.h \
197                 $(incdir)/fileops.h $(incdir)/list.h $(incdir)/sudo_conf.h \
198                 $(incdir)/list.h $(incdir)/sudo_debug.h $(incdir)/gettext.h \
199                 $(incdir)/sudo_plugin.h $(srcdir)/sudo_plugin_int.h \
200                 $(incdir)/sudo_conf.h $(incdir)/list.h $(incdir)/sudo_debug.h
201         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/load_plugins.c
202 net_ifs.o: $(srcdir)/net_ifs.c $(top_builddir)/config.h $(incdir)/missing.h \
203            $(incdir)/alloc.h $(incdir)/error.h $(incdir)/sudo_debug.h \
204            $(incdir)/gettext.h
205         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/net_ifs.c
206 parse_args.o: $(srcdir)/parse_args.c $(top_builddir)/config.h ./sudo_usage.h \
207               $(srcdir)/sudo.h $(top_builddir)/pathnames.h \
208               $(top_srcdir)/compat/stdbool.h $(incdir)/missing.h \
209               $(incdir)/alloc.h $(incdir)/error.h $(incdir)/fileops.h \
210               $(incdir)/list.h $(incdir)/sudo_conf.h $(incdir)/list.h \
211               $(incdir)/sudo_debug.h $(incdir)/gettext.h $(incdir)/lbuf.h
212         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/parse_args.c
213 preload.o: $(srcdir)/preload.c $(top_builddir)/config.h $(incdir)/sudo_plugin.h
214         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/preload.c
215 selinux.o: $(srcdir)/selinux.c $(top_builddir)/config.h $(srcdir)/sudo.h \
216            $(top_builddir)/pathnames.h $(top_srcdir)/compat/stdbool.h \
217            $(incdir)/missing.h $(incdir)/alloc.h $(incdir)/error.h \
218            $(incdir)/fileops.h $(incdir)/list.h $(incdir)/sudo_conf.h \
219            $(incdir)/list.h $(incdir)/sudo_debug.h $(incdir)/gettext.h
220         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/selinux.c
221 sesh.o: $(srcdir)/sesh.c $(top_builddir)/config.h \
222         $(top_srcdir)/compat/stdbool.h $(incdir)/missing.h $(incdir)/gettext.h \
223         $(incdir)/error.h $(incdir)/sudo_conf.h $(incdir)/list.h \
224         $(incdir)/sudo_debug.h $(srcdir)/sudo_exec.h $(incdir)/sudo_plugin.h
225         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/sesh.c
226 sudo.o: $(srcdir)/sudo.c $(top_builddir)/config.h $(srcdir)/sudo.h \
227         $(top_builddir)/pathnames.h $(top_srcdir)/compat/stdbool.h \
228         $(incdir)/missing.h $(incdir)/alloc.h $(incdir)/error.h \
229         $(incdir)/fileops.h $(incdir)/list.h $(incdir)/sudo_conf.h \
230         $(incdir)/list.h $(incdir)/sudo_debug.h $(incdir)/gettext.h \
231         $(incdir)/sudo_plugin.h $(srcdir)/sudo_plugin_int.h ./sudo_usage.h
232         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/sudo.c
233 sudo_edit.o: $(srcdir)/sudo_edit.c $(top_builddir)/config.h $(srcdir)/sudo.h \
234              $(top_builddir)/pathnames.h $(top_srcdir)/compat/stdbool.h \
235              $(incdir)/missing.h $(incdir)/alloc.h $(incdir)/error.h \
236              $(incdir)/fileops.h $(incdir)/list.h $(incdir)/sudo_conf.h \
237              $(incdir)/list.h $(incdir)/sudo_debug.h $(incdir)/gettext.h
238         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/sudo_edit.c
239 sudo_noexec.lo: $(srcdir)/sudo_noexec.c $(top_builddir)/config.h \
240                 $(incdir)/missing.h
241         $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/sudo_noexec.c
242 tgetpass.o: $(srcdir)/tgetpass.c $(top_builddir)/config.h $(srcdir)/sudo.h \
243             $(top_builddir)/pathnames.h $(top_srcdir)/compat/stdbool.h \
244             $(incdir)/missing.h $(incdir)/alloc.h $(incdir)/error.h \
245             $(incdir)/fileops.h $(incdir)/list.h $(incdir)/sudo_conf.h \
246             $(incdir)/list.h $(incdir)/sudo_debug.h $(incdir)/gettext.h
247         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/tgetpass.c
248 ttyname.o: $(srcdir)/ttyname.c $(top_builddir)/config.h $(srcdir)/sudo.h \
249            $(top_builddir)/pathnames.h $(top_srcdir)/compat/stdbool.h \
250            $(incdir)/missing.h $(incdir)/alloc.h $(incdir)/error.h \
251            $(incdir)/fileops.h $(incdir)/list.h $(incdir)/sudo_conf.h \
252            $(incdir)/list.h $(incdir)/sudo_debug.h $(incdir)/gettext.h
253         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/ttyname.c
254 ttysize.o: $(srcdir)/ttysize.c $(top_builddir)/config.h $(incdir)/missing.h \
255            $(incdir)/sudo_debug.h
256         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/ttysize.c
257 utmp.o: $(srcdir)/utmp.c $(top_builddir)/config.h $(srcdir)/sudo.h \
258         $(top_builddir)/pathnames.h $(top_srcdir)/compat/stdbool.h \
259         $(incdir)/missing.h $(incdir)/alloc.h $(incdir)/error.h \
260         $(incdir)/fileops.h $(incdir)/list.h $(incdir)/sudo_conf.h \
261         $(incdir)/list.h $(incdir)/sudo_debug.h $(incdir)/gettext.h \
262         $(srcdir)/sudo_exec.h
263         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/utmp.c