#
# This file is part of Gspoof-3 (a console/gtk+ tcp/ip packet forger)
#  
#  $Name: Makefile.in $
#  $Version: 3.2 $
#  $Date: 2003/12/22 16:30:03 $
#  $Author: Embyte <embyte@madlab.it> $
#  $Copyright: Copyright (C) 2002-2003 by embyte $
#  $License: This software is under GPL version 2 of license $
# 
 

CC          = @CC@
CFLAGS      = -Wall -O2 
LDFLAGS     = @LDFLAGS@
CPPFLAGS    = @CPPFLAGS@
GTK_LIBS    = @GTK_LIBS@
GTK_CFLAGS  = @GTK_CFLAGS@

prefix      = @prefix@
exec_prefix = @exec_prefix@
bindir      = @bindir@
mandir      = @mandir@
datadir     = @datadir@
srcdir      = @srcdir@
shtool      = @SHTOOL@

OBJS = main.o console.o common.o @GTKOBJS@ 


all:	gspoof	
	
 
gspoof:	$(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o gspoof -lnet $(GTK_LIBS)
	@echo
	@echo "Done! Type 'make install' (This operation could require root privileges)"
	@echo


.c.o:
	$(CC) $(CFLAGS) $(CPPFLAGS) $(GTK_CFLAGS) -c $< -o $@


install:
	chown root:wheel gspoof
	cp -f gspoof @bindir@
	rm -fR @datadir@/gspoof
	mkdir @datadir@/gspoof
	cp -f *.c @datadir@/gspoof 
	cp -f *.h @datadir@/gspoof
	cp -fR pixmap @datadir@/gspoof
	cp -f Makefile @datadir@/gspoof
	cp -f README @datadir@/gspoof
	cp -f CHANGELOG @datadir@/gspoof
	cp -f TODO @datadir@/gspoof
	cp -f LICENSE @datadir@/gspoof
	cp -f VERSION @datadir@/gspoof
	@echo
	@echo "Try 'gspoof -h' from root, enjoy!"
	@echo
	@echo "(If something goes wrong send an email to embyte@madlab.it)"
	@echo
	
	
clean:
	rm -fR *~ *.bak *.o *.cache *.log gspoof config.status stamp-h*
	@echo
	@echo "Trash file cleaned"
	@echo "You may want to try 'make distclean' to uninstall Gspoof from system"
	@echo


distclean:
	rm -f config.h Makefile
	rm -f @bindir@/gspoof
	rm -fR @datadir@/gspoof
	@echo
	@echo "You box is clean"
	@echo


version:
	@echo
	@cat VERSION
	@echo

world:	gspoof install
	

help:
	@echo
	@echo "Accepted commands for Makefile:"
	@echo "make		Compile Gspoof"
	@echo "make install	Install Gspoof to @bindir@ and @datadir@"
	@echo "make world	Compile and install"	
	@echo "make clean	Clean trash files from source directory (this)"
	@echo "make distclean	Uninstall Gspoof from system"
	@echo "make version	Show Gspoof version"
	@echo "make help	Show this help"	
	@echo


syntax highlighted by Code2HTML, v. 0.9.1