mirror of
https://github.com/GOSTSec/gostcoin
synced 2025-01-30 00:14:20 +00:00
headless build
This commit is contained in:
parent
88823de063
commit
857f6e8837
@ -13,7 +13,7 @@ USE_IPV6:=1
|
||||
|
||||
LINK:=$(CXX)
|
||||
|
||||
DEFS=-DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64
|
||||
DEFS=-DBOOST_SPIRIT_THREADSAFE -DBOOST_NO_CXX11_SCOPED_ENUMS -D_FILE_OFFSET_BITS=64
|
||||
|
||||
DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH))
|
||||
LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH))
|
||||
@ -34,10 +34,12 @@ endif
|
||||
# for boost 1.37, add -mt to the boost libraries
|
||||
LIBS += \
|
||||
-Wl,-B$(LMODE) \
|
||||
-l boost_system$(BOOST_LIB_SUFFIX) \
|
||||
../i2pd/libi2pd.a \
|
||||
-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 boost_date_time$(BOOST_LIB_SUFFIX) \
|
||||
-l db_cxx$(BDB_LIB_SUFFIX) \
|
||||
-l ssl \
|
||||
-l crypto
|
||||
@ -66,7 +68,7 @@ LIBS+= \
|
||||
-l i2psam
|
||||
|
||||
# I2P Support
|
||||
DEFS += -DUSE_NATIVE_I2P -I"../i2psam"
|
||||
DEFS += -DUSE_NATIVE_I2P -I"../i2psam" -I"../i2pd"
|
||||
LIBS += -L"../i2psam"
|
||||
|
||||
# Hardening
|
||||
@ -107,7 +109,7 @@ DEBUGFLAGS=-g
|
||||
|
||||
# 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=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \
|
||||
xCXXFLAGS=-std=c++11 -O2 -pthread -Wall -Wextra -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
|
||||
@ -139,7 +141,6 @@ OBJS= \
|
||||
obj/rpcblockchain.o \
|
||||
obj/rpcrawtransaction.o \
|
||||
obj/script.o \
|
||||
obj/scrypt.o \
|
||||
obj/sync.o \
|
||||
obj/util.o \
|
||||
obj/wallet.o \
|
||||
@ -157,10 +158,10 @@ OBJS_SSE2= obj/scrypt-sse2.o
|
||||
OBJS += $(OBJS_SSE2)
|
||||
endif
|
||||
|
||||
all: anoncoind
|
||||
all: unioncoind
|
||||
|
||||
test check: test_anoncoin FORCE
|
||||
./test_anoncoin
|
||||
test check: test_unioncoin FORCE
|
||||
./test_unioncoin
|
||||
|
||||
#
|
||||
# LevelDB support
|
||||
@ -195,7 +196,7 @@ obj/%.o: %.cpp
|
||||
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
|
||||
rm -f $(@:%.o=%.d)
|
||||
|
||||
anoncoind: $(OBJS:obj/%=obj/%)
|
||||
unioncoind: $(OBJS:obj/%=obj/%)
|
||||
$(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
|
||||
|
||||
TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
|
||||
@ -207,7 +208,7 @@ obj-test/%.o: test/%.cpp
|
||||
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
|
||||
rm -f $(@:%.o=%.d)
|
||||
|
||||
test_anoncoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
|
||||
test_unioncoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
|
||||
$(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS)
|
||||
|
||||
clean:
|
||||
|
Loading…
x
Reference in New Issue
Block a user