aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/Makefile
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-07-15 01:34:37 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-07-18 03:41:57 +0200
commit3106d632de4235f8c6d63d602fe2fa9e0175d690 (patch)
treef166c00ca76b4ed076429a993b40bdd2b5cbca7e /src/Makefile
parenttests: improve test suite and add qemu tester (diff)
downloadwireguard-monolithic-historical-3106d632de4235f8c6d63d602fe2fa9e0175d690.tar.xz
wireguard-monolithic-historical-3106d632de4235f8c6d63d602fe2fa9e0175d690.zip
build system: revamp building and configuration
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/Makefile b/src/Makefile
index 3eef0b5..ff20ffe 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,61 +1,3 @@
-ifneq ($(KERNELRELEASE),)
-ifneq ($(KBUILD_EXTMOD),)
-CONFIG_WIREGUARD := m
-endif
-
-obj-$(CONFIG_WIREGUARD) := wireguard.o
-ccflags-y := -O3 -fvisibility=hidden
-ccflags-$(CONFIG_WIREGUARD_DEBUG) := -DDEBUG -g
-ifneq ($(KBUILD_EXTMOD),)
-ifeq ($(CONFIG_WIREGUARD_PARALLEL),)
-ifneq (,$(filter $(CONFIG_PADATA),y m))
-ccflags-y += -DCONFIG_WIREGUARD_PARALLEL=y
-endif
-endif
-endif
-
-ifneq ($(KBUILD_EXTMOD),)
-ifneq ($(CONFIG_MODULES),)
-ifeq ($(CONFIG_NET_UDP_TUNNEL),)
-$(error "WireGuard requires CONFIG_NET_UDP_TUNNEL to be configured in your kernel. The easiest way to select it is: \
- Networking support --> \
- Networking options --> \
- [*] IP: Foo (IP protocols) over UDP")
-endif
-ifeq ($(CONFIG_IPV6),)
-$(error "WireGuard requires CONFIG_IPV6 to be configured in your kernel. The easiest way to select it is: \
- Networking support --> \
- Networking options --> \
- [*] The IPv6 protocol")
-endif
-ifeq ($(CONFIG_NETFILTER_XT_MATCH_HASHLIMIT),)
-$(error "WireGuard requires CONFIG_NETFILTER_XT_MATCH_HASHLIMIT to be conifugred in your kernel. The easiest way to selectit is: \
- Networking support --> \
- Networking options --> \
- Network packet filtering framework (Netfilter) --> \
- Core Netfilter Configuration --> \
- [*] \"hashlimit\" match support")
-endif
-ifeq ($(CONFIG_PADATA),)
-ifneq ($(CONFIG_SMP),)
-$(warning "PEFORMANCE WARNING: WireGuard has enormous speed benefits when using CONFIG_PADATA on SMP systems. Please enable CONFIG_PADATA in your kernel configuration. The easiest way to select it is: \
- Cryptographic API --> \
- [*] Parallel crypto engine")
-endif
-endif
-endif
-endif
-
-wireguard-y := main.o noise.o device.o peer.o timers.o data.o send.o receive.o socket.o config.o hashtables.o routing-table.o ratelimiter.o cookie.o
-wireguard-y += crypto/curve25519.o crypto/chacha20poly1305.o crypto/blake2s.o crypto/siphash24.o
-ifeq ($(CONFIG_X86_64),y)
- wireguard-y += crypto/chacha20-ssse3-x86_64.o crypto/poly1305-sse2-x86_64.o
-avx2_supported := $(call as-instr,vpgatherdd %ymm0$(comma)(%eax$(comma)%ymm1$(comma)4)$(comma)%ymm2,yes,no)
-ifeq ($(avx2_supported),yes)
- wireguard-y += crypto/chacha20-avx2-x86_64.o crypto/poly1305-avx2-x86_64.o
-endif
-endif
-else
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
@@ -80,13 +22,9 @@ install:
tools:
$(MAKE) -C tools
-core-cloc: clean
- cloc ./*.c ./*.h
-
check:
$(MAKE) -C $(KERNELDIR) M=$(PWD) C=2 CF="-D__CHECK_ENDIAN__" CONFIG_WIREGUARD_DEBUG=y
include tests/debug.mk
.PHONY: all module module-debug tools install clean core-cloc check
-endif