1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-25 02:49:52 +03:00

Create libsoftether.so and dynamically link the userland.

Sharing object code between vpnbridge, vpnclient, vpnserver, and vpncmd
reduces the binary size of SoftEther by 85% and its administrative memory
footprint by 50%.
This commit is contained in:
Darik Horn 2014-04-13 12:51:15 -04:00
parent c5e5d7e93c
commit 75625af541
7 changed files with 44 additions and 10 deletions

View File

@ -30,6 +30,7 @@ AC_CONFIG_FILES([
src/Mayaqua/Makefile
src/Cedar/Makefile
src/hamcorebuilder/Makefile
src/libsoftether/Makefile
src/bin/hamcore/Makefile
src/vpnserver/Makefile
src/vpnclient/Makefile

View File

@ -22,5 +22,8 @@ SUBDIRS = Mayaqua Cedar
# This is a nodist helper.
SUBDIRS += hamcorebuilder
# These are final build products.
SUBDIRS += bin/hamcore vpnserver vpnclient vpnbridge vpncmd
# These are shared components.
SUBDIRS += libsoftether bin/hamcore
# These are the final build products.
SUBDIRS += vpnserver vpnclient vpnbridge vpncmd

View File

@ -0,0 +1,34 @@
# Copyright 2014 Darik Horn <dajhorn@vanadac.com>
#
# This file is part of SoftEther.
#
# SoftEther is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 2 of the License, or (at your option)
# any later version.
#
# SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# SoftEther. If not, see <http://www.gnu.org/licenses/>.
include $(top_srcdir)/autotools/softether.am
lib_LTLIBRARIES = \
libsoftether.la
libsoftether_la_SOURCES =
libsoftether_la_LDFLAGS = \
-avoid-version
libsoftether_la_LIBTOOLFLAGS = \
--tag=disable-static
libsoftether_la_LIBADD = \
$(top_builddir)/src/Mayaqua/libmayaqua.la \
$(top_builddir)/src/Cedar/libcedar.la

View File

@ -25,5 +25,4 @@ vpnbridge_SOURCES = \
vpnbridge.c
vpnbridge_LDADD = \
$(top_builddir)/src/Mayaqua/libmayaqua.la \
$(top_builddir)/src/Cedar/libcedar.la
$(top_builddir)/src/libsoftether/libsoftether.la

View File

@ -25,5 +25,4 @@ vpnclient_SOURCES = \
vpncsvc.c
vpnclient_LDADD = \
$(top_builddir)/src/Mayaqua/libmayaqua.la \
$(top_builddir)/src/Cedar/libcedar.la
$(top_builddir)/src/libsoftether/libsoftether.la

View File

@ -25,5 +25,4 @@ vpncmd_SOURCES = \
vpncmd.c
vpncmd_LDADD = \
$(top_builddir)/src/Mayaqua/libmayaqua.la \
$(top_builddir)/src/Cedar/libcedar.la
$(top_builddir)/src/libsoftether/libsoftether.la

View File

@ -25,5 +25,4 @@ vpnserver_SOURCES = \
vpnserver.c
vpnserver_LDADD = \
$(top_builddir)/src/Mayaqua/libmayaqua.la \
$(top_builddir)/src/Cedar/libcedar.la
$(top_builddir)/src/libsoftether/libsoftether.la