# Where to put binary and manual
IPATH = /usr/local

# The name of the installed binary and manual, use 'ile' or 'lile'
NAME = ile

# Linker flags
LDFLAGS = -ltermcap

# Compiler and its flags
CC = gcc -O6

# Install command
INSTALL = install -c

# Remove a file if it exists
RM = rm -f

ile:	ile.c config.h
	$(CC) -o ile ile.c $(LDFLAGS)

install: ile
	$(INSTALL) -s -m 755 ile $(IPATH)/bin/$(NAME)
	$(INSTALL) -m 644 ile.1 $(IPATH)/man/man1/$(NAME).1

test:
	./ile telnet 131.159.8.67 2000

clean:
	$(RM) core ile

deinstall:
	$(RM) $(IPATH)/bin/$(NAME)
	$(RM) $(IPATH)/man/man1/$(NAME).1 $(IPATH)/man/cat1/$(NAME).*
