summaryrefslogtreecommitdiffstats
path: root/makefile
blob: 59ee3d1c97659f0793c2257d28dbb2dff6fff3c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
DESTDIR=/
CC=cc

default:
	mkdir -p tmp
	# -fsanitize-address
	$(CC) -Wall -Wextra -Wformat -pedantic -g -Isrc -Itmp -Itiny-AES-c $(CFLAGS) src/main.c -otravnik -lm -lresolv $(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