patches from Simon Ruderich that broaden use of hardening build flags
[debian/sudo] / compat / 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@
31
32 # C preprocessor flags
33 CPPFLAGS = -I$(incdir) -I$(top_builddir) -I$(top_srcdir) @CPPFLAGS@
34
35 # Usually -O and/or -g
36 CFLAGS = @CFLAGS@
37
38 # Linker flags
39 LDFLAGS = @LDFLAGS@
40
41 # OS dependent defines
42 DEFS = @OSDEFS@
43
44 #### End of system configuration section. ####
45
46 SHELL = @SHELL@
47
48 TEST_PROGS = fnm_test globtest
49
50 LIBOBJDIR = 
51
52 LTLIBOBJS = @LTLIBOBJS@
53
54 all: libreplace.la
55
56 Makefile: $(srcdir)/Makefile.in
57         (cd $(top_builddir) && ./config.status --file compat/Makefile)
58
59 .SUFFIXES: .o .c .h .lo
60
61 .c.o:
62         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $<
63
64 .c.lo:
65         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $<
66
67 libreplace.la: $(LTLIBOBJS)
68         $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LTLIBOBJS) -no-install
69
70 siglist.c: mksiglist
71         ./mksiglist > $@
72
73 mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/missing.h $(top_builddir)/config.h
74         $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
75
76 fnm_test: fnm_test.o libreplace.la
77         $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ fnm_test.o libreplace.la
78
79 globtest: globtest.o libreplace.la
80         $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ globtest.o libreplace.la
81
82 @DEV@$(srcdir)/mksiglist.h: $(srcdir)/siglist.in
83 @DEV@   awk 'BEGIN {print "/* public domain */\n"} /^    [A-Z]/ {printf("#ifdef SIG%s\n    if (my_sys_siglist[SIG%s] == NULL)\n\tmy_sys_siglist[SIG%s] = \"%s\";\n#endif\n", $$1, $$1, $$1, substr($$0, 13))}' < $(srcdir)/siglist.in > $@
84
85 pre-install:
86
87 install:
88
89 install-dirs:
90
91 install-binaries:
92
93 install-includes:
94
95 install-doc:
96
97 install-plugin:
98
99 uninstall:
100
101 check: $(TEST_PROGS)
102         @./fnm_test $(srcdir)/regress/fnmatch/fnm_test.in
103         @mkdir -p `sed 's@/[^/]*$$@@' $(srcdir)/regress/glob/files | sort -u`
104         @touch `cat $(srcdir)/regress/glob/files`
105         @chmod 0755 `grep '/r[^/]*$$' $(srcdir)/regress/glob/files`
106         @chmod 0444 `grep '/s[^/]*$$' $(srcdir)/regress/glob/files`
107         @chmod 0711 `grep '/t[^/]*$$' $(srcdir)/regress/glob/files`
108         @./globtest $(srcdir)/regress/glob/globtest.in
109         @rm -rf fake
110
111 clean:
112         -$(LIBTOOL) --mode=clean rm -f $(TEST_PROGS) mksiglist siglist.c *.lo *.o *.la *.a stamp-* core *.core core.*
113
114 mostlyclean: clean
115
116 distclean: clean
117         -rm -rf Makefile .libs
118
119 clobber: distclean
120
121 realclean: distclean
122         rm -f TAGS tags
123
124 cleandir: realclean
125
126 # Autogenerated dependencies, do not modify
127 closefrom.lo: $(srcdir)/closefrom.c $(top_builddir)/config.h $(incdir)/missing.h
128         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/closefrom.c
129 dlopen.lo: $(srcdir)/dlopen.c $(top_builddir)/config.h \
130            $(top_srcdir)/compat/dlfcn.h $(incdir)/missing.h
131         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/dlopen.c
132 fnm_test.o: $(srcdir)/regress/fnmatch/fnm_test.c $(top_builddir)/config.h \
133             $(top_srcdir)/compat/fnmatch.h
134         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/regress/fnmatch/fnm_test.c
135 fnmatch.lo: $(srcdir)/fnmatch.c $(top_builddir)/config.h $(incdir)/missing.h \
136             $(top_srcdir)/compat/charclass.h $(top_srcdir)/compat/fnmatch.h
137         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/fnmatch.c
138 getcwd.lo: $(srcdir)/getcwd.c $(top_builddir)/config.h $(incdir)/missing.h
139         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/getcwd.c
140 getgrouplist.lo: $(srcdir)/getgrouplist.c $(top_builddir)/config.h \
141                  $(incdir)/missing.h
142         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/getgrouplist.c
143 getline.lo: $(srcdir)/getline.c $(top_builddir)/config.h $(incdir)/missing.h
144         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/getline.c
145 getprogname.lo: $(srcdir)/getprogname.c $(top_builddir)/config.h \
146                 $(incdir)/missing.h
147         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/getprogname.c
148 glob.lo: $(srcdir)/glob.c $(top_builddir)/config.h $(incdir)/missing.h \
149          $(top_srcdir)/compat/glob.h $(top_srcdir)/compat/charclass.h
150         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/glob.c
151 globtest.o: $(srcdir)/regress/glob/globtest.c $(top_builddir)/config.h \
152             $(top_srcdir)/compat/glob.h $(incdir)/missing.h
153         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/regress/glob/globtest.c
154 isblank.lo: $(srcdir)/isblank.c $(top_builddir)/config.h $(incdir)/missing.h
155         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/isblank.c
156 memrchr.lo: $(srcdir)/memrchr.c $(top_builddir)/config.h $(incdir)/missing.h
157         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/memrchr.c
158 mksiglist.lo: $(srcdir)/mksiglist.c $(top_builddir)/config.h \
159               $(incdir)/missing.h $(top_srcdir)/compat/mksiglist.h
160         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksiglist.c
161 mktemp.lo: $(srcdir)/mktemp.c $(top_builddir)/config.h $(incdir)/missing.h
162         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mktemp.c
163 nanosleep.lo: $(srcdir)/nanosleep.c $(top_builddir)/config.h \
164               $(top_srcdir)/compat/timespec.h $(incdir)/missing.h
165         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/nanosleep.c
166 setenv.lo: $(srcdir)/setenv.c $(top_builddir)/config.h $(incdir)/missing.h
167         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/setenv.c
168 siglist.lo: siglist.c $(top_builddir)/config.h $(incdir)/missing.h
169         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) siglist.c
170 snprintf.lo: $(srcdir)/snprintf.c $(top_builddir)/config.h $(incdir)/missing.h
171         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/snprintf.c
172 strlcat.lo: $(srcdir)/strlcat.c $(top_builddir)/config.h $(incdir)/missing.h
173         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/strlcat.c
174 strlcpy.lo: $(srcdir)/strlcpy.c $(top_builddir)/config.h $(incdir)/missing.h
175         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/strlcpy.c
176 strsignal.lo: $(srcdir)/strsignal.c $(top_builddir)/config.h \
177               $(incdir)/missing.h $(incdir)/gettext.h
178         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/strsignal.c
179 unsetenv.lo: $(srcdir)/unsetenv.c $(top_builddir)/config.h $(incdir)/missing.h
180         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/unsetenv.c
181 utimes.lo: $(srcdir)/utimes.c $(top_builddir)/config.h \
182            $(top_srcdir)/compat/utime.h $(incdir)/missing.h
183         $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/utimes.c