#/************************************************************************
#*   KTAB - Keith program TABing, Makefile
#*   Copyright (C) 1998 Keith Fralick
#*
#*   This program is free software; you can redistribute it and/or modify
#*   it under the terms of the GNU General Public License as published by
#*   the Free Software Foundation; either version 1, or (at your option)
#*   any later version.
#*
#*   This program is distributed in the hope that it will be useful,
#*   but WITHOUT ANY WARRANTY; without even the implied warranty of
#*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#*   GNU General Public License for more details.
#*
#*   You should have received a copy of the GNU General Public License
#*   along with this program; if not, write to the Free Software
#*   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#*/

CP=/bin/cp
MV=/bin/mv
RM=/bin/rm
VERSION=0.4.0
SRC=src
CC=cc
INCLUDE=../include
BIN=ktab
FLAGS=
INSTALL=/bin
MAN=ktab.1
PAGE=/usr/man/man1

all:	build

build:
	@cd $(SRC);\
	clear ;\
	echo "KTAB Makefile $(VERSION)" ;\
	echo "" ;\
	echo "creating binary" ;\
	$(CC) -I$(INCLUDE) $(FLAGS) ktab.c -o $(BIN) ;\
	echo "binary is created" ;\
	echo "moving to main directory" ;\
	$(MV) $(BIN) ../$(BIN) ;\
	echo "I'm done!  I hope you were errorless!" 

clean:
	@cd $(SRC);\
	echo "Cleaning everything up *sigh*" ;\
	$(RM) -f *.o ktab ;\
	cd .. ;\
	$(RM) -f ktab ;\
	echo "I'm done" 
	
install:
	@echo "Installing KTAB" ;\
	$(CP) $(BIN) $(INSTALL)/$(BIN) ;\
	cd doc ;\
	$(CP) $(MAN) $(PAGE)/$(MAN)
