0
0
mirror of https://github.com/OpenVPN/openvpn.git synced 2024-09-20 03:52:28 +02:00
openvpn/doc/Makefile.am
Frank Lichtenheld e8881ec6dd CMake: Add complete MinGW and MSVC build
This is based on the initial CMake patch by
Arne Schwabe, but extends that to provide
a complete replacement for existing MinGW
build (autotools based) and MSVC build
(openvpn.sln).

The following features are added while switching
these builds to CMake:
 - vcpkg support for MinGW build, allowing for
   trivial cross-compilation on Linux
 - Add unittests to MSVC build
 - Rework MSVC config header generation, removing
   need for separate headers between autotools
   and MSVC

The following advantages are reasons for switching
to CMake over the existing MSVC build:
 - Easier to maintain CMake files without IDE
   than the sln and vcxproj files
 - Able to maintain MSVC and MinGW build side-by-side

The plan is to completely remove the existing MSVC
build system but leave the existing autotools builds
in place as-is, including MinGW support.

CMake is not the intended build system for Unix-like
platforms and there are no current plans to switch
to it.

v2:
 - Reduce default warning level for MSVC to /W2. With
   /W3 the build is just much too noisy, making it
   difficult to spot new warnings.
 - Change MSVC CMake presets to have hardcoded build
   type. When using pkg_search_module MSVC Multi-Config
   builds do not work correctly at all since PkgConfig
   doesn't seem to be able to create multi-config
   libraries like find_package does.
 - Change minGW presets to be Multi-Config capable.
 - Remove OPENVPN_VERSION_MAJOR, OPENVPN_VERSION_MINOR,
   OPENVPN_VERSION_PATCH from config.h.cmake.in.
   They are not required and cause macro redefinition
   warnings in MSVC (with openvpn-plugin.h). gcc doesn't
   warn about this because the definitions are identical
   so no need to fix this in autoheader config.h.in.
v3:
 - Apply fixes by Lev Stipakov to match MSVC compile
   options better to previous build.
 - Apply change by Lev Stipakov to enable generation
   of PDB files.
 - Move /Brepro to its own commit. This is a behavior
   change that should be more visible.
 - Rebase on top of my dist fixes.

Change-Id: I237f28eca618d4fc476225b887c0be26cca362b1
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Message-Id: <20230620135310.94455-3-frank@lichtenheld.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26754.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2023-06-27 18:07:03 +02:00

114 lines
3.0 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-2023 OpenVPN Inc <sales@openvpn.net>
# Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
#
SUBDIRS = doxygen
#
# List of man and HTML pages we build when rst2man/rst2html is available
#
# NOTE: Remember to add source .rst files to $(dist_noinst_DATA) below
# This could be automated with GNU Make, but we need BSD Make support
#
build_man_pages = openvpn.8 openvpn-examples.5
build_html_pages = openvpn.8.html openvpn-examples.5.html
dist_doc_DATA = \
management-notes.txt gui-notes.txt
openvpn_sections = \
man-sections/advanced-options.rst \
man-sections/cipher-negotiation.rst \
man-sections/client-options.rst \
man-sections/connection-profiles.rst \
man-sections/encryption-options.rst \
man-sections/generic-options.rst \
man-sections/inline-files.rst \
man-sections/link-options.rst \
man-sections/log-options.rst \
man-sections/management-options.rst \
man-sections/network-config.rst \
man-sections/pkcs11-options.rst \
man-sections/plugin-options.rst \
man-sections/protocol-options.rst \
man-sections/proxy-options.rst \
man-sections/renegotiation.rst \
man-sections/signals.rst \
man-sections/script-options.rst \
man-sections/server-options.rst \
man-sections/tls-options.rst \
man-sections/unsupported-options.rst \
man-sections/virtual-routing-and-forwarding.rst \
man-sections/vpn-network-options.rst \
man-sections/windows-options.rst
openvpn_examples_sections = \
man-sections/example-fingerprint.rst \
man-sections/examples.rst
dist_noinst_DATA = \
android.txt \
interactive-service-notes.rst \
keying-material-exporter.txt \
openvpn.8.rst \
openvpn-examples.5.rst \
README.man \
README.plugins \
tls-crypt-v2.txt \
$(openvpn_sections) \
$(openvpn_examples_sections) \
CMakeLists.txt
EXTRA_DIST = tests
# dependencies
openvpn.8 openvpn.8.html: $(openvpn_sections)
openvpn-examples.5 openvpn-examples.5.html: $(openvpn_examples_sections)
###### GENERIC RULES ##########
SUFFIXES = .8.rst .8 .8.html .5.rst .5 .5.html
RST_FLAGS = --strict
MAINTAINERCLEANFILES = \
$(srcdir)/Makefile.in
.8.rst.8 .5.rst.5 :
if HAVE_PYDOCUTILS
$(RST2MAN) $(RST_FLAGS) $< > $@
else
@echo "Missing python-docutils - skipping man page generation ($@)"
endif
.8.rst.8.html .5.rst.5.html :
if HAVE_PYDOCUTILS
$(RST2HTML) $(RST_FLAGS) $< > $@
else
@echo "Missing python-docutils - skipping html page generation ($@)"
endif
if HAVE_PYDOCUTILS
dist_noinst_DATA += $(build_man_pages)
dist_html_DATA = $(build_html_pages)
# Failsafe - do not delete these files unless we can recreate them
CLEANFILES = $(build_man_pages) $(build_html_pages)
endif
if WIN32
else
dist_man_MANS = $(build_man_pages)
endif
dist-hook : $(build_man_pages) $(build_html_pages)