diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2022-01-18 21:13:43 +0100 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2022-01-18 21:13:43 +0100 |
commit | 860043941f1949e9cae7d6a4fce908f0d2726b86 (patch) | |
tree | ce88b3f25154a9f5062d45d3f3019c6ba803f489 /Makefile | |
parent | dela (diff) | |
download | dnsfind-8b98aa16d2ce79dfffcfe436792b13a2228214cd.tar dnsfind-8b98aa16d2ce79dfffcfe436792b13a2228214cd.tar.gz dnsfind-8b98aa16d2ce79dfffcfe436792b13a2228214cd.tar.bz2 dnsfind-8b98aa16d2ce79dfffcfe436792b13a2228214cd.tar.lz dnsfind-8b98aa16d2ce79dfffcfe436792b13a2228214cd.tar.xz dnsfind-8b98aa16d2ce79dfffcfe436792b13a2228214cd.tar.zst dnsfind-8b98aa16d2ce79dfffcfe436792b13a2228214cd.zip |
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..13eba26 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +DESTDIR=/ +SRCFILE=main.c +O=0 +CFLAGS += -Wextra -Wall -pedantic -g -O$O -I. -odnsfind -finput-charset=UTF-8 -fextended-identifiers +LIBS += +CC=cc +VGARGS += --leak-check=full --track-origins=yes --verbose --log-file=valgrind-out.txt --suppressions=/usr/lib/i386-linux-gnu/valgrind/default.supp --show-leak-kinds=all --leak-resolution=high + +.NOTPARALLEL: +default: + $(CC) $(CFLAGS) $(SRCFILE) $(LIBS) + +# tests if code compiles under gcc, clang and tcc +cc: + make -e CC=tcc + make -e CC=gcc + make -e CC=clang + +install: + mkdir -p $(DESTDIR)/usr/bin/ + cp dnsfind $(DESTDIR)/usr/bin/ + +distclean: + rm dnsfind -f + +clean: + rm dnsfind -f + +prepare: + apt install build-essential-y + +# developing is to be done on i386. for example the default suppression file is hardcoded for i386 here: +# developing is to be done on bullseye. + +valgrind: + G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind $(VGARGS) ./dnsfind |