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