blob: 682c597f373b502a828c5609312a00a6ea3e2e24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Bitflash headless node/miner -- Linux build (no wxWidgets, no GUI).
# Produces `bitflash-node`: loads the chain + wallet, runs the P2P/Nostr node
# with anonymous .btf auto-discovery, and mines with RandomX (-gen).
#
# Deps are set up by ../build-linux.sh. Override paths on the make line if your
# secp256k1 / RandomX live elsewhere:
# make -f makefile.linux SECP_INC=... SECP_LIB=... RANDOMX_DIR=...
CXX ?= g++
# secp256k1 (schnorrsig + extrakeys), installed by build-linux.sh
SECP_INC ?= /usr/local/include
SECP_LIB ?= /usr/local/lib
# RandomX source tree (headers in src/, static lib in build/)
RANDOMX_DIR ?= $(HOME)/RandomX
CXXFLAGS = -std=gnu++14 -O2 -w -fpermissive -pthread \
-DSECP256K1_STATIC \
-I$(SECP_INC) -I$(RANDOMX_DIR)/src
LIBS = -L$(SECP_LIB) -lsecp256k1 \
-L$(RANDOMX_DIR)/build -lrandomx \
-lsodium -lssl -lcrypto -ldb_cxx -lpthread
HEADERS = headers.h util.h main.h serialize.h uint256.h key.h bignum.h script.h \
db.h base58.h net.h irc.h nostr.h randomx_pow.h btfaddr.h btfchan.h \
btfrv.h btftunnel.h market.h compat.h
OBJS = obj/util.o obj/script.o obj/db.o obj/net.o obj/main.o obj/market.o \
obj/sha.o obj/irc.o obj/nostr.o obj/randomx_pow.o \
obj/btfaddr.o obj/btfchan.o obj/btfrv.o obj/btftunnel.o obj/headless.o
all: bitflash-node
obj/%.o: %.cpp $(HEADERS)
@mkdir -p obj
$(CXX) -c $(CXXFLAGS) -o $@ $<
# sha gets -O3 like the Windows makefile
obj/sha.o: sha.cpp sha.h
@mkdir -p obj
$(CXX) -c $(CXXFLAGS) -O3 -o $@ $<
bitflash-node: $(OBJS)
$(CXX) $(CXXFLAGS) -o $@ $(OBJS) $(LIBS)
clean:
rm -rf obj bitflash-node
|