1 # -*- mode: Makefile; -*-
2 # Copyright (c) 2011 Bitcoin Developers
3 # Distributed under the MIT/X11 software license, see the accompanying
4 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
6 # Mac OS X makefile for bitcoin
7 # Originally by Laszlo Hanyecz (solar@heliacal.net)
16 -I"$(DEPSDIR)/include" \
17 -I"$(DEPSDIR)/Cellar/berkeley-db@4/4.8.30/include" \
18 -I"$(CURDIR)/additional/stage/usr/include"
22 -L"$(DEPSDIR)/lib/db48" \
23 -L"$(CURDIR)/additional/stage/usr/lib"
31 # Build STATIC if you are redistributing the bitcoind binary
33 $(DEPSDIR)/Cellar/berkeley-db@4/4.8.30/lib/libdb_cxx-4.8.a \
34 $(DEPSDIR)/lib/libboost_system-mt.a \
35 $(DEPSDIR)/lib/libboost_filesystem-mt.a \
36 $(DEPSDIR)/lib/libboost_program_options-mt.a \
37 $(DEPSDIR)/lib/libboost_thread-mt.a \
38 $(DEPSDIR)/lib/libssl.a \
39 $(DEPSDIR)/lib/libcrypto.a \
40 $(CURDIR)/additional/stage/usr/lib/libixwebsocket.a \
46 -lboost_filesystem-mt \
47 -lboost_program_options-mt \
55 DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DBOOST_SPIRIT_THREADSAFE -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
58 # Compile for maximum compatibility and smallest size.
59 # This requires that dependencies are compiled
66 # ppc doesn't work because we don't support big-endian
67 CFLAGS += -std=c++17 -Wall -Wno-deprecated -Wextra -Wformat -Wno-ignored-qualifiers -Wformat-security -Wno-unused-parameter \
68 $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
95 obj/rpcrawtransaction.o \
103 obj/kernel_worker.o \
106 ifneq (${USE_IPV6}, -)
107 DEFS += -DUSE_IPV6=$(USE_IPV6)
116 LIBS += $(CURDIR)/additional/stage/usr/lib/libleveldb.a
117 DEFS += $(addprefix -I,$(CURDIR)/additional/stage/usr/include) -DUSE_LEVELDB
118 DEFS += $(addprefix -I,$(CURDIR)/additional/leveldb/helpers)
119 OBJS += obj/txdb-leveldb.o
121 OBJS += obj/txdb-bdb.o
125 # Assembler implementation
126 OBJS += crypto/scrypt/asm/obj/scrypt-x86.o crypto/scrypt/asm/obj/scrypt-x86_64.o crypto/scrypt/asm/obj/asm-wrapper.o
128 crypto/scrypt/asm/obj/scrypt-x86.o: crypto/scrypt/asm/scrypt-x86.S
129 $(CXX) -c $(CFLAGS) -MMD -o $@ $<
131 crypto/scrypt/asm/obj/scrypt-x86_64.o: crypto/scrypt/asm/scrypt-x86_64.S
132 $(CXX) -c $(CFLAGS) -MMD -o $@ $<
134 crypto/scrypt/asm/obj/asm-wrapper.o: crypto/scrypt/asm/asm-wrapper.cpp
135 $(CXX) -c $(CFLAGS) -MMD -o $@ $<
140 ifeq (${USE_SSE2}, 1)
141 # Intrinsic implementation
143 OBJS += crypto/scrypt/intrin/obj/scrypt-sse2.o
145 crypto/scrypt/intrin/obj/scrypt-sse2.o: crypto/scrypt/intrin/scrypt-sse2.cpp
146 $(CXX) -c $(CFLAGS) -MMD -o $@ $<
148 # Generic implementation
149 OBJS += crypto/scrypt/generic/obj/scrypt-generic.o
151 crypto/scrypt/generic/obj/scrypt-generic.o: crypto/scrypt/generic/scrypt-generic.cpp
152 $(CXX) -c $(CFLAGS) -MMD -o $@ $<
157 # auto-generated dependencies:
161 /bin/sh ../share/genbuild.sh obj/build.h
162 version.cpp: obj/build.h
163 DEFS += -DHAVE_BUILD_INFO
166 $(CXX) -c $(CFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
167 @cp $(@:%.o=%.d) $(@:%.o=%.P); \
168 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
169 -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
172 novacoind: $(OBJS:obj/%=obj/%)
173 $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
180 -rm -f crypto/scrypt/asm/obj/*.o
181 -rm -f crypto/scrypt/asm/obj/*.P
182 -rm -f crypto/scrypt/asm/obj/*.d
183 -rm -f crypto/scrypt/intrin/obj/*.o
184 -rm -f crypto/scrypt/intrin/obj/*.P
185 -rm -f crypto/scrypt/intrin/obj/*.d
186 -rm -f crypto/scrypt/generic/obj/*.o
187 -rm -f crypto/scrypt/generic/obj/*.P
188 -rm -f crypto/scrypt/generic/obj/*.d