2018-05-16 17:59:24 +02:00
|
|
|
|
2018-05-27 18:45:04 +02:00
|
|
|
all: debug
|
2018-05-16 18:41:20 +02:00
|
|
|
|
2018-05-28 15:49:44 +02:00
|
|
|
SIGN = gpg --sign --detach
|
|
|
|
|
|
|
|
TARGETS = llarpd libllarp.so libllarp-static.a
|
|
|
|
SIGS = $(TARGETS:=.sig)
|
|
|
|
|
2018-05-27 18:45:04 +02:00
|
|
|
clean:
|
2018-05-21 16:28:15 +02:00
|
|
|
rm -f build.ninja rules.ninja cmake_install.cmake CMakeCache.txt
|
|
|
|
rm -rf CMakeFiles
|
2018-05-28 15:49:44 +02:00
|
|
|
rm -f $(TARGETS)
|
|
|
|
rm -f *.sig
|
2018-05-16 17:59:24 +02:00
|
|
|
|
2018-05-27 18:45:04 +02:00
|
|
|
debug-configure: clean
|
|
|
|
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DASAN=true
|
2018-05-16 17:59:24 +02:00
|
|
|
|
2018-05-28 15:49:44 +02:00
|
|
|
release-configure: clean
|
|
|
|
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DRELEASE_MOTTO="$(shell cat motto.txt)"
|
|
|
|
|
2018-05-27 18:45:04 +02:00
|
|
|
configure: clean
|
2018-05-28 15:49:44 +02:00
|
|
|
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug
|
2018-05-16 17:59:24 +02:00
|
|
|
|
2018-05-28 15:49:44 +02:00
|
|
|
build: configure
|
2018-05-27 18:45:04 +02:00
|
|
|
ninja
|
|
|
|
|
|
|
|
debug: debug-configure
|
2018-05-16 17:57:16 +02:00
|
|
|
ninja
|
2018-05-21 16:28:15 +02:00
|
|
|
|
2018-05-28 15:49:44 +02:00
|
|
|
release-compile: release-configure
|
|
|
|
ninja
|
|
|
|
strip $(TARGETS)
|
|
|
|
|
|
|
|
$(TARGETS): release-compile
|
|
|
|
|
|
|
|
%.sig: $(TARGETS)
|
|
|
|
$(SIGN) $*
|
|
|
|
|
|
|
|
release: $(SIGS)
|
|
|
|
|
2018-05-21 16:28:15 +02:00
|
|
|
format:
|
2018-05-21 16:31:52 +02:00
|
|
|
clang-format -i $$(find daemon llarp include | grep -E '\.[h,c](pp)?$$')
|