mirror of
https://github.com/OpenVPN/openvpn.git
synced 2024-09-20 20:03:13 +02:00
0b5141d8f9
The sample-plugins have their own set of build/winbuild scripts in each of these plugin directories. This does not give a good way to reuse various macros the autoconf/automake/configure process enables; which can contain important macros to make some code build without errors or warnings. Normally we would embrace the full autoconf/automake approach. But this is sample code which we only want to build per request and the built code should not be installed anywhere via 'make install'. But since we do use libtool other plug-ins being installed and automake gets kind of cranky when it comes to define certain build targets not following the expected use cases, we try to only embrace just enough of automake to get our main goals achieved. This changeset kicks out the build scripts and replaces them with a single Makefile.plugins file, which defines the plugins we want to build by default when running 'make from the sample-plugins directory. Neither of these plugins are otherwise built by default. No sample-plugins are being installed. But we have enough strings attached to automake to grab the CFLAGS and LDFLAGS used by the rest of the code. This also makes it easy to use #include "config.h" in sample code, to also get various macros defined by the ./configure run. This patch does not touch the winbuild scripts, as it seems building these sample-plugins on Windows requires a bit different compile and linking steps than *nix systems in general. Signed-off-by: David Sommerseth <davids@openvpn.net> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20200916141956.1277-1-davids@openvpn.net> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21020.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
35 lines
1.2 KiB
Makefile
35 lines
1.2 KiB
Makefile
#
|
|
# OpenVPN -- An application to securely tunnel IP networks
|
|
# over a single UDP port, with support for SSL/TLS-based
|
|
# session authentication and key exchange,
|
|
# packet encryption, packet authentication, and
|
|
# packet compression.
|
|
#
|
|
# Copyright (C) 2002-2020 OpenVPN Inc <sales@openvpn.net>
|
|
#
|
|
|
|
MAINTAINERCLEANFILES = \
|
|
$(srcdir)/Makefile.in
|
|
|
|
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) \
|
|
-I$(top_srcdir)/include -I$(top_builddir)/include
|
|
|
|
# We don't want automake to pull in libtool for building these
|
|
# sample-plugins. Even though this breaks the conceptual ideas
|
|
# around autoconf/automake/libtools ... these sample plug-ins
|
|
# are just sample code, not to be installed or distributed outside
|
|
# of the source tarball. Not even built by default, by design.
|
|
#
|
|
# We only add this as a simple and convenient way to build all
|
|
# these plug-ins with the same build parameters as the rest
|
|
# of the OpenVPN code.
|
|
#
|
|
# All the plugins which will be built are processed in this
|
|
# separate Makefile, which disconnects everything just enough
|
|
# to achieve our goal.
|
|
include Makefile.plugins
|
|
|
|
|
|
dist-hook :
|
|
make -f Makefile.plugins clean
|