2015-11-08 11:22:17 +01:00
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
ifeq ($(UNAME_S),Darwin)
|
|
|
|
CCFLAGS += -I/usr/local/Cellar/openssl/1.0.2d_1/include
|
|
|
|
LDFLAGS += -L/usr/local/Cellar/openssl/1.0.2d_1/lib
|
2017-02-19 14:48:53 +01:00
|
|
|
else ifeq ($(UNAME_S),MINGW32_NT-6.1)
|
|
|
|
CCFLAGS += -IC:\OpenSSL-1.0.2j-mingw\include -D_WIN32 -march=native
|
|
|
|
LDFLAGS += -static-libgcc -LC:\OpenSSL-1.0.2j-mingw\lib -lwsock32 -o bitmsghash32.dll -Wl,--out-implib,bitmsghash.a
|
|
|
|
else
|
|
|
|
LDFLAGS += -lpthread -o bigmsghash.so
|
2015-11-08 11:22:17 +01:00
|
|
|
endif
|
|
|
|
|
2015-11-07 19:02:53 +01:00
|
|
|
all: bitmsghash.so
|
2015-11-05 22:27:34 +01:00
|
|
|
|
|
|
|
powtest:
|
|
|
|
./testpow.py
|
|
|
|
|
|
|
|
bitmsghash.so: bitmsghash.o
|
2017-02-19 14:48:53 +01:00
|
|
|
g++ bitmsghash.o -shared -fPIC -lcrypto $(LDFLAGS)
|
2015-11-05 22:27:34 +01:00
|
|
|
|
|
|
|
bitmsghash.o:
|
2015-11-08 11:22:17 +01:00
|
|
|
g++ -Wall -O3 -march=native -fPIC $(CCFLAGS) -c bitmsghash.cpp
|
2015-11-05 22:27:34 +01:00
|
|
|
|
|
|
|
clean:
|
2017-02-19 14:48:53 +01:00
|
|
|
rm -f bitmsghash.o bitmsghash.so bitmsghash*.dll
|
2015-11-05 22:27:34 +01:00
|
|
|
|