fix compile issue on Mac using make
-# cheatcoin: Makefile; T13.656-T14.335; $DVS:time$
+# xdag: Makefile; T13.656-T14.335; $DVS:time$
SRCROOT = ..
dnet = ../dnet
@@ -155,7 +155,6 @@ else
flags = -std=gnu11 -O3 -DDFSTOOLS -DCHEATCOIN -DNDEBUG -g -lpthread -lcrypto -lssl -lm -Wall -Wmissing-prototypes -Wno-unused-result -Wl,--export-dynamic
endif
-ifneq ($(OS), Darwin)
ifeq ($(use_openssl_ec), false)
secp256k1_i = secp256k1.o -isystem$(secp256k1)/include/ $(include_gmp)
ifeq ("$(wildcard $(secp256k1)/src/libsecp256k1-config.h)","")
@@ -164,12 +163,13 @@ ifneq ($(OS), Darwin)
ifeq ("$(wildcard secp256k1.o)","")
secp256k1_full_compile = true
endif
- ifeq ($(OS), Linux)
+
GNUmake = make
- else
- GNUmake = gmake
- endif
+
ifeq ($(lgmp_installed), true)
+ ifeq ($(OS), Darwin)
+ include_gmp = -I/usr/local/opt/gmp/include -lgmp
+ else
include_gmp = -lgmp
endif
endif
@@ -179,10 +179,9 @@ endif
all: secp256k1 xdag
xdag: $(sources) $(headers) Makefile
- cc -o xdag $(secp256k1_i) $(sources) $(asm_src) -DSHA256_USE_OPENSSL_TXFM -DSHA256_OPENSSL_MBLOCK -I$(SRCROOT) -I$(utils) $(flags)
+ cc -O3 -o xdag $(secp256k1_i) $(sources) $(asm_src) -DSHA256_USE_OPENSSL_TXFM -DSHA256_OPENSSL_MBLOCK -I$(SRCROOT) -I$(utils) $(flags)
secp256k1:
-ifneq ($(OS), Darwin)
ifeq ($(use_openssl_ec), false)
ifeq ($(lgmp_installed), false)
@echo "\033[0;31mPlease install libgmp-dev to have better performance\033[0m";
@@ -199,9 +198,6 @@ ifneq ($(OS), Darwin)
else
@rm -f secp256k1.o
endif
-else
- @rm -f secp256k1.o
-endif
clean:
rm -f xdag
