From 6dee4d472eb7ccfd66b6e628925c4339ff40f3e8 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Mon, 20 Dec 2021 05:04:17 +0300 Subject: [PATCH] Remove old make files --- src/makefile.bsd | 226 --------------------------------------------- src/makefile.linux-mingw | 191 -------------------------------------- src/makefile.mingw | 157 ------------------------------- src/makefile.osx | 191 -------------------------------------- src/makefile.unix | 228 ---------------------------------------------- src/obj/.gitignore | 2 - 6 files changed, 0 insertions(+), 995 deletions(-) delete mode 100644 src/makefile.bsd delete mode 100644 src/makefile.linux-mingw delete mode 100644 src/makefile.mingw delete mode 100644 src/makefile.osx delete mode 100644 src/makefile.unix delete mode 100644 src/obj/.gitignore diff --git a/src/makefile.bsd b/src/makefile.bsd deleted file mode 100644 index 4591947..0000000 --- a/src/makefile.bsd +++ /dev/null @@ -1,226 +0,0 @@ -# Copyright (c) 2009-2010 Satoshi Nakamoto -# Distributed under the MIT/X11 software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -USE_LEVELDB:=0 -USE_IPV6:=1 -ARCH:=$(uname -m) - -# CC:=clang -# CXX:=clang++ - -LINK:=$(CXX) - -DEFS=-DBOOST_SPIRIT_THREADSAFE -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS - -DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH) $(CURDIR)/additional/stage/usr/include) -LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH) $(CURDIR)/additional/stage/usr/lib) - -LMODE = dynamic -LMODE2 = dynamic -ifdef STATIC - LMODE = static - ifeq (${STATIC}, all) - LMODE2 = static - endif -endif - -# for boost 1.37, add -mt to the boost libraries -LIBS += \ - -Wl,-B$(LMODE) \ - -l boost_system$(BOOST_LIB_SUFFIX) \ - -l boost_filesystem$(BOOST_LIB_SUFFIX) \ - -l boost_program_options$(BOOST_LIB_SUFFIX) \ - -l boost_thread$(BOOST_LIB_SUFFIX) \ - -l db_cxx$(BDB_LIB_SUFFIX) \ - -l ssl \ - -l crypto \ - -l execinfo \ - -l lixwebsocket - -ifneq (${USE_IPV6}, -) - DEFS += -DUSE_IPV6=$(USE_IPV6) -endif - -LIBS+= \ - -Wl,-B$(LMODE2) \ - -l z \ - -l pthread - - -# Hardening -# Make some classes of vulnerabilities unexploitable in case one is discovered. -# - # This is a workaround for Ubuntu bug #691722, the default -fstack-protector causes - # -fstack-protector-all to be ignored unless -fno-stack-protector is used first. - # see: https://bugs.launchpad.net/ubuntu/+source/gcc-4.5/+bug/691722 - HARDENING=-fno-stack-protector - - # Stack Canaries - # Put numbers at the beginning of each stack frame and check that they are the same. - # If a stack buffer if overflowed, it writes over the canary number and then on return - # when that number is checked, it won't be the same and the program will exit with - # a "Stack smashing detected" error instead of being exploited. - HARDENING+=-fstack-protector-all -Wstack-protector - - # Make some important things such as the global offset table read only as soon as - # the dynamic linker is finished building it. This will prevent overwriting of addresses - # which would later be jumped to. - LDHARDENING+=-Wl,-z,relro -Wl,-z,now - - # Build position independent code to take advantage of Address Space Layout Randomization - # offered by some kernels. - # see doc/build-unix.txt for more information. - ifdef PIE - HARDENING+=-fPIE - LDHARDENING+=-pie - endif - - # -D_FORTIFY_SOURCE=2 does some checking for potentially exploitable code patterns in - # the source such overflowing a statically defined buffer. - HARDENING+=-D_FORTIFY_SOURCE=2 -# - - -DEBUGFLAGS=-g - -ifeq (${ARCH}, i386) - EXT_OPTIONS=-msse2 -endif - -xOPT_LEVEL=-O2 -ifeq (${USE_O3}, 1) - xOPT_LEVEL=-O3 -endif - -# CXXFLAGS can be specified on the make command line, so we use xCXXFLAGS that only -# adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work. -xCXXFLAGS=$(xOPT_LEVEL) $(EXT_OPTIONS) -pthread -Wall -Wno-deprecated -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter \ - $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) - -# LDFLAGS can be specified on the make command line, so we use xLDFLAGS that only -# adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work. -xLDFLAGS=$(LDHARDENING) $(LDFLAGS) - -OBJS= \ - obj/alert.o \ - obj/version.o \ - obj/checkpoints.o \ - obj/netbase.o \ - obj/addrman.o \ - obj/crypter.o \ - obj/base58.o \ - obj/key.o \ - obj/db.o \ - obj/init.o \ - obj/irc.o \ - obj/keystore.o \ - obj/main.o \ - obj/miner.o \ - obj/net.o \ - obj/ntp.o \ - obj/stun.o \ - obj/protocol.o \ - obj/bitcoinrpc.o \ - obj/rpcdump.o \ - obj/rpcnet.o \ - obj/rpcmining.o \ - obj/rpcwallet.o \ - obj/rpcblockchain.o \ - obj/rpcrawtransaction.o \ - obj/script.o \ - obj/sync.o \ - obj/util.o \ - obj/wallet.o \ - obj/walletdb.o \ - obj/noui.o \ - obj/kernel.o \ - obj/kernel_worker.o \ - obj/ipcollector.o - -all: novacoind - -# -# LevelDB support -# -ifeq (${USE_LEVELDB}, 1) -LIBS += $(CURDIR)/additional/stage/usr/lib/libleveldb.a -DEFS += -DUSE_LEVELDB -DEFS += $(addprefix -I,$(CURDIR)/additional/leveldb/helpers) -OBJS += obj/txdb-leveldb.o -endif -ifneq (${USE_LEVELDB}, 1) -OBJS += obj/txdb-bdb.o -endif - -ifeq (${USE_ASM}, 1) - -DEFS += -DUSE_ASM - -# Assembler implementation -OBJS += crypto/scrypt/asm/obj/scrypt-arm.o crypto/scrypt/asm/obj/scrypt-x86.o crypto/scrypt/asm/obj/scrypt-x86_64.o crypto/scrypt/asm/obj/asm-wrapper.o - -crypto/scrypt/asm/obj/scrypt-x86.o: crypto/scrypt/asm/scrypt-x86.S - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< - -crypto/scrypt/asm/obj/scrypt-x86_64.o: crypto/scrypt/asm/scrypt-x86_64.S - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< - -crypto/scrypt/asm/obj/scrypt-arm.o: crypto/scrypt/asm/scrypt-arm.S - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< - -crypto/scrypt/asm/obj/asm-wrapper.o: crypto/scrypt/asm/asm-wrapper.cpp - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< - -else -ifeq (${USE_SSE2}, 1) -# Intrinsic implementation -DEFS += -DUSE_SSE2 -OBJS += crypto/scrypt/intrin/obj/scrypt-sse2.o - -crypto/scrypt/intrin/obj/scrypt-sse2.o: crypto/scrypt/intrin/scrypt-sse2.cpp - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< -else -# Generic implementation -OBJS += crypto/scrypt/generic/obj/scrypt-generic.o - -crypto/scrypt/generic/obj/scrypt-generic.o: crypto/scrypt/generic/scrypt-generic.cpp - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< -endif -endif - -# auto-generated dependencies: --include obj/*.P - -obj/build.h: FORCE - /bin/sh ../share/genbuild.sh obj/build.h -version.cpp: obj/build.h -DEFS += -DHAVE_BUILD_INFO - -obj/%.o: %.cpp - $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< - @cp $(@:%.o=%.d) $(@:%.o=%.P); \ - sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ - -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ - rm -f $(@:%.o=%.d) - -novacoind: $(OBJS:obj/%=obj/%) - $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) - -clean: - -rm -f novacoind - -rm -f obj/*.o - -rm -f obj/*.P - -rm -f obj/*.d - -rm -f crypto/scrypt/asm/obj/*.o - -rm -f crypto/scrypt/asm/obj/*.P - -rm -f crypto/scrypt/asm/obj/*.d - -rm -f crypto/scrypt/intrin/obj/*.o - -rm -f crypto/scrypt/intrin/obj/*.P - -rm -f crypto/scrypt/intrin/obj/*.d - -rm -f crypto/scrypt/generic/obj/*.o - -rm -f crypto/scrypt/generic/obj/*.P - -rm -f crypto/scrypt/generic/obj/*.d - -rm -f obj/build.h - -FORCE: diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw deleted file mode 100644 index 3f64b4b..0000000 --- a/src/makefile.linux-mingw +++ /dev/null @@ -1,191 +0,0 @@ -# Copyright (c) 2009-2010 Satoshi Nakamoto -# Distributed under the MIT/X11 software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -TARGET_PLATFORM:=i686 -#TARGET_PLATFORM:=x86_64 -CC:=$(TARGET_PLATFORM)-w64-mingw32-gcc -CXX:=$(TARGET_PLATFORM)-w64-mingw32-g++ -RANLIB:=$(TARGET_PLATFORM)-w64-mingw32-ranlib -STRIP:=$(TARGET_PLATFORM)-w64-mingw32-strip - -DEPSDIR:=/usr/$(TARGET_PLATFORM)-w64-mingw32 - -BOOST_LIB_PATH:=$(DEPSDIR)/boost_1_57_0/stage/lib -BDB_LIB_PATH:=$(DEPSDIR)/db-6.0.20.NC/build_unix -OPENSSL_LIB_PATH:=$(DEPSDIR)/openssl-3.0.0 - -BOOST_INCLUDE_PATH:=$(DEPSDIR)/boost_1_57_0 -BDB_INCLUDE_PATH:=$(DEPSDIR)/db-6.0.20.NC/build_unix -OPENSSL_INCLUDE_PATH:=$(DEPSDIR)/openssl-3.0.0/include - -USE_LEVELDB:=0 -USE_IPV6:=1 - -INCLUDEPATHS= \ - -I"$(CURDIR)" \ - -I"$(CURDIR)"/obj \ - -I"$(BOOST_INCLUDE_PATH)" \ - -I"$(BDB_INCLUDE_PATH)" \ - -I"$(OPENSSL_INCLUDE_PATH)" \ - -I"$(CURDIR)/additional/stage/usr/include" - -LIBPATHS= \ - -L"$(BOOST_LIB_PATH)" \ - -L"$(BDB_LIB_PATH)" \ - -L"$(OPENSSL_LIB_PATH)" \ - -L"$(CURDIR)/additional/stage/usr/lib" - -LIBS= \ - -l boost_system-mt \ - -l boost_filesystem-mt \ - -l boost_program_options-mt \ - -l boost_thread_win32-mt \ - -l boost_chrono-mt \ - -l db_cxx \ - -l ssl \ - -l crypto \ - -l ixwebsocket - -Wl,-Bstatic -lpthread -Wl,-Bdynamic - -xOPT_LEVEL=-O2 -ifeq (${USE_O3}, 1) - xOPT_LEVEL=-O3 -endif - -DEFS=-D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS - -DEBUGFLAGS=-g -CFLAGS=$(xOPT_LEVEL) -msse2 -w -Wall -Wno-deprecated -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) -LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat -static-libgcc -static-libstdc++ - -ifneq (${USE_IPV6}, -) - DEFS += -DUSE_IPV6=$(USE_IPV6) -endif - -LIBS += -l mingwthrd -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l mswsock -l shlwapi - -# TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are -HEADERS = $(wildcard *.h) - -OBJS= \ - obj/alert.o \ - obj/version.o \ - obj/checkpoints.o \ - obj/netbase.o \ - obj/addrman.o \ - obj/crypter.o \ - obj/base58.o \ - obj/key.o \ - obj/db.o \ - obj/init.o \ - obj/irc.o \ - obj/keystore.o \ - obj/main.o \ - obj/miner.o \ - obj/net.o \ - obj/ntp.o \ - obj/stun.o \ - obj/protocol.o \ - obj/bitcoinrpc.o \ - obj/rpcdump.o \ - obj/rpcnet.o \ - obj/rpcmining.o \ - obj/rpcwallet.o \ - obj/rpcblockchain.o \ - obj/rpcrawtransaction.o \ - obj/script.o \ - obj/sync.o \ - obj/util.o \ - obj/wallet.o \ - obj/walletdb.o \ - obj/noui.o \ - obj/kernel.o \ - obj/kernel_worker.o \ - obj/ipcollector.o - -all: novacoind.exe - -# -# LevelDB support -# -ifeq (${USE_LEVELDB}, 1) -LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a -DEFS += -I"$(CURDIR)/leveldb/include" -DUSE_LEVELDB -DEFS += -I"$(CURDIR)/leveldb/helpers" -OBJS += obj/txdb-leveldb.o -leveldb/libleveldb.a: - @echo "Building LevelDB ..." && cd leveldb && CC=$(CC) CXX=$(CXX) TARGET_OS=OS_WINDOWS_CROSSCOMPILE CXXFLAGS="-I$(INCLUDEPATHS)" LDFLAGS="-L$(LIBPATHS)" $(MAKE) libleveldb.a libmemenv.a && $(RANLIB) libleveldb.a && $(RANLIB) libmemenv.a && cd .. -obj/txdb-leveldb.o: leveldb/libleveldb.a -else -OBJS += obj/txdb-bdb.o -endif - -ifeq (${USE_ASM}, 1) -# Assembler implementation -OBJS += crypto/scrypt/asm/obj/scrypt-arm.o crypto/scrypt/asm/obj/scrypt-x86.o crypto/scrypt/asm/obj/scrypt-x86_64.o crypto/scrypt/asm/obj/asm-wrapper.o - -crypto/scrypt/asm/obj/scrypt-x86.o: crypto/scrypt/asm/scrypt-x86.S - $(CXX) -c $(CFLAGS) -MMD -o $@ $< - -crypto/scrypt/asm/obj/scrypt-x86_64.o: crypto/scrypt/asm/scrypt-x86_64.S - $(CXX) -c $(CFLAGS) -MMD -o $@ $< - -crypto/scrypt/asm/obj/scrypt-arm.o: crypto/scrypt/asm/scrypt-arm.S - $(CXX) -c $(CFLAGS) -MMD -o $@ $< - -crypto/scrypt/asm/obj/asm-wrapper.o: crypto/scrypt/asm/asm-wrapper.cpp - $(CXX) -c $(CFLAGS) -MMD -o $@ $< - -DEFS += -DUSE_ASM -else -ifeq (${USE_SSE2}, 1) -# Intrinsic implementation -DEFS += -DUSE_SSE2 -OBJS += crypto/scrypt/intrin/obj/scrypt-sse2.o - -crypto/scrypt/intrin/obj/scrypt-sse2.o: crypto/scrypt/intrin/scrypt-sse2.cpp $(HEADERS) - $(CXX) -c $(CFLAGS) -MMD -o $@ $< -else -ifneq (${USE_ASM}, 1) -# Generic implementation -OBJS += crypto/scrypt/generic/obj/scrypt-generic.o - -crypto/scrypt/generic/obj/scrypt-generic.o: crypto/scrypt/generic/scrypt-generic.cpp - $(CXX) -c $(CFLAGS) -MMD -o $@ $< -endif -endif -endif - - - -obj/build.h: FORCE - /bin/sh ../share/genbuild.sh obj/build.h -version.cpp: obj/build.h -DEFS += -DHAVE_BUILD_INFO - -obj/%.o: %.cpp $(HEADERS) - $(CXX) -c $(CFLAGS) -o $@ $< - -novacoind.exe: $(OBJS:obj/%=obj/%) - $(CXX) $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lshlwapi - $(STRIP) novacoind.exe - -clean: - -rm -f novacoind.exe - -rm -f obj/*.o - -rm -f obj/*.P - -rm -f obj/*.d - -rm -f crypto/scrypt/asm/obj/*.o - -rm -f crypto/scrypt/asm/obj/*.P - -rm -f crypto/scrypt/asm/obj/*.d - -rm -f crypto/scrypt/intrin/obj/*.o - -rm -f crypto/scrypt/intrin/obj/*.P - -rm -f crypto/scrypt/intrin/obj/*.d - -rm -f crypto/scrypt/generic/obj/*.o - -rm -f crypto/scrypt/generic/obj/*.P - -rm -f crypto/scrypt/generic/obj/*.d - -rm -f obj/build.h - cd leveldb && TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) clean && cd .. - -FORCE: diff --git a/src/makefile.mingw b/src/makefile.mingw deleted file mode 100644 index dad85f7..0000000 --- a/src/makefile.mingw +++ /dev/null @@ -1,157 +0,0 @@ -# Copyright (c) 2009-2010 Satoshi Nakamoto -# Distributed under the MIT/X11 software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -USE_LEVELDB:=0 -CC=gcc - - -USE_IPV6:=1 -USE_SSE2:=1 - -BOOST_SUFFIX?=-mgw49-mt-s-1_57 - -INCLUDEPATHS= \ - -I"$(CURDIR)" \ - -I"/c/deps/boost_1_57_0" \ - -I"/c/deps" \ - -I"/c/deps/db-6.0.20/build_unix" \ - -I"/c/deps/openssl-1.0.2/include" - -I"c/deps/ixwebsocket/usr/include" \ - -LIBPATHS= \ - -L"$(CURDIR)/leveldb" \ - -L"/c/deps/boost_1_57_0/stage/lib" \ - -L"/c/deps/db-6.0.20/build_unix" \ - -L"/c/deps/openssl-3.0.0" \ - -I"c/deps/ixwebsocket/usr/include" - -LIBS= \ - -l leveldb \ - -l memenv \ - -l boost_system$(BOOST_SUFFIX) \ - -l boost_filesystem$(BOOST_SUFFIX) \ - -l boost_program_options$(BOOST_SUFFIX) \ - -l boost_thread$(BOOST_SUFFIX) \ - -l boost_chrono$(BOOST_SUFFIX) \ - -l db_cxx \ - -l ssl \ - -l crypto - -xOPT_LEVEL=-O2 -ifeq (${USE_O3}, 1) - xOPT_LEVEL=-O3 -endif - -DEFS=-DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DEBUGFLAGS=-g -CFLAGS=-mthreads $(xOPT_LEVEL) -msse2 -w -Wall -Wno-deprecated -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) -LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat -Wl,--large-address-aware -static - -ifneq (${USE_IPV6}, -) - DEFS += -DUSE_IPV6=$(USE_IPV6) -endif - -LIBS += -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l mswsock -l shlwapi - -# TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are -HEADERS = $(wildcard *.h) - -OBJS= \ - obj/alert.o \ - obj/version.o \ - obj/checkpoints.o \ - obj/netbase.o \ - obj/addrman.o \ - obj/crypter.o \ - obj/base58.o \ - obj/key.o \ - obj/db.o \ - obj/init.o \ - obj/irc.o \ - obj/keystore.o \ - obj/main.o \ - obj/miner.o \ - obj/net.o \ - obj/ntp.o \ - obj/stun.o \ - obj/protocol.o \ - obj/bitcoinrpc.o \ - obj/rpcdump.o \ - obj/rpcnet.o \ - obj/rpcmining.o \ - obj/rpcwallet.o \ - obj/rpcblockchain.o \ - obj/rpcrawtransaction.o \ - obj/script.o \ - obj/sync.o \ - obj/util.o \ - obj/wallet.o \ - obj/walletdb.o \ - obj/noui.o \ - obj/kernel.o \ - obj/kernel_worker.o \ - obj/ipcollector.o - -all: novacoind.exe - -# -# LevelDB support -# -ifdef USE_LEVELDB -LIBS += $(CURDIR)/additional/stage/usr/lib/libleveldb.a -DEFS += -DUSE_LEVELDB -DEFS += $(addprefix -I,$(CURDIR)/additional/leveldb/helpers) -OBJS += obj/txdb-leveldb.o -else -OBJS += obj/txdb-bdb.o -endif - -ifdef USE_ASM -# Assembler implementation -OBJS += crypto/scrypt/asm/obj/scrypt-arm.o crypto/scrypt/asm/obj/scrypt-x86.o crypto/scrypt/asm/obj/scrypt-x86_64.o crypto/scrypt/asm/obj/asm-wrapper.o - -crypto/scrypt/asm/obj/scrypt-x86.o: crypto/scrypt/asm/scrypt-x86.S - $(CXX) -c $(CFLAGS) -MMD -o $@ $< - -crypto/scrypt/asm/obj/scrypt-x86_64.o: crypto/scrypt/asm/scrypt-x86_64.S - $(CXX) -c $(CFLAGS) -MMD -o $@ $< - -crypto/scrypt/asm/obj/scrypt-arm.o: crypto/scrypt/asm/scrypt-arm.S - $(CXX) -c $(CFLAGS) -MMD -o $@ $< - -crypto/scrypt/asm/obj/asm-wrapper.o: crypto/scrypt/asm/asm-wrapper.cpp - $(CXX) -c $(CFLAGS) -MMD -o $@ $< - -DEFS += -DUSE_ASM - -else -ifdef USE_SSE2 -# Intrinsic implementation -DEFS += -DUSE_SSE2 -OBJS += scrypt-intrin/obj/scrypt-sse2.o - -crypto/scrypt/intrin/obj/scrypt-sse2.o: crypto/scrypt/intrin/scrypt-sse2.cpp - $(CXX) -c $(CFLAGS) -MMD -o $@ $< -else -# Generic implementation -OBJS += obj/scrypt-generic.o - -crypto/scrypt/obj/scrypt-generic.o: crypto/scrypt/generic/scrypt-generic.cpp - $(CXX) -c $(CFLAGS) -MMD -o $@ $< -endif -endif - - -obj/%.o: %.cpp $(HEADERS) - g++ -c $(CFLAGS) -o $@ $< - -novacoind.exe: $(OBJS:obj/%=obj/%) - g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) - -clean: - -del /Q novacoind.exe - -del /Q obj\* - -del /Q crypto\scrypt\asm\obj\* - -FORCE: diff --git a/src/makefile.osx b/src/makefile.osx deleted file mode 100644 index 66b47dc..0000000 --- a/src/makefile.osx +++ /dev/null @@ -1,191 +0,0 @@ -# -*- mode: Makefile; -*- -# Copyright (c) 2011 Bitcoin Developers -# Distributed under the MIT/X11 software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -# Mac OS X makefile for bitcoin -# Originally by Laszlo Hanyecz (solar@heliacal.net) - -CC=clang -CXX=clang++ -DEPSDIR=/opt/homebrew - -INCLUDEPATHS= \ - -I"$(CURDIR)" \ - -I"$(CURDIR)"/obj \ - -I"$(DEPSDIR)/include" \ - -I"$(DEPSDIR)/Cellar/berkeley-db@4/4.8.30/include" \ - -I"$(CURDIR)/additional/stage/usr/include" - -LIBPATHS= \ - -L"$(DEPSDIR)/lib" \ - -L"$(DEPSDIR)/lib/db48" \ - -L"$(CURDIR)/additional/stage/usr/lib" - -USE_LEVELDB:=0 -USE_IPV6:=1 - -LIBS= -dead_strip - -ifdef STATIC -# Build STATIC if you are redistributing the bitcoind binary -LIBS += \ - $(DEPSDIR)/Cellar/berkeley-db@4/4.8.30/lib/libdb_cxx-4.8.a \ - $(DEPSDIR)/lib/libboost_system-mt.a \ - $(DEPSDIR)/lib/libboost_filesystem-mt.a \ - $(DEPSDIR)/lib/libboost_program_options-mt.a \ - $(DEPSDIR)/lib/libboost_thread-mt.a \ - $(DEPSDIR)/lib/libssl.a \ - $(DEPSDIR)/lib/libcrypto.a \ - $(CURDIR)/additional/stage/usr/lib/libixwebsocket.a \ - -lz -else -LIBS += \ - -ldb_cxx-4.8 \ - -lboost_system-mt \ - -lboost_filesystem-mt \ - -lboost_program_options-mt \ - -lboost_thread-mt \ - -lssl \ - -lcrypto \ - -lixwebsocket \ - -lz -endif - -DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DBOOST_SPIRIT_THREADSAFE -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS - -ifdef RELEASE -# Compile for maximum compatibility and smallest size. -# This requires that dependencies are compiled -# the same way. -CFLAGS = -O2 -msse2 -else -CFLAGS = -g -msse2 -endif - -# ppc doesn't work because we don't support big-endian -CFLAGS += -std=c++17 -Wall -Wno-deprecated -Wextra -Wformat -Wno-ignored-qualifiers -Wformat-security -Wno-unused-parameter \ - $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) - -OBJS= \ - obj/alert.o \ - obj/version.o \ - obj/checkpoints.o \ - obj/netbase.o \ - obj/addrman.o \ - obj/crypter.o \ - obj/base58.o \ - obj/key.o \ - obj/db.o \ - obj/init.o \ - obj/irc.o \ - obj/keystore.o \ - obj/main.o \ - obj/miner.o \ - obj/net.o \ - obj/ntp.o \ - obj/stun.o \ - obj/protocol.o \ - obj/bitcoinrpc.o \ - obj/rpcdump.o \ - obj/rpcnet.o \ - obj/rpcmining.o \ - obj/rpcwallet.o \ - obj/rpcblockchain.o \ - obj/rpcrawtransaction.o \ - obj/script.o \ - obj/sync.o \ - obj/util.o \ - obj/wallet.o \ - obj/walletdb.o \ - obj/noui.o \ - obj/kernel.o \ - obj/kernel_worker.o \ - obj/ipcollector.o - -ifneq (${USE_IPV6}, -) - DEFS += -DUSE_IPV6=$(USE_IPV6) -endif - -all: novacoind - -# -# LevelDB support -# -ifdef USE_LEVELDB -LIBS += $(CURDIR)/additional/stage/usr/lib/libleveldb.a -DEFS += $(addprefix -I,$(CURDIR)/additional/stage/usr/include) -DUSE_LEVELDB -DEFS += $(addprefix -I,$(CURDIR)/additional/leveldb/helpers) -OBJS += obj/txdb-leveldb.o -else -OBJS += obj/txdb-bdb.o -endif - -ifeq (${USE_ASM}, 1) -# Assembler implementation -OBJS += crypto/scrypt/asm/obj/scrypt-x86.o crypto/scrypt/asm/obj/scrypt-x86_64.o crypto/scrypt/asm/obj/asm-wrapper.o - -crypto/scrypt/asm/obj/scrypt-x86.o: crypto/scrypt/asm/scrypt-x86.S - $(CXX) -c $(CFLAGS) -MMD -o $@ $< - -crypto/scrypt/asm/obj/scrypt-x86_64.o: crypto/scrypt/asm/scrypt-x86_64.S - $(CXX) -c $(CFLAGS) -MMD -o $@ $< - -crypto/scrypt/asm/obj/asm-wrapper.o: crypto/scrypt/asm/asm-wrapper.cpp - $(CXX) -c $(CFLAGS) -MMD -o $@ $< - -DEFS += -DUSE_ASM - -else -ifeq (${USE_SSE2}, 1) -# Intrinsic implementation -DEFS += -DUSE_SSE2 -OBJS += crypto/scrypt/intrin/obj/scrypt-sse2.o - -crypto/scrypt/intrin/obj/scrypt-sse2.o: crypto/scrypt/intrin/scrypt-sse2.cpp - $(CXX) -c $(CFLAGS) -MMD -o $@ $< -else -# Generic implementation -OBJS += crypto/scrypt/generic/obj/scrypt-generic.o - -crypto/scrypt/generic/obj/scrypt-generic.o: crypto/scrypt/generic/scrypt-generic.cpp - $(CXX) -c $(CFLAGS) -MMD -o $@ $< -endif -endif - - -# auto-generated dependencies: --include obj/*.P - -obj/build.h: FORCE - /bin/sh ../share/genbuild.sh obj/build.h -version.cpp: obj/build.h -DEFS += -DHAVE_BUILD_INFO - -obj/%.o: %.cpp - $(CXX) -c $(CFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< - @cp $(@:%.o=%.d) $(@:%.o=%.P); \ - sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ - -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ - rm -f $(@:%.o=%.d) - -novacoind: $(OBJS:obj/%=obj/%) - $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) - -clean: - -rm -f novacoind - -rm -f obj/*.o - -rm -f obj/*.P - -rm -f obj/*.d - -rm -f crypto/scrypt/asm/obj/*.o - -rm -f crypto/scrypt/asm/obj/*.P - -rm -f crypto/scrypt/asm/obj/*.d - -rm -f crypto/scrypt/intrin/obj/*.o - -rm -f crypto/scrypt/intrin/obj/*.P - -rm -f crypto/scrypt/intrin/obj/*.d - -rm -f crypto/scrypt/generic/obj/*.o - -rm -f crypto/scrypt/generic/obj/*.P - -rm -f crypto/scrypt/generic/obj/*.d - -rm -f obj/build.h - -FORCE: diff --git a/src/makefile.unix b/src/makefile.unix deleted file mode 100644 index 05605a2..0000000 --- a/src/makefile.unix +++ /dev/null @@ -1,228 +0,0 @@ -# Copyright (c) 2009-2010 Satoshi Nakamoto -# Distributed under the MIT/X11 software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -USE_LEVELDB:=0 -USE_IPV6:=1 - -# CC=clang -# CXX=clang++ - -LINK:=$(CXX) -ARCH:=$(shell uname -m) - -DEFS=-DBOOST_SPIRIT_THREADSAFE -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS - -DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH) $(CURDIR)/additional/stage/usr/include) -LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH) $(CURDIR)/additional/stage/usr/lib) - -LMODE = dynamic -LMODE2 = dynamic -ifdef STATIC - LMODE = static - ifeq (${STATIC}, all) - LMODE2 = static - endif -endif - -# for boost 1.37, add -mt to the boost libraries -LIBS += \ - -Wl,-B$(LMODE) \ - -l boost_system$(BOOST_LIB_SUFFIX) \ - -l boost_filesystem$(BOOST_LIB_SUFFIX) \ - -l boost_program_options$(BOOST_LIB_SUFFIX) \ - -l boost_thread$(BOOST_LIB_SUFFIX) \ - -l db_cxx$(BDB_LIB_SUFFIX) \ - -l ssl \ - -l crypto \ - -l ixwebsocket - -ifneq (${USE_IPV6}, -) - DEFS += -DUSE_IPV6=$(USE_IPV6) -endif - -LIBS+= \ - -Wl,-B$(LMODE2) \ - -l z \ - -l dl \ - -l pthread - - -# Hardening -# Make some classes of vulnerabilities unexploitable in case one is discovered. -# - # This is a workaround for Ubuntu bug #691722, the default -fstack-protector causes - # -fstack-protector-all to be ignored unless -fno-stack-protector is used first. - # see: https://bugs.launchpad.net/ubuntu/+source/gcc-4.5/+bug/691722 - HARDENING=-fno-stack-protector - - # Stack Canaries - # Put numbers at the beginning of each stack frame and check that they are the same. - # If a stack buffer if overflowed, it writes over the canary number and then on return - # when that number is checked, it won't be the same and the program will exit with - # a "Stack smashing detected" error instead of being exploited. - HARDENING+=-fstack-protector-all -Wstack-protector - - # Make some important things such as the global offset table read only as soon as - # the dynamic linker is finished building it. This will prevent overwriting of addresses - # which would later be jumped to. - LDHARDENING+=-Wl,-z,relro -Wl,-z,now - - # Build position independent code to take advantage of Address Space Layout Randomization - # offered by some kernels. - # see doc/build-unix.txt for more information. - ifdef PIE - HARDENING+=-fPIE - LDHARDENING+=-pie - endif - - # -D_FORTIFY_SOURCE=2 does some checking for potentially exploitable code patterns in - # the source such overflowing a statically defined buffer. - HARDENING+=-D_FORTIFY_SOURCE=2 -# - - -DEBUGFLAGS=-g - - -ifeq (${ARCH}, i686) - EXT_OPTIONS=-msse2 -endif - -xOPT_LEVEL=-O2 -ifeq (${USE_O3}, 1) - xOPT_LEVEL=-O3 -endif - -# CXXFLAGS can be specified on the make command line, so we use xCXXFLAGS that only -# adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work. -xCXXFLAGS=$(xOPT_LEVEL) $(EXT_OPTIONS) -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter \ - $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) - -# LDFLAGS can be specified on the make command line, so we use xLDFLAGS that only -# adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work. -xLDFLAGS=$(LDHARDENING) $(LDFLAGS) - -OBJS= \ - obj/alert.o \ - obj/version.o \ - obj/checkpoints.o \ - obj/netbase.o \ - obj/addrman.o \ - obj/crypter.o \ - obj/base58.o \ - obj/key.o \ - obj/db.o \ - obj/init.o \ - obj/irc.o \ - obj/keystore.o \ - obj/miner.o \ - obj/main.o \ - obj/net.o \ - obj/ntp.o \ - obj/stun.o \ - obj/protocol.o \ - obj/bitcoinrpc.o \ - obj/rpcdump.o \ - obj/rpcnet.o \ - obj/rpcmining.o \ - obj/rpcwallet.o \ - obj/rpcblockchain.o \ - obj/rpcrawtransaction.o \ - obj/script.o \ - obj/sync.o \ - obj/util.o \ - obj/wallet.o \ - obj/walletdb.o \ - obj/noui.o \ - obj/kernel.o \ - obj/kernel_worker.o \ - obj/ipcollector.o - -all: novacoind - -# -# LevelDB support -# -ifeq (${USE_LEVELDB}, 1) -LIBS += $(CURDIR)/additional/stage/usr/lib/libleveldb.a -DEFS += -DUSE_LEVELDB -DEFS += $(addprefix -I,$(CURDIR)/additional/leveldb/helpers) -OBJS += obj/txdb-leveldb.o -endif -ifneq (${USE_LEVELDB}, 1) -OBJS += obj/txdb-bdb.o -endif - -ifeq (${USE_ASM}, 1) -# Assembler implementation -OBJS += crypto/scrypt/asm/obj/scrypt-arm.o crypto/scrypt/asm/obj/scrypt-x86.o crypto/scrypt/asm/obj/scrypt-x86_64.o crypto/scrypt/asm/obj/asm-wrapper.o - -crypto/scrypt/asm/obj/scrypt-x86.o: crypto/scrypt/asm/scrypt-x86.S - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< - -crypto/scrypt/asm/obj/scrypt-x86_64.o: crypto/scrypt/asm/scrypt-x86_64.S - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< - -crypto/scrypt/asm/obj/scrypt-arm.o: crypto/scrypt/asm/scrypt-arm.S - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< - -crypto/scrypt/asm/obj/asm-wrapper.o: crypto/scrypt/asm/asm-wrapper.cpp - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< - -DEFS += -DUSE_ASM - -else -ifeq (${USE_SSE2}, 1) -# Intrinsic implementation -DEFS += -DUSE_SSE2 -OBJS += crypto/scrypt/intrin/obj/scrypt-sse2.o - -crypto/scrypt/intrin/obj/scrypt-sse2.o: crypto/scrypt/intrin/scrypt-sse2.cpp - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< -else -# Generic implementation -OBJS += crypto/scrypt/generic/obj/scrypt-generic.o - -crypto/scrypt/generic/obj/scrypt-generic.o: crypto/scrypt/generic/scrypt-generic.cpp - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< -endif -endif - - -# auto-generated dependencies: --include obj/*.P - -obj/build.h: FORCE - /bin/sh ../share/genbuild.sh obj/build.h -version.cpp: obj/build.h -DEFS += -DHAVE_BUILD_INFO - - -obj/%.o: %.cpp - $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< - @cp $(@:%.o=%.d) $(@:%.o=%.P); \ - sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ - -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ - rm -f $(@:%.o=%.d) - -novacoind: $(OBJS:obj/%=obj/%) - $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) - -clean: - -rm -f novacoind - -rm -f obj/*.o - -rm -f obj/*.P - -rm -f obj/*.d - -rm -f crypto/scrypt/asm/obj/*.o - -rm -f crypto/scrypt/asm/obj/*.P - -rm -f crypto/scrypt/asm/obj/*.d - -rm -f crypto/scrypt/intrin/obj/*.o - -rm -f crypto/scrypt/intrin/obj/*.P - -rm -f crypto/scrypt/intrin/obj/*.d - -rm -f crypto/scrypt/generic/obj/*.o - -rm -f crypto/scrypt/generic/obj/*.P - -rm -f crypto/scrypt/generic/obj/*.d - -rm -f obj/build.h - -FORCE: diff --git a/src/obj/.gitignore b/src/obj/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/src/obj/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore -- 1.7.1