Move source from lib/ to src/.
authorGuus Sliepen <guus@tinc-vpn.org>
Thu, 31 Dec 2009 12:19:13 +0000 (13:19 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Thu, 31 Dec 2009 12:19:13 +0000 (13:19 +0100)
The utility functions in the lib/ directory do not really form a library.
Also, now that we build two binaries, tincctl does not need everything that was
in libvpn.a, so it is wasteful to link to it.

28 files changed:
lib/Makefile.am
src/Makefile.am
src/alloca.c [moved from lib/alloca.c with 100% similarity]
src/dropin.c [moved from lib/dropin.c with 100% similarity]
src/dropin.h [moved from lib/dropin.h with 100% similarity]
src/ethernet.h [moved from lib/ethernet.h with 100% similarity]
src/fake-gai-errnos.h [moved from lib/fake-gai-errnos.h with 100% similarity]
src/fake-getaddrinfo.c [moved from lib/fake-getaddrinfo.c with 100% similarity]
src/fake-getaddrinfo.h [moved from lib/fake-getaddrinfo.h with 100% similarity]
src/fake-getnameinfo.c [moved from lib/fake-getnameinfo.c with 100% similarity]
src/fake-getnameinfo.h [moved from lib/fake-getnameinfo.h with 100% similarity]
src/getopt.c [moved from lib/getopt.c with 100% similarity]
src/getopt.h [moved from lib/getopt.h with 100% similarity]
src/getopt1.c [moved from lib/getopt1.c with 100% similarity]
src/ipv4.h [moved from lib/ipv4.h with 100% similarity]
src/ipv6.h [moved from lib/ipv6.h with 100% similarity]
src/list.c [moved from lib/list.c with 100% similarity]
src/list.h [moved from lib/list.h with 100% similarity]
src/malloc.c [moved from lib/malloc.c with 100% similarity]
src/memcmp.c [moved from lib/memcmp.c with 100% similarity]
src/realloc.c [moved from lib/realloc.c with 100% similarity]
src/splay_tree.c [moved from lib/splay_tree.c with 100% similarity]
src/splay_tree.h [moved from lib/splay_tree.h with 100% similarity]
src/utils.c [moved from lib/utils.c with 100% similarity]
src/utils.h [moved from lib/utils.h with 100% similarity]
src/xalloc.h [moved from lib/xalloc.h with 100% similarity]
src/xmalloc.c [moved from lib/xmalloc.c with 100% similarity]
system.h

index c96e176..96d7a6a 100644 (file)
@@ -1,14 +1 @@
 ## Process this file with automake to produce Makefile.in
-
-noinst_LIBRARIES = libvpn.a
-
-INCLUDES = @INCLUDES@ -I. -I$(top_builddir)
-
-libvpn_a_SOURCES = xmalloc.c utils.c getopt.c getopt1.c list.c splay_tree.c dropin.c fake-getaddrinfo.c fake-getnameinfo.c
-
-libvpn_a_LIBADD = @LIBOBJS@ @ALLOCA@
-libvpn_a_DEPENDENCIES = $(libvpn_a_LIBADD)
-
-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
-
-EXTRA_DIST = 
index 7be9f5c..20e438f 100644 (file)
@@ -4,11 +4,15 @@ sbin_PROGRAMS = tincd tincctl
 
 EXTRA_DIST = linux bsd solaris cygwin mingw raw_socket uml_socket openssl gcrypt
 
-tincd_SOURCES = cipher.c conf.c connection.c control.c crypto.c digest.c edge.c graph.c logger.c meta.c net.c net_packet.c net_setup.c \
-       net_socket.c netutl.c node.c process.c protocol.c protocol_auth.c protocol_edge.c protocol_misc.c       \
+tincd_SOURCES = \
+       xmalloc.c utils.c getopt.c getopt1.c list.c splay_tree.c dropin.c fake-getaddrinfo.c fake-getnameinfo.c \
+       cipher.c conf.c connection.c control.c crypto.c digest.c edge.c graph.c logger.c meta.c net.c net_packet.c net_setup.c \
+       net_socket.c netutl.c node.c process.c protocol.c protocol_auth.c protocol_edge.c protocol_misc.c \
        protocol_key.c protocol_subnet.c route.c rsa.c subnet.c tincd.c
 
-tincctl_SOURCES = tincctl.c rsagen.c
+tincctl_SOURCES = \
+       xmalloc.c utils.c getopt.c getopt1.c \
+       tincctl.c rsagen.c
 
 if TUNEMU
 tincd_SOURCES += bsd/tunemu.c
@@ -18,9 +22,11 @@ nodist_tincd_SOURCES = device.c
 
 DEFAULT_INCLUDES =
 
-INCLUDES = @INCLUDES@ -I$(top_builddir) -I$(top_srcdir)/lib
+INCLUDES = @INCLUDES@ -I$(top_builddir)
 
-noinst_HEADERS = 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     \
+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 \
+       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
 
 LIBS = @LIBS@ @LIBGCRYPT_LIBS@
@@ -29,12 +35,6 @@ if TUNEMU
 LIBS += -lpcap
 endif
 
-tincd_LDADD = \
-       $(top_builddir)/lib/libvpn.a
-
-tincctl_LDADD = \
-       $(top_builddir)/lib/libvpn.a
-
 AM_CFLAGS = @CFLAGS@ -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\"
 
 dist-hook:
similarity index 100%
rename from lib/alloca.c
rename to src/alloca.c
similarity index 100%
rename from lib/dropin.c
rename to src/dropin.c
similarity index 100%
rename from lib/dropin.h
rename to src/dropin.h
similarity index 100%
rename from lib/ethernet.h
rename to src/ethernet.h
similarity index 100%
rename from lib/fake-gai-errnos.h
rename to src/fake-gai-errnos.h
similarity index 100%
rename from lib/getopt.c
rename to src/getopt.c
similarity index 100%
rename from lib/getopt.h
rename to src/getopt.h
similarity index 100%
rename from lib/getopt1.c
rename to src/getopt1.c
similarity index 100%
rename from lib/ipv4.h
rename to src/ipv4.h
similarity index 100%
rename from lib/ipv6.h
rename to src/ipv6.h
similarity index 100%
rename from lib/list.c
rename to src/list.c
similarity index 100%
rename from lib/list.h
rename to src/list.h
similarity index 100%
rename from lib/malloc.c
rename to src/malloc.c
similarity index 100%
rename from lib/memcmp.c
rename to src/memcmp.c
similarity index 100%
rename from lib/realloc.c
rename to src/realloc.c
similarity index 100%
rename from lib/splay_tree.c
rename to src/splay_tree.c
similarity index 100%
rename from lib/splay_tree.h
rename to src/splay_tree.h
similarity index 100%
rename from lib/utils.c
rename to src/utils.c
similarity index 100%
rename from lib/utils.h
rename to src/utils.h
similarity index 100%
rename from lib/xalloc.h
rename to src/xalloc.h
similarity index 100%
rename from lib/xmalloc.c
rename to src/xmalloc.c
index dfb4c6d..5dc1daf 100644 (file)
--- a/system.h
+++ b/system.h
@@ -37,7 +37,7 @@ typedef int bool;
 
 /* Other functions */
 
-#include "dropin.h"
+#include "src/dropin.h"
 
 #ifndef HAVE_SOCKLEN_T
 typedef int socklen_t;