blob: aba35cdedc37517b9d169e5d4f33f928e5d0d979 (
plain) (
tree)
|
|
DESTDIR=/
CC=cc
MYCFLAGS=-Wall -Wextra -Wformat -pedantic -g -Isrc -Itmp -Itiny-AES-c
MYLDFLAGS=-lresolv
default:
mkdir -p tmp
# -fsanitize-address
$(CC) $(MYCFLAGS) $(CFLAGS) src/main.c -otravnik $(MYLDFLAGS) $(LDFLAGS)
utils:
$(CC) $(MYCFLAGS) $(CFLAGS) utils/midpoint.c -otmp/midpoint $(MYLDFLAGS) $(LDFLAGS)
$(CC) $(MYCFLAGS) $(CFLAGS) utils/bencoding.c -otmp/bencoding $(MYLDFLAGS) $(LDFLAGS)
$(CC) $(MYCFLAGS) $(CFLAGS) utils/dns.c -otmp/dns $(MYLDFLAGS) $(LDFLAGS)
install:
mkdir -p $(DESTDIR)/usr/bin/
cp travnik $(DESTDIR)/usr/bin/
distclean: clean
clean:
rm -rf travnik tmp test-eval
prepare:
sudo apt install libmicrohttpd-dev build-essential default-libmysqlclient-dev -y
valgrind:
valgrind --error-exitcode=59 --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt $(CMD)
.PHONY: default install distclean clean prepare valgrind utils
|