EXTRA_DIST += tokens/libcryptsetup-token.sym

TOKENS_LDFLAGS = $(AM_LDFLAGS) -no-undefined -avoid-version \
	-Wl,--version-script=$(top_srcdir)/tokens/libcryptsetup-token.sym

tokendir = ${EXTERNAL_LUKS2_TOKENS_PATH}

if SSHPLUGIN_TOKEN
libcryptsetup_token_ssh_la_LDFLAGS = $(TOKENS_LDFLAGS)
libcryptsetup_token_ssh_la_SOURCES = tokens/ssh/libcryptsetup-token-ssh.c \
				     tokens/ssh/ssh-utils.c \
				     tokens/ssh/ssh-utils.h
libcryptsetup_token_ssh_la_LIBADD = libcryptsetup.la @LIBSSH_LIBS@ @JSON_C_LIBS@
token_LTLIBRARIES = libcryptsetup-token-ssh.la

cryptsetup_ssh_SOURCES = tokens/ssh/cryptsetup-ssh.c \
			 tokens/ssh/ssh-utils.c \
			 tokens/ssh/ssh-utils.h \
			 src/utils_tools.c \
			 src/utils_password.c \
			 lib/utils_io.c \
			 lib/utils_loop.c
cryptsetup_ssh_LDADD = -lm libcryptsetup.la @LIBSSH_LIBS@ @JSON_C_LIBS@ @POPT_LIBS@ \
		       @PWQUALITY_LIBS@ @PASSWDQC_LIBS@ @ARGP_LIBS@

cryptsetup_ssh_CFLAGS = $(AM_CFLAGS)

sbin_PROGRAMS += cryptsetup-ssh
endif
