mirror of
https://github.com/PurpleI2P/i2pd-tools.git
synced 2025-01-22 21:37:18 +01:00
commit
bbbceb2564
11
Makefile
11
Makefile
|
@ -1,10 +1,11 @@
|
||||||
|
UNAME = $(shell uname -s)
|
||||||
|
|
||||||
I2PD_PATH = i2pd
|
I2PD_PATH = i2pd
|
||||||
LIBI2PD_PATH = $(I2PD_PATH)/libi2pd
|
LIBI2PD_PATH = $(I2PD_PATH)/libi2pd
|
||||||
LIBI2PD_CLIENT_PATH = $(I2PD_PATH)/libi2pd_client
|
LIBI2PD_CLIENT_PATH = $(I2PD_PATH)/libi2pd_client
|
||||||
CXX = g++
|
CXX = g++
|
||||||
FLAGS = -Wall -std=c++11 -Wno-misleading-indentation
|
FLAGS = -Wall -std=c++11 -Wno-misleading-indentation
|
||||||
|
|
||||||
UNAME = $(shell uname -s)
|
|
||||||
ifeq ($(UNAME),Linux)
|
ifeq ($(UNAME),Linux)
|
||||||
FLAGS += -g
|
FLAGS += -g
|
||||||
else
|
else
|
||||||
|
@ -16,12 +17,14 @@ endif
|
||||||
INCFLAGS = -I$(LIBI2PD_PATH) -I$(LIBI2PD_CLIENT_PATH) -I$(I2PD_PATH)
|
INCFLAGS = -I$(LIBI2PD_PATH) -I$(LIBI2PD_CLIENT_PATH) -I$(I2PD_PATH)
|
||||||
CXXFLAGS = $(FLAGS)
|
CXXFLAGS = $(FLAGS)
|
||||||
LDFLAGS = -Wl,-rpath,/usr/local/lib
|
LDFLAGS = -Wl,-rpath,/usr/local/lib
|
||||||
LIBS = $(I2PD_PATH)/libi2pd.a -lboost_system$(BOOST_SUFFIX) -lboost_date_time$(BOOST_SUFFIX) -lboost_filesystem$(BOOST_SUFFIX) -lboost_program_options$(BOOST_SUFFIX) -lssl -lcrypto -lpthread -lz
|
LIBS = $(I2PD_PATH)/libi2pd.a -lboost_system$(BOOST_SUFFIX) -lboost_date_time$(BOOST_SUFFIX) -lboost_filesystem$(BOOST_SUFFIX) -lboost_program_options$(BOOST_SUFFIX) -lssl -lcrypto -lz
|
||||||
|
|
||||||
ifeq ($(UNAME),Linux)
|
ifeq ($(UNAME),Linux)
|
||||||
LIBS += -lrt
|
LIBS += -lrt -lpthread
|
||||||
else
|
else
|
||||||
LIBS += -lws2_32 -lwsock32 -lstdc++ -liphlpapi
|
# Win32
|
||||||
|
LIBS += -lws2_32 -lwsock32 -lgdi32 -liphlpapi -lstdc++ -lpthread
|
||||||
|
LDFLAGS += -Wl,-Bstatic -static-libgcc -static-libstdc++
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SOURCES = $(wildcard *.cpp)
|
SOURCES = $(wildcard *.cpp)
|
||||||
|
|
|
@ -6,7 +6,12 @@ static void inline CalculateW (const uint8_t block[64], uint32_t W[64])
|
||||||
implementation of orignal
|
implementation of orignal
|
||||||
*/
|
*/
|
||||||
for (int i = 0; i < 16; i++)
|
for (int i = 0; i < 16; i++)
|
||||||
|
#ifdef _WIN32
|
||||||
W[i] = htobe32(((uint32_t *)(block))[i]);
|
W[i] = htobe32(((uint32_t *)(block))[i]);
|
||||||
|
#else
|
||||||
|
W[i] = be32toh(((uint32_t *)(block))[i]);
|
||||||
|
#endif
|
||||||
|
|
||||||
for (int i = 16; i < 64; i++)
|
for (int i = 16; i < 64; i++)
|
||||||
W[i] = s1(W[i - 2]) + W[i - 7] + s0(W[i - 15]) + W[i - 16];
|
W[i] = s1(W[i - 2]) + W[i - 7] + s0(W[i - 15]) + W[i - 16];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue