diff --git a/src/Makefile.am b/src/Makefile.am index 63af709c..3b7d44af 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,9 +13,14 @@ if LINUX sbin_PROGRAMS += sptps_speed endif -DEFAULT_INCLUDES = +lib_LTLIBRARIES = libtincd.la libed25519.la libchacha_poly1305.la libtincconf.la -ed25519_SOURCES = \ +libchacha_poly1305_la_SOURCES = \ + chacha-poly1305/chacha.c chacha-poly1305/chacha.h \ + chacha-poly1305/chacha-poly1305.c chacha-poly1305/chacha-poly1305.h \ + chacha-poly1305/poly1305.c chacha-poly1305/poly1305.h + +libed25519_la_SOURCES = \ ed25519/add_scalar.c \ ed25519/ed25519.h \ ed25519/fe.c ed25519/fe.h \ @@ -29,15 +34,13 @@ ed25519_SOURCES = \ ed25519/sign.c \ ed25519/verify.c -chacha_poly1305_SOURCES = \ - chacha-poly1305/chacha.c chacha-poly1305/chacha.h \ - chacha-poly1305/chacha-poly1305.c chacha-poly1305/chacha-poly1305.h \ - chacha-poly1305/poly1305.c chacha-poly1305/poly1305.h +libtincconf_la_SOURCES = \ + conf.c conf.h -tincd_SOURCES = \ +libtincd_la_SOURCES = \ + conf.h \ buffer.c buffer.h \ cipher.h \ - conf.c conf.h \ connection.c connection.h \ control.c control.h \ control_common.h \ @@ -74,7 +77,7 @@ tincd_SOURCES = \ netutl.c netutl.h \ node.c node.h \ prf.h \ - process.c process.h \ + process.h process.c \ protocol.c protocol.h \ protocol_auth.c \ protocol_edge.c \ @@ -91,168 +94,105 @@ tincd_SOURCES = \ subnet.c subnet.h \ subnet_parse.c \ system.h \ - tincd.c \ utils.c utils.h \ xalloc.h \ version.c version.h \ ed25519/ecdh.c \ ed25519/ecdsa.c \ - $(ed25519_SOURCES) \ - $(chacha_poly1305_SOURCES) - -tinc_SOURCES = \ dropin.c dropin.h \ getopt.c getopt.h \ getopt1.c \ + $(libed25519_la_SOURCES) \ + $(libchacha_poly1305_la_SOURCES) + +tinc_SOURCES = \ + invitation.c invitation.h \ + top.c top.h \ fsck.c fsck.h \ info.c info.h \ - invitation.c invitation.h \ - list.c list.h \ - names.c names.h \ - netutl.c netutl.h \ - script.c script.h \ - sptps.c sptps.h \ - subnet_parse.c subnet.h \ tincctl.c tincctl.h \ - top.c top.h \ - utils.c utils.h \ - version.c version.h \ - ed25519/ecdh.c \ - ed25519/ecdsa.c \ - ed25519/ecdsagen.c \ - $(ed25519_SOURCES) \ - $(chacha_poly1305_SOURCES) + $(libed25519_la_SOURCES) \ + $(libchacha_poly1305_la_SOURCES) sptps_test_SOURCES = \ - logger.c logger.h \ - sptps.c sptps.h \ sptps_test.c \ - utils.c utils.h \ - ed25519/ecdh.c \ - ed25519/ecdsa.c \ - $(ed25519_SOURCES) \ - $(chacha_poly1305_SOURCES) + $(libed25519_la_SOURCES) \ + $(libchacha_poly1305_la_SOURCES) sptps_keypair_SOURCES = \ sptps_keypair.c \ - utils.c utils.h \ - ed25519/ecdsagen.c \ - $(ed25519_SOURCES) + $(libed25519_la_SOURCES) sptps_speed_SOURCES = \ - logger.c logger.h \ - sptps.c sptps.h \ sptps_speed.c \ - utils.c utils.h \ - ed25519/ecdh.c \ - ed25519/ecdsa.c \ - ed25519/ecdsagen.c \ - $(ed25519_SOURCES) \ - $(chacha_poly1305_SOURCES) + $(libed25519_la_SOURCES) \ + $(libchacha_poly1305_la_SOURCES) ## Conditionally compile device drivers - + if LINUX -tincd_SOURCES += linux/device.c +libtincd_la_SOURCES += linux/device.c endif if BSD -tincd_SOURCES += bsd/device.c +libtincd_la_SOURCES += bsd/device.c if TUNEMU -tincd_SOURCES += bsd/tunemu.c bsd/tunemu.h +libtincd_la_SOURCES += bsd/tunemu.c bsd/tunemu.h endif endif if SOLARIS -tincd_SOURCES += solaris/device.c +libtincd_la_SOURCES += solaris/device.c endif if MINGW -tincd_SOURCES += mingw/device.c mingw/common.h +libtincd_la_SOURCES += mingw/device.c mingw/common.h endif if CYGWIN -tincd_SOURCES += cygwin/device.c +libtincd_la_SOURCES += cygwin/device.c endif if UML -tincd_SOURCES += uml_device.c +libtincd_la_SOURCES += uml_device.c endif if VDE -tincd_SOURCES += vde_device.c +libtincd_la_SOURCES += vde_device.c endif if OPENSSL -tincd_SOURCES += \ - openssl/cipher.c \ - openssl/crypto.c \ - openssl/digest.c openssl/digest.h \ - openssl/prf.c \ - openssl/rsa.c -tinc_SOURCES += \ +libtincd_la_SOURCES += \ openssl/cipher.c \ openssl/crypto.c \ openssl/digest.c openssl/digest.h \ openssl/prf.c \ openssl/rsa.c \ openssl/rsagen.c -sptps_test_SOURCES += \ - openssl/crypto.c \ - openssl/digest.c openssl/digest.h \ - openssl/prf.c -sptps_keypair_SOURCES += \ - openssl/crypto.c -sptps_speed_SOURCES += \ - openssl/crypto.c \ - openssl/digest.c openssl/digest.h \ - openssl/prf.c else if GCRYPT -tincd_SOURCES += \ - gcrypt/cipher.c \ - gcrypt/crypto.c \ - gcrypt/digest.c gcrypt/digest.h \ - gcrypt/prf.c \ - gcrypt/rsa.c -tinc_SOURCES += \ +libtincd_la_SOURCES += \ gcrypt/cipher.c \ gcrypt/crypto.c \ gcrypt/digest.c gcrypt/digest.h \ 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/prf.c -sptps_keypair_SOURCES += \ - openssl/crypto.c -sptps_speed_SOURCES += \ - openssl/crypto.c \ - openssl/digest.c openssl/digest.h \ - openssl/prf.c else -tincd_SOURCES += \ - nolegacy/crypto.c \ - nolegacy/prf.c -tinc_SOURCES += \ - nolegacy/crypto.c \ - nolegacy/prf.c -sptps_test_SOURCES += \ - nolegacy/crypto.c \ - nolegacy/prf.c -sptps_keypair_SOURCES += \ - nolegacy/crypto.c -sptps_speed_SOURCES += \ +libtincd_la_SOURCES += \ nolegacy/crypto.c \ nolegacy/prf.c endif endif -tinc_LDADD = $(READLINE_LIBS) $(CURSES_LIBS) -sptps_speed_LDADD = -lrt +tincd_SOURCES = \ + process.h \ + tincd.c + +tincd_LDADD = libtincd.la libed25519.la libchacha_poly1305.la libtincconf.la +tinc_LDADD = $(READLINE_LIBS) $(CURSES_LIBS) libtincd.la libtincconf.la +sptps_speed_LDADD = -lrt libtincd.la libed25519.la +sptps_test_LDADD = -lrt libtincd.la libed25519.la LIBS = @LIBS@ -lm @@ -261,3 +201,4 @@ LIBS += -lpcap endif AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\" -iquote. +#-fsanitize=address