move definition of ZT_SALSA20_SSE into Salsa20.cpp

This commit is contained in:
Moritz Warning 2015-01-22 22:11:40 +01:00
commit 526aafc64b
5 changed files with 7 additions and 47 deletions

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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>