summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorRuss Allbery <eagle@windlord>2008-03-08 18:40:13 -0800
committerRuss Allbery <eagle@windlord>2008-03-08 18:40:13 -0800
commit3e7dd070778af7e384b545238e2b904c63463d9d (patch)
tree9aed6f117e4f18296ec49ea0f46eba0af90da14d /Makefile.in
parent33021d582461f7d32b54b5eafec5847c8f4431c6 (diff)
Add a warnings target and the necessary code cleanup to pass it.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
index f314f30..ad436a0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -50,6 +50,16 @@ install: pam_afs_session.so $(srcdir)/pam_afs_session.5
$(INSTALL_DATA) $(srcdir)/pam_afs_session.5 \
$(DESTDIR)$(mandir)/man5/pam_afs_session.5
+# A set of flags for warnings. Add -O because gcc won't find some warnings
+# without optimization turned on, and add -DDEBUG=1 so we'll also compile all
+# debugging code and test it.
+WARNINGS = -g -O -fPIC -DDEBUG=1 -Wall -W -Wendif-labels -Wpointer-arith \
+ -Wbad-function-cast -Wwrite-strings -Wstrict-prototypes \
+ -Wmissing-prototypes -Wnested-externs -Werror
+
+warnings:
+ $(MAKE) CFLAGS='$(WARNINGS)'
+
# This target only works when builddir == srcdir, at least for now.
dist: pam_afs_session.5
rm -rf $(TARDIR) $(TARNAME).gz