]> git.meshlink.io Git - meshlink/blobdiff - src/Makefile.am
Allow compiling without support for Catta.
[meshlink] / src / Makefile.am
index 6340a1a2a22b8da0054a195305042f951b70ed03..ef0d8d9e800f9d663e2fa9c95fad41d546db7569 100644 (file)
@@ -1,9 +1,12 @@
 ## Produce this file with automake to get Makefile.in
 
-DEFAULT_INCLUDES =
+AM_CPPFLAGS = -Wall
 
 ed25519_SOURCES = \
        ed25519/add_scalar.c \
+       ed25519/ecdh.c \
+       ed25519/ecdsa.c \
+       ed25519/ecdsagen.c \
        ed25519/ed25519.h \
        ed25519/fe.c ed25519/fe.h \
        ed25519/fixedint.h \
@@ -23,7 +26,8 @@ chacha_poly1305_SOURCES = \
        chacha-poly1305/poly1305.c chacha-poly1305/poly1305.h
 
 utcp_SOURCES = \
-       utcp/utcp.c utcp/utcp.h
+       utcp/utcp.c utcp/utcp.h \
+       utcp/utcp_priv.h
 
 lib_LTLIBRARIES = libmeshlink.la
 
@@ -32,13 +36,10 @@ pkginclude_HEADERS = meshlink++.h meshlink.h
 libmeshlink_la_LDFLAGS = -export-symbols-regex '^(meshlink_|devtool_)'
 
 libmeshlink_la_SOURCES = \
-       meshlink.c meshlink.h \
        buffer.c buffer.h \
-       cipher.h \
        conf.c conf.h \
        connection.c connection.h \
        crypto.c crypto.h \
-       discovery.c discovery.h \
        dropin.c dropin.h \
        ecdh.h \
        ecdsa.h \
@@ -53,6 +54,9 @@ libmeshlink_la_SOURCES = \
        have.h \
        list.c list.h \
        logger.c logger.h \
+       meshlink.c meshlink.h \
+       meshlink_internal.h \
+       meshlink_queue.h \
        meta.c meta.h \
        net.c net.h \
        net_packet.c \
@@ -67,6 +71,7 @@ libmeshlink_la_SOURCES = \
        protocol_key.c \
        protocol_misc.c \
        route.c route.h \
+       sockaddr.h \
        splay_tree.c splay_tree.h \
        sptps.c sptps.h \
        system.h \
@@ -77,15 +82,18 @@ libmeshlink_la_SOURCES = \
        $(chacha_poly1305_SOURCES) \
        $(utcp_SOURCES)
 
-libmeshlink_la_CFLAGS = -fPIC -I../catta/include/
+libmeshlink_la_CFLAGS = $(PTHREAD_CFLAGS) -fPIC -iquote.
+libmeshlink_la_LDFLAGS += $(PTHREAD_LIBS)
+
+if CATTA
+libmeshlink_la_SOURCES += \
+       discovery.c discovery.h
+
+libmeshlink_la_CFLAGS += -I${top_srcdir}/catta/include/
 
 if MINGW
-libmeshlink_la_CFLAGS += -I../catta/src/compat/windows/include/
+libmeshlink_la_CFLAGS += -I${top_srcdir}/catta/src/compat/windows/include/
 endif
 
-libmeshlink_la_LIBADD = -lpthread ../catta/src/libcatta.la
-
-libmeshlink_la_SOURCES += \
-       ed25519/ecdh.c \
-       ed25519/ecdsa.c \
-       ed25519/ecdsagen.c
+libmeshlink_la_LIBADD = ${top_builddir}/catta/src/libcatta.la
+endif