#
# Makefile for ArpHound
#
# Copyright (C) 2002-2003 Matthieu Nottale
# 
# $Id: Makefile,v 1.5 2003/10/02 00:53:59 cos Exp $
include Makefile.common

default: arphound

binary: Makefile src/Makefile shared/Makefile
	@cd src && make
	@cd shared && make

arphound: binary 
	$(CPP) -g -o arphound $(OBJ_SRC:%=src/%.o) $(OBJ_SHARED:%=shared/%.o) -lpcap -lpthread

install:
	@echo -n "Installing ArpHound... "
	@cd docs && make install
	@$(INSTALL) arphound $(SBINDIR)/arphound
	@$(INSTALL) scripts/arphound.init $(INITDIR)/arphound
	@$(INSTALL) arphound.conf.sample $(ETCDIR)/arphound.conf
	@echo "done."

uninstall:
	@echo -n "Removing ArpHound... "
	@cd docs && make uninstall
	@$(RM) $(SBINDIR)/arphound
	@$(RM) $(INITDIR)/arphound
	@$(RM) $(ETCDIR)/arphound.conf
	@echo "done."

clean:
	@cd src && make clean
	@cd shared && make clean

mrproper: clean
	rm -f arphound

