1 # Automake makefile for krb5-strength.
3 # Written by Russ Allbery <rra@stanford.edu>
4 # Copyright 2007, 2009 Board of Trustees, Leland Stanford Jr. University
6 # See LICENSE for licensing terms.
8 AUTOMAKE_OPTIONS = foreign subdir-objects
9 ACLOCAL_AMFLAGS = -I m4
10 EXTRA_DIST = autogen cracklib/HISTORY cracklib/LICENCE cracklib/README \
11 cracklib/mkdict patches/README patches/mit-krb5-1.4.4 \
14 # Put the module into /usr/local/lib/kadmind by default, relative to --libdir.
15 moduledir = $(libdir)/kadmind
17 # Build cracklib as a helper library, currently unconditionally, and build
18 # (but don't install) the packer program.
19 noinst_LTLIBRARIES = cracklib/libcracklib.la
20 cracklib_libcracklib_la_SOURCES = cracklib/fascist.c cracklib/packlib.c \
21 cracklib/rules.c cracklib/stringlib.c
22 cracklib_libcracklib_la_CPPFLAGS = -DIN_CRACKLIB
23 noinst_PROGRAMS = cracklib/packer
24 cracklib_packer_SOURCES = cracklib/packer.c cracklib/packer.h
25 cracklib_packer_LDADD = cracklib/libcracklib.la
27 # Rules for building the password strength plugin.
28 module_LTLIBRARIES = plugin/passwd_strength.la
29 plugin_passwd_strength_la_SOURCES = plugin/api.c plugin/heimdal.c
30 plugin_passwd_strength_la_LDFLAGS = -module -avoid-version
31 plugin_passwd_strength_la_LIBADD = cracklib/libcracklib.la
33 # The Heimdal external-check program.
34 bin_PROGRAMS = plugin/heimdal-strength
35 plugin_heimdal_strength_CFLAGS = $(AM_CFLAGS)
36 plugin_heimdal_strength_SOURCES = plugin/api.c plugin/api.h \
37 plugin/heimdal-strength.c
38 plugin_heimdal_strength_LDADD = cracklib/libcracklib.la $(KRB5_LIBS)
40 # Handle the standard stuff that make maintainer-clean should probably remove
41 # but doesn't. This breaks the GNU coding standard, but in this area the GNU
42 # coding standard is dumb.
43 CLEANFILES = tests/data/dictionary.hwm tests/data/dictionary.pwd \
44 tests/data/dictionary.pwi
45 DISTCLEANFILES = tests/data/.placeholder
46 MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.h.in config.h.in~ \
49 # A set of flags for warnings. Add -O because gcc won't find some warnings
50 # without optimization turned on.
51 WARNINGS = -g -O -Wall -W -Wendif-labels -Wpointer-arith \
52 -Wbad-function-cast -Wwrite-strings -Wstrict-prototypes \
53 -Wmissing-prototypes -Wnested-externs -Werror
56 $(MAKE) V=0 CFLAGS='$(WARNINGS)'
57 $(MAKE) V=0 CFLAGS='$(WARNINGS)' $(check_PROGRAMS)
59 # The bits below are for the test suite, not for the main package.
60 check_PROGRAMS = tests/runtests
61 tests_runtests_CPPFLAGS = -DSOURCE='"$(abs_top_srcdir)/tests"' \
62 -DBUILD='"$(abs_top_builddir)/tests"'
64 tests/data/dictionary.pwd: cracklib/packer $(srcdir)/tests/data/wordlist
65 cracklib/packer tests/data/dictionary < $(srcdir)/tests/data/wordlist
67 check-local: $(check_PROGRAMS) tests/data/dictionary.pwd
68 cd tests && ./runtests $(abs_top_srcdir)/tests/TESTS