-noinst_HEADERS = \
- xalloc.h utils.h getopt.h list.h splay_tree.h dropin.h fake-getaddrinfo.h fake-getnameinfo.h fake-gai-errnos.h ipv6.h ipv4.h ethernet.h \
- buffer.h cipher.h conf.h connection.h control.h control_common.h crypto.h device.h digest.h edge.h graph.h logger.h meta.h net.h netutl.h node.h process.h \
- protocol.h route.h rsa.h rsagen.h subnet.h bsd/tunemu.h
+if OPENSSL
+tincd_SOURCES += \
+ openssl/cipher.c \
+ openssl/crypto.c \
+ openssl/digest.c openssl/digest.h \
+ openssl/ecdh.c \
+ openssl/ecdsa.c \
+ openssl/prf.c \
+ openssl/rsa.c
+tinc_SOURCES += \
+ openssl/cipher.c \
+ openssl/crypto.c \
+ openssl/digest.c openssl/digest.h \
+ openssl/ecdh.c \
+ openssl/ecdsa.c \
+ openssl/ecdsagen.c \
+ openssl/prf.c \
+ openssl/rsa.c \
+ openssl/rsagen.c
+sptps_test_SOURCES += \
+ openssl/cipher.c \
+ openssl/crypto.c \
+ openssl/digest.c openssl/digest.h \
+ openssl/ecdh.c \
+ openssl/ecdsa.c \
+ openssl/prf.c
+sptps_speed_SOURCES += \
+ openssl/cipher.c \
+ openssl/crypto.c \
+ openssl/digest.c openssl/digest.h \
+ openssl/ecdh.c \
+ openssl/ecdsa.c \
+ openssl/ecdsagen.c \
+ openssl/prf.c
+endif
+
+if GCRYPT
+tincd_SOURCES += \
+ gcrypt/cipher.c \
+ gcrypt/crypto.c \
+ gcrypt/digest.c gcrypt/digest.h \
+ gcrypt/ecdh.c \
+ gcrypt/ecdsa.c \
+ gcrypt/prf.c \
+ gcrypt/rsa.c
+tinc_SOURCES += \
+ gcrypt/cipher.c \
+ gcrypt/crypto.c \
+ gcrypt/digest.c gcrypt/digest.h \
+ gcrypt/ecdh.c \
+ gcrypt/ecdsa.c \
+ gcrypt/ecdsagen.c \
+ gcrypt/prf.c \
+ gcrypt/rsa.c \
+ gcrypt/rsagen.c
+sptps_test_SOURCES += \
+ gcrypt/cipher.c \
+ gcrypt/crypto.c \
+ gcrypt/digest.c gcrypt/digest.h \
+ gcrypt/ecdh.c \
+ gcrypt/ecdsa.c \
+ gcrypt/prf.c
+endif
+
+tinc_LDADD = $(READLINE_LIBS) $(CURSES_LIBS)
+sptps_speed_LDADD = -lrt