From 15200356fef93537690db49450f55034f6676a0d Mon Sep 17 00:00:00 2001 From: mailchuck Date: Sun, 8 Nov 2015 11:22:17 +0100 Subject: [PATCH] OSX fixes and default compile It should built on OSX 10.11 now It will build bitmsghash.so by default --- src/bitmsghash/Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/bitmsghash/Makefile b/src/bitmsghash/Makefile index 3c9c7470..88744524 100644 --- a/src/bitmsghash/Makefile +++ b/src/bitmsghash/Makefile @@ -1,14 +1,19 @@ -all: - @echo "This compiles and tests the C PoW library, it's not necessary to run PyBitmessage" +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 +endif + +all: bitmsghash.so powtest: ./testpow.py bitmsghash.so: bitmsghash.o - g++ bitmsghash.o -shared -fPIC -lpthread -lcrypto -o bitmsghash.so + g++ bitmsghash.o -shared -fPIC -lpthread -lcrypto $(LDFLAGS) -o bitmsghash.so bitmsghash.o: - g++ -Wall -O3 -march=native -fPIC -c bitmsghash.cpp + g++ -Wall -O3 -march=native -fPIC $(CCFLAGS) -c bitmsghash.cpp clean: rm -f bitmsghash.o bitmsghash.so