]> 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 ccb966cae1b6f1d9c21efd053d604bb219beaf50..26d4474a6af5ed046ff0611d04e08c443a00f50f 100644 (file)
@@ -69,6 +69,8 @@ tincd_SOURCES = \
        utils.c utils.h \
        xalloc.h
 
+tincd_CFLAGS = -fPIC
+
 tinc_SOURCES = \
        dropin.c dropin.h \
        getopt.c getopt.h \
@@ -85,6 +87,8 @@ tinc_SOURCES = \
        top.c top.h \
        utils.c utils.h
 
+tinc_CFLAGS = -fPIC
+
 sptps_test_SOURCES = \
        logger.c logger.h \
        sptps.c sptps.h \
@@ -97,6 +101,16 @@ sptps_speed_SOURCES = \
        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
@@ -197,7 +211,7 @@ endif
 tinc_LDADD = $(READLINE_LIBS) $(CURSES_LIBS)
 sptps_speed_LDADD = -lrt
 
-LIBS = @LIBS@ @LIBGCRYPT_LIBS@
+LIBS = @LIBS@
 
 if TUNEMU
 LIBS += -lpcap