1# Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
2#
3# Permission to use, copy, modify, and/or distribute this software for any
4# purpose with or without fee is hereby granted, provided that the above
5# copyright notice and this permission notice appear in all copies.
6#
7# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
8# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
10# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
12# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13# PERFORMANCE OF THIS SOFTWARE.
14
15# Id
16
17srcdir =	@srcdir@
18VPATH =		@srcdir@
19top_srcdir =	@top_srcdir@
20
21@BIND9_MAKE_INCLUDES@
22
23PROVIDER =	@PKCS11_PROVIDER@
24
25CINCLUDES =	${ISC_INCLUDES}
26
27CDEFINES =	-DPK11_LIB_LOCATION=\"${PROVIDER}\"
28
29ISCLIBS =	../../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
30
31LIBS =		${ISCLIBS} @LIBS@
32
33SUBDIRS =
34
35TARGETS =	session@EXEEXT@ login@EXEEXT@ random@EXEEXT@ \
36		sha1@EXEEXT@ create@EXEEXT@ find@EXEEXT@ \
37		pubrsa@EXEEXT@ privrsa@EXEEXT@ genrsa@EXEEXT@ \
38		sign@EXEEXT@ verify@EXEEXT@
39
40SRCS =		session.c login.c random.c sha1.c create.c find.c \
41		pubrsa.c privrsa.c genrsa.c sign.c verify.c
42
43@BIND9_MAKE_RULES@
44
45session@EXEEXT@: @srcdir@/session.c
46	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
47		-o $@ @srcdir@/session.c ${LIBS}
48
49login@EXEEXT@: @srcdir@/login.c
50	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
51		-o $@ @srcdir@/login.c ${LIBS}
52
53random@EXEEXT@: @srcdir@/random.c
54	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
55		-o $@ @srcdir@/random.c ${LIBS}
56
57sha1@EXEEXT@: @srcdir@/sha1.c
58	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
59		-o $@ @srcdir@/sha1.c ${LIBS}
60
61create@EXEEXT@: @srcdir@/create.c
62	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
63		-o $@ @srcdir@/create.c ${LIBS}
64
65find@EXEEXT@: @srcdir@/find.c
66	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
67		-o $@ @srcdir@/find.c ${LIBS}
68
69pubrsa@EXEEXT@: @srcdir@/pubrsa.c
70	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
71		-o $@ @srcdir@/pubrsa.c ${LIBS}
72
73privrsa@EXEEXT@: @srcdir@/privrsa.c
74	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
75		-o $@ @srcdir@/privrsa.c ${LIBS}
76
77genrsa@EXEEXT@: @srcdir@/genrsa.c
78	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
79		-o $@ @srcdir@/genrsa.c ${LIBS}
80
81sign@EXEEXT@: @srcdir@/sign.c
82	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
83		-o $@ @srcdir@/sign.c ${LIBS}
84
85verify@EXEEXT@: @srcdir@/verify.c
86	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
87		-o $@ @srcdir@/verify.c ${LIBS}
88
89clean distclean::
90	rm -f ${TARGETS}
91