wm: dnsparser

ref: ba2943ae190fdc67a3f9ce5e1668eda51e3f64b1
dir: /Makefile/

View raw version
CC=cc
CFLAGS += -O0 -g -Wall -lpcap -Wno-pointer-sign
NROFF=mandoc

Lib=\
	common.o\
	ether.o\
	pkt.o\
	udp.o\
	tcp.o\
	dns.o\
	tls.o\

DnsParser=	dnsparser.o
TlsParser=	tlsparser.o

all:
	@echo 'make dnsparser, tlsparser, tests or docs'

%.o: %.c %.h
	$(CC) $(CFLAGS) -c $< -o $@

tests: ${Lib} dnsparser tlsparser
	tests/tests.sh

dnsparser: ${Lib} ${DnsParser}
	$(CC) $(CFLAGS) -o $@ ${DnsParser} ${Lib}

tlsparser: ${Lib} ${TlsParser}
	$(CC) $(CFLAGS) -o $@ ${TlsParser} ${Lib}

docs:
	$(NROFF) doc/parser.man | col -b > docs/parser.txt
	
clean:
	rm -f *.o dnsparser tlsparser docs/