summaryrefslogblamecommitdiffstats
path: root/Makefile
blob: 2e360746f95b1631dfa739e011e376c8fe5a5a9f (plain) (tree)




























                                                                                                                                                                                               
                                      
 
                                   



                                                                              
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.
# developing is to be done on bullseye.

valgrind:
	G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind $(VGARGS) ./dnsfind