# Generated automatically from Makefile.in by configure.
#
# Makefile for arpspoof and macof 
#
# Dug Song <dugsong@monkey.org>
# Weiming Lai <weiminglai@hotmail.com>
#
# $Id: Makefile,v 1.2 2005/03/07 04:55:04 weiming_lai Exp $

srcdir          = ./src
VPATH           = ./src

install_prefix  =
prefix          = /usr/local
exec_prefix	= ${prefix}
libdir		= ${exec_prefix}/lib
sbindir         = ${exec_prefix}/sbin
mandir		= ${prefix}/man

CC	= gcc
CFLAGS	= -g -O2 -D_BSD_SOURCE  
LDFLAGS	= 

PCAPINC = 
PCAPLIB = -lpcap

LNETINC = 
LNETLIB = -lnet

OBJ_DIR = ./obj
SRC_DIR = ./src

INCS	= -I. $(PCAPINC) $(LNETINC)

INSTALL	= /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA	= ${INSTALL} -m 644

PROGS	= arpspoof macof

CLEAN_FILES   = $(OBJ_DIR)/*.o *~ core $(PROG)

ARPSPOOF_OBJS = $(OBJ_DIR)/arp.o       \
                $(OBJ_DIR)/find_neigh_mac.o  \
                $(OBJ_DIR)/libnet_helper.o   \
                $(OBJ_DIR)/ip6_ndar.o        \
                $(OBJ_DIR)/arpspoof.o
                                                                                
MACOF_OBJS = $(OBJ_DIR)/macof.o        \
             $(OBJ_DIR)/libnet_helper.o

$(OBJ_DIR)/%.o : $(SRC_DIR)/%.c
	$(CC) $(INCS) $(CFLAGS) -c -o $@ $<

all: $(PROGS)

arpspoof: $(ARPSPOOF_OBJS) 
	$(CC) $(LDFLAGS) -o $@ $(ARPSPOOF_OBJS) $(PCAPLIB) $(LNETLIB)

macof: $(MACOF_OBJS)
	$(CC) $(LDFLAGS) -o $@ $(MACOF_OBJS)  $(PCAPLIB) $(LNETLIB)

install:
	test -d $(install_prefix)$(sbindir) || \
	   $(INSTALL) -d $(install_prefix)$(sbindir)
	for file in $(PROGS); do \
	   $(INSTALL_PROGRAM) -m 755 $$file $(install_prefix)$(sbindir); \
	done
	test -d $(install_prefix)$(mandir)/man8 || \
	   $(INSTALL) -d $(install_prefix)$(mandir)/man8
	for file in *.8; do \
	   $(INSTALL_DATA) $$file $(install_prefix)$(mandir)/man8; \
	done

clean:
	rm -f $(CLEAN_FILES) 

distclean: clean
	rm -f Makefile config.h config.cache config.log config.status

# EOF
