mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
315798a0c4
* fix various crashes and race conditions * rename iwp-connect to connect in config * rename iwp-links to bind in config * always make a link just for outbound sessions even if no bind section is provided
72 lines
1.7 KiB
Makefile
72 lines
1.7 KiB
Makefile
|
|
all: debug
|
|
|
|
SIGN = gpg --sign --detach
|
|
|
|
REPO := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
|
|
|
|
TARGETS = llarpd libllarp.so libllarp-static.a
|
|
SIGS = $(TARGETS:=.sig)
|
|
|
|
SHADOW_ROOT ?= $(HOME)/.shadow
|
|
SHADOW_BIN=$(SHADOW_ROOT)/bin/shadow
|
|
SHADOW_CONFIG=shadow.config.xml
|
|
SHADOW_PLUGIN=libshadow-plugin-llarp.so
|
|
|
|
TESTNET_ROOT=$(REPO)/testnet_tmp
|
|
TESTNET_CONF=$(TESTNET_ROOT)/supervisor.conf
|
|
TESTNET_LOG=$(TESTNET_ROOT)/testnet.log
|
|
|
|
clean:
|
|
rm -f build.ninja rules.ninja cmake_install.cmake CMakeCache.txt
|
|
rm -rf CMakeFiles
|
|
rm -f $(TARGETS)
|
|
rm -f $(SHADOW_PLUGIN) $(SHADOW_CONFIG)
|
|
rm -f *.sig
|
|
|
|
debug-configure: clean
|
|
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug
|
|
|
|
release-configure: clean
|
|
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DRELEASE_MOTTO="$(shell cat motto.txt)"
|
|
|
|
debug: debug-configure
|
|
ninja
|
|
|
|
release-compile: release-configure
|
|
ninja
|
|
strip $(TARGETS)
|
|
|
|
$(TARGETS): release-compile
|
|
|
|
%.sig: $(TARGETS)
|
|
$(SIGN) $*
|
|
|
|
release: $(SIGS)
|
|
|
|
shadow-configure: clean
|
|
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DSHADOW=ON
|
|
|
|
shadow-build: shadow-configure
|
|
ninja clean
|
|
ninja
|
|
|
|
shadow: shadow-build
|
|
python3 contrib/shadow/genconf.py $(SHADOW_CONFIG)
|
|
bash -c "$(SHADOW_BIN) -w $$(cat /proc/cpuinfo | grep processor | wc -l) $(SHADOW_CONFIG) &> shadow.log.txt"
|
|
|
|
testnet-configure: clean
|
|
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug
|
|
|
|
testnet-build: testnet-configure
|
|
ninja clean
|
|
ninja
|
|
|
|
testnet: testnet-build
|
|
mkdir -p $(TESTNET_ROOT)
|
|
python3 contrib/testnet/genconf.py --bin=$(REPO)/llarpd --svc=30 --clients=300 --dir=$(TESTNET_ROOT) --out $(TESTNET_CONF)
|
|
supervisord -n -d $(TESTNET_ROOT) -l $(TESTNET_LOG) -c $(TESTNET_CONF)
|
|
|
|
format:
|
|
clang-format -i $$(find daemon llarp include | grep -E '\.[h,c](pp)?$$')
|