Support both BE and LE MIT master key file formats
[heimdal.git] / lib / otp / Makefile.am
blob12077a1898c0cd72c053b8c517075a1258dfbf74
1 # $Id$
3 include $(top_srcdir)/Makefile.am.common
5 AM_CPPFLAGS += $(INCLUDE_hcrypto) $(ROKEN_RENAME)
7 noinst_PROGRAMS = otptest
9 check_PROGRAMS = otptest
11 otptest_LDADD = libotp.la
13 include_HEADERS = otp.h
15 lib_LTLIBRARIES = libotp.la
16 libotp_la_LDFLAGS = -version-info 1:5:1
17 libotp_la_LIBADD  = $(LIB_hcrypto) $(LIB_roken) $(LIB_NDBM)
19 if HAVE_DB3
20 ndbm_wrap = ndbm_wrap.c ndbm_wrap.h
21 else
22 ndbm_wrap =
23 endif
25 dist_libotp_la_SOURCES = \
26         otp.c \
27         otp_challenge.c \
28         otp_db.c \
29         otp_md.c \
30         otp_parse.c \
31         otp_print.c \
32         otp_verify.c \
33         otp_locl.h \
34         otp_md.h \
35         roken_rename.h
37 nodist_libotp_la_SOURCES = $(ndbm_wrap) $(ROKEN_SRCS)
39 if do_roken_rename
40 ROKEN_SRCS = snprintf.c strcasecmp.c strncasecmp.c strlwr.c strlcpy.c strlcat.c
41 endif
43 if versionscript
44 libotp_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
45 endif
47 $(libotp_la_OBJECTS): $(ndbm_wrap)
49 ndbm_wrap.c:
50         $(LN_S) $(srcdir)/../roken/ndbm_wrap.c .
51 ndbm_wrap.h:
52         (echo '#define dbm_rename(X) __otp_ ## X'; cat $(srcdir)/../roken/ndbm_wrap.h) > ndbm_wrap.h
55 snprintf.c:
56         $(LN_S) $(srcdir)/../roken/snprintf.c .
57 strcasecmp.c:
58         $(LN_S) $(srcdir)/../roken/strcasecmp.c .
59 strncasecmp.c:
60         $(LN_S) $(srcdir)/../roken/strncasecmp.c .
61 strlwr.c:
62         $(LN_S) $(srcdir)/../roken/strlwr.c .
63 strlcpy.c:
64         $(LN_S) $(srcdir)/../roken/strlcpy.c .
65 strlcat.c:
66         $(LN_S) $(srcdir)/../roken/strlcat.c .
68 CLEANFILES = \
69         ndbm_wrap.c \
70         ndbm_wrap.h \
71         snprintf.c \
72         strcasecmp.c \
73         strlcat.c \
74         strlcpy.c \
75         strlwr.c \
76         strncasecmp.c