CC = gcc
#CC = cc

RM = rm

INSTALL = /usr/bin/install

# C compiler options
CFLAGS = -g

# Libraries to be included
LIBS = -ltermcap

# The directory you want to install shokdial in
INSTALL_PREFIX = /usr/local/bin

OBJECTS = clear.o errors.o shokdial.o strip.o validate.o

# Defines..
# options:
#  BEEP (beep when certain conditions occur)
DEFS = -DBEEP

#---------------------------------

all: shokdial

.c.o:
	$(CC) $(DEFS) $(CFLAGS) -c $<

shokdial: $(OBJECTS)
	@echo Now compiling...ShokDial! w00w00!
	$(CC) $(DEFS) $(CFLAGS) -o shokdial $(OBJECTS) $(LIBS)

install:
	@echo Installing ShokDial.
	$(INSTALL) -s -m 755 shokdial $(INSTALL_PREFIX)/shokdial
	@echo Enjoy! =)
clean:
	@echo Removing ShokDial from current directory
	$(RM) -f shokdial $(OBJECTS) core
