# Makefile for the pingtunnel utility # (c) 2004-2005 Daniel Stødle, daniels@stud.cs.uit.no CFLAGS = -Wall -g LDOPTS = -pthread -lpcap PT_OBJS = ptunnel.o md5.o prefix = /usr bindir = $(prefix)/bin mandir = $(prefix)/share/man/man8 all: ptunnel dist: rm -rf PingTunnel/ mkdir PingTunnel cp ptunnel.c ptunnel.h Makefile.dist PingTunnel/ mv PingTunnel/Makefile.dist PingTunnel/Makefile install: ptunnel install -d $(bindir)/ install -d $(mandir)/ install ./ptunnel $(bindir)/ptunnel install ./ptunnel.8 $(mandir)/ptunnel.8 ptunnel: $(PT_OBJS) $(CC) -o $@ $^ $(LDOPTS) clean: rm -f *.o ptunnel rm -f .depend depend: .depend .depend: $(CC) $(CFLAGS) -MM *.c > $@ %.o:%.c $(CC) $(CFLAGS) -c -o $@ $< -include .depend