mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-22 06:14:02 -07:00
move definition of ZT_SALSA20_SSE into Salsa20.cpp
This commit is contained in:
parent
95e303d6f3
commit
526aafc64b
5 changed files with 7 additions and 47 deletions
|
@ -9,27 +9,6 @@ include objects.mk
|
|||
OBJS+=osnet/BSDEthernetTapFactory.o osnet/BSDEthernetTap.o osnet/BSDRoutingTable.o
|
||||
TESTNET_OBJS=testnet/SimNet.o testnet/SimNetSocketManager.o testnet/TestEthernetTap.o testnet/TestEthernetTapFactory.o testnet/TestRoutingTable.o
|
||||
|
||||
# Enable SSE-optimized Salsa20 on x86 and x86_64 machines
|
||||
MACHINE=$(shell uname -m)
|
||||
ifeq ($(MACHINE),x86_64)
|
||||
DEFS+=-DZT_SALSA20_SSE
|
||||
endif
|
||||
ifeq ($(MACHINE),amd64)
|
||||
DEFS+=-DZT_SALSA20_SSE
|
||||
endif
|
||||
ifeq ($(MACHINE),i686)
|
||||
DEFS+=-DZT_SALSA20_SSE
|
||||
endif
|
||||
ifeq ($(MACHINE),i586)
|
||||
DEFS+=-DZT_SALSA20_SSE
|
||||
endif
|
||||
ifeq ($(MACHINE),i386)
|
||||
DEFS+=-DZT_SALSA20_SSE
|
||||
endif
|
||||
ifeq ($(MACHINE),x86)
|
||||
DEFS+=-DZT_SALSA20_SSE
|
||||
endif
|
||||
|
||||
# "make official" is a shortcut for this
|
||||
ifeq ($(ZT_OFFICIAL_RELEASE),1)
|
||||
ZT_AUTO_UPDATE=1
|
||||
|
|
|
@ -10,27 +10,6 @@ include objects.mk
|
|||
OBJS+=osnet/LinuxRoutingTable.o osnet/LinuxEthernetTap.o osnet/LinuxEthernetTapFactory.o
|
||||
TESTNET_OBJS=testnet/SimNet.o testnet/SimNetSocketManager.o testnet/TestEthernetTap.o testnet/TestEthernetTapFactory.o testnet/TestRoutingTable.o
|
||||
|
||||
# Enable SSE-optimized Salsa20 on x86 and x86_64 machines
|
||||
MACHINE=$(shell uname -m)
|
||||
ifeq ($(MACHINE),x86_64)
|
||||
DEFS+=-DZT_SALSA20_SSE
|
||||
endif
|
||||
ifeq ($(MACHINE),amd64)
|
||||
DEFS+=-DZT_SALSA20_SSE
|
||||
endif
|
||||
ifeq ($(MACHINE),i686)
|
||||
DEFS+=-DZT_SALSA20_SSE
|
||||
endif
|
||||
ifeq ($(MACHINE),i586)
|
||||
DEFS+=-DZT_SALSA20_SSE
|
||||
endif
|
||||
ifeq ($(MACHINE),i386)
|
||||
DEFS+=-DZT_SALSA20_SSE
|
||||
endif
|
||||
ifeq ($(MACHINE),x86)
|
||||
DEFS+=-DZT_SALSA20_SSE
|
||||
endif
|
||||
|
||||
# "make official" is a shortcut for this
|
||||
ifeq ($(ZT_OFFICIAL_RELEASE),1)
|
||||
ZT_AUTO_UPDATE=1
|
||||
|
|
|
@ -25,9 +25,6 @@ ifeq ($(ZT_AUTO_UPDATE),1)
|
|||
DEFS+=-DZT_AUTO_UPDATE
|
||||
endif
|
||||
|
||||
# Enable SSE-optimized Salsa20 -- all Intel macs support SSE2
|
||||
DEFS+=-DZT_SALSA20_SSE
|
||||
|
||||
ifeq ($(ZT_DEBUG),1)
|
||||
# DEFS+=-DZT_TRACE -DZT_LOG_STDOUT
|
||||
CFLAGS=-Wall -g -pthread $(INCLUDES) $(DEFS)
|
||||
|
|
|
@ -11,6 +11,11 @@
|
|||
|
||||
#include "Constants.hpp"
|
||||
|
||||
/* Enable SSE-optimized Salsa20 on SSE2 machines */
|
||||
#ifdef __SSE2__
|
||||
#define ZT_SALSA20_SSE
|
||||
#endif
|
||||
|
||||
#ifdef ZT_SALSA20_SSE
|
||||
#include <emmintrin.h>
|
||||
#endif // ZT_SALSA20_SSE
|
||||
|
|
|
@ -270,7 +270,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\ext\bin\libcrypto\include</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZT_OFFICIAL_RELEASE;ZT_AUTO_UPDATE;ZT_SALSA20_SSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>ZT_OFFICIAL_RELEASE;ZT_AUTO_UPDATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
@ -294,7 +294,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\ext\bin\libcrypto\include</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZT_OFFICIAL_RELEASE;ZT_AUTO_UPDATE;ZT_SALSA20_SSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>ZT_OFFICIAL_RELEASE;ZT_AUTO_UPDATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue