]> git.meshlink.io Git - meshlink/blobdiff - src/Makefile.am
Build fails: Adding protocol.o object to library and using -fPIC
[meshlink] / src / Makefile.am
index 96643524d7d80d891240e22ae07de1d2283f4249..26d4474a6af5ed046ff0611d04e08c443a00f50f 100644 (file)
@@ -2,6 +2,10 @@
 
 sbin_PROGRAMS = tincd tinc sptps_test
 
+if LINUX
+sbin_PROGRAMS += sptps_speed
+endif
+
 DEFAULT_INCLUDES =
 
 tincd_SOURCES = \
@@ -65,6 +69,8 @@ tincd_SOURCES = \
        utils.c utils.h \
        xalloc.h
 
+tincd_CFLAGS = -fPIC
+
 tinc_SOURCES = \
        dropin.c dropin.h \
        getopt.c getopt.h \
@@ -81,12 +87,30 @@ tinc_SOURCES = \
        top.c top.h \
        utils.c utils.h
 
+tinc_CFLAGS = -fPIC
+
 sptps_test_SOURCES = \
        logger.c logger.h \
        sptps.c sptps.h \
        sptps_test.c \
        utils.c utils.h
 
+sptps_speed_SOURCES = \
+       logger.c logger.h \
+       sptps.c sptps.h \
+       sptps_speed.c \
+       utils.c utils.h
+
+lib_LTLIBRARIES = libmeshlink.la
+
+libmeshlink_la_SOURCES = \
+       libmeshlink.c libmeshlink.h
+
+libmeshlink_la_CFLAGS = -fPIC
+
+libmeshlink_la_LIBADD = \
+       protocol.o 
+
 ## Conditionally compile device drivers
        
 if LINUX
@@ -146,6 +170,14 @@ sptps_test_SOURCES += \
        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
@@ -177,8 +209,9 @@ sptps_test_SOURCES += \
 endif
 
 tinc_LDADD = $(READLINE_LIBS) $(CURSES_LIBS)
+sptps_speed_LDADD = -lrt
 
-LIBS = @LIBS@ @LIBGCRYPT_LIBS@
+LIBS = @LIBS@
 
 if TUNEMU
 LIBS += -lpcap