2 # Copyright (c) 2011 Todd C. Miller <Todd.Miller@courtesan.com>
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.
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.
20 #### Start of system configuration section. ####
24 top_builddir = @top_builddir@
25 top_srcdir = @top_srcdir@
26 incdir = $(top_srcdir)/include
28 # Where to install things...
30 exec_prefix = @exec_prefix@
33 sysconfdir = @sysconfdir@
34 libexecdir = @libexecdir@
35 datarootdir = @datarootdir@
36 localstatedir = @localstatedir@
38 # Compiler & tools to use
42 # C preprocessor flags
43 CPPFLAGS = -I$(incdir) -I$(top_builddir) -I$(top_srcdir) @CPPFLAGS@
45 # Usually -O and/or -g
48 # OS dependent defines
49 DEFS = @OSDEFS@ -D_PATH_SUDO_CONF=\"$(sysconfdir)/sudo.conf\"
51 #### End of system configuration section. ####
55 LTOBJS = alloc.lo atobool.lo fileops.lo fmt_string.lo lbuf.lo list.lo \
56 secure_path.lo setgroups.lo sudo_conf.lo sudo_debug.lo term.lo \
57 ttysize.lo zero_bytes.lo @COMMON_OBJS@
61 Makefile: $(srcdir)/Makefile.in
62 (cd $(top_builddir) && ./config.status --file common/Makefile)
67 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $<
69 libcommon.la: $(LTOBJS)
70 $(LIBTOOL) --mode=link $(CC) -o $@ $(LTOBJS) -no-install
91 -$(LIBTOOL) --mode=clean rm -f *.lo *.o *.la *.a stamp-* core *.core core.*
96 -rm -rf Makefile .libs
105 # Autogenerated dependencies, do not modify
106 aix.lo: $(srcdir)/aix.c $(top_builddir)/config.h $(incdir)/missing.h \
107 $(incdir)/alloc.h $(incdir)/error.h $(incdir)/sudo_debug.h \
109 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/aix.c
110 alloc.lo: $(srcdir)/alloc.c $(top_builddir)/config.h $(incdir)/missing.h \
111 $(incdir)/alloc.h $(incdir)/error.h $(incdir)/gettext.h
112 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/alloc.c
113 atobool.lo: $(srcdir)/atobool.c $(top_builddir)/config.h $(incdir)/missing.h \
114 $(incdir)/sudo_debug.h
115 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/atobool.c
116 fileops.lo: $(srcdir)/fileops.c $(top_builddir)/config.h \
117 $(top_srcdir)/compat/stdbool.h $(top_srcdir)/compat/timespec.h \
118 $(incdir)/missing.h $(incdir)/fileops.h $(incdir)/sudo_debug.h
119 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/fileops.c
120 fmt_string.lo: $(srcdir)/fmt_string.c $(top_builddir)/config.h \
121 $(incdir)/missing.h $(incdir)/sudo_debug.h
122 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/fmt_string.c
123 lbuf.lo: $(srcdir)/lbuf.c $(top_builddir)/config.h $(incdir)/missing.h \
124 $(incdir)/alloc.h $(incdir)/error.h $(incdir)/lbuf.h \
125 $(incdir)/sudo_debug.h
126 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/lbuf.c
127 list.lo: $(srcdir)/list.c $(top_builddir)/config.h $(incdir)/missing.h \
128 $(incdir)/list.h $(incdir)/error.h
129 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/list.c
130 secure_path.lo: $(srcdir)/secure_path.c $(top_builddir)/config.h \
131 $(incdir)/missing.h $(incdir)/sudo_debug.h \
132 $(incdir)/secure_path.h
133 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/secure_path.c
134 setgroups.lo: $(srcdir)/setgroups.c $(top_builddir)/config.h \
135 $(incdir)/missing.h $(incdir)/sudo_debug.h
136 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/setgroups.c
137 sudo_conf.lo: $(srcdir)/sudo_conf.c $(top_builddir)/config.h \
138 $(top_srcdir)/compat/stdbool.h $(incdir)/missing.h \
139 $(incdir)/alloc.h $(incdir)/error.h $(incdir)/fileops.h \
140 $(top_builddir)/pathnames.h $(incdir)/sudo_plugin.h \
141 $(incdir)/sudo_conf.h $(incdir)/list.h $(incdir)/sudo_debug.h \
142 $(incdir)/secure_path.h $(incdir)/gettext.h
143 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/sudo_conf.c
144 sudo_debug.lo: $(srcdir)/sudo_debug.c $(top_builddir)/config.h \
145 $(top_srcdir)/compat/stdbool.h $(incdir)/missing.h \
146 $(incdir)/alloc.h $(incdir)/error.h $(incdir)/gettext.h \
147 $(incdir)/sudo_plugin.h $(incdir)/sudo_debug.h
148 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/sudo_debug.c
149 term.lo: $(srcdir)/term.c $(top_builddir)/config.h $(incdir)/missing.h \
150 $(incdir)/sudo_debug.h
151 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/term.c
152 ttysize.lo: $(srcdir)/ttysize.c $(top_builddir)/config.h $(incdir)/missing.h \
153 $(incdir)/sudo_debug.h
154 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/ttysize.c
155 zero_bytes.lo: $(srcdir)/zero_bytes.c $(top_builddir)/config.h \
157 $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/zero_bytes.c