1# Id 2 3include $(top_srcdir)/Makefile.am.common 4 5AM_CPPFLAGS += $(ROKEN_RENAME) 6if HAVE_DBHEADER 7AM_CPPFLAGS += -I$(DBHEADER) 8endif 9 10noinst_PROGRAMS = otptest 11 12check_PROGRAMS = otptest 13 14otptest_LDADD = libotp.la 15 16include_HEADERS = otp.h 17 18lib_LTLIBRARIES = libotp.la 19libotp_la_LDFLAGS = -version-info 1:5:1 20libotp_la_LIBADD = $(LIB_hcrypto) $(LIB_roken) 21 22if HAVE_DB3 23ndbm_wrap = ndbm_wrap.c ndbm_wrap.h 24libotp_la_LIBADD += $(DB3LIB) 25else 26if HAVE_DB1 27ndbm_wrap = ndbm_wrap.c ndbm_wrap.h 28libotp_la_LIBADD += $(DB1LIB) 29else 30ndbm_wrap = 31libotp_la_LIBADD += $(NDBMLIB) 32endif 33endif 34 35dist_libotp_la_SOURCES = \ 36 otp.c \ 37 otp_challenge.c \ 38 otp_db.c \ 39 otp_md.c \ 40 otp_parse.c \ 41 otp_print.c \ 42 otp_verify.c \ 43 otp_locl.h \ 44 otp_md.h \ 45 roken_rename.h 46 47nodist_libotp_la_SOURCES = $(ndbm_wrap) $(ROKEN_SRCS) 48 49libotp_la_DEPENDENCIES = version-script.map 50 51if do_roken_rename 52ROKEN_SRCS = snprintf.c strcasecmp.c strncasecmp.c strlwr.c strlcpy.c strlcat.c 53endif 54 55if versionscript 56libotp_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map 57endif 58 59$(libotp_la_OBJECTS): $(ndbm_wrap) 60 61ndbm_wrap.c: 62 $(LN_S) $(srcdir)/../roken/ndbm_wrap.c . 63ndbm_wrap.h: 64 (echo '#define dbm_rename(X) __otp_ ## X'; cat $(srcdir)/../roken/ndbm_wrap.h) > ndbm_wrap.h 65 66 67snprintf.c: 68 $(LN_S) $(srcdir)/../roken/snprintf.c . 69strcasecmp.c: 70 $(LN_S) $(srcdir)/../roken/strcasecmp.c . 71strncasecmp.c: 72 $(LN_S) $(srcdir)/../roken/strncasecmp.c . 73strlwr.c: 74 $(LN_S) $(srcdir)/../roken/strlwr.c . 75strlcpy.c: 76 $(LN_S) $(srcdir)/../roken/strlcpy.c . 77strlcat.c: 78 $(LN_S) $(srcdir)/../roken/strlcat.c . 79 80CLEANFILES = \ 81 ndbm_wrap.c \ 82 ndbm_wrap.h \ 83 snprintf.c \ 84 strcasecmp.c \ 85 strlcat.c \ 86 strlcpy.c \ 87 strlwr.c \ 88 strncasecmp.c 89 90EXTRA_DIST = NTMakefile version-script.map 91