SHELL = /bin/sh

# This is where the program and its manpage are installed.
BIN_PATH = /usr/local/bin
MAN_PATH = /usr/local/man/man1
MANEXT = 1

CC = gcc
INSTALL = install -c

CFLAGS = -ansi -N -O2

DISTFILES = line.c line.man Makefile INSTALL line-1.2.lsm LICENSE
DISTRIBUTION = line-1.2


all: line

line: line.o
	$(CC) line.o -o line

line.o: line.c

install:
	$(INSTALL) -s -g bin -m 0755 -o root line $(BIN_PATH)
	$(INSTALL) -g root -m 0644 -o root line.man $(MAN_PATH)/line.$(MANEXT)

uninstall:
	-rm -f $(BIN_PATH)/line $(MAN_PATH)/line.$(MANEXT)

clean:
	-rm -f line.o line core

realclean:
	-rm -f line.o line core

distclean:
	-rm -f line.o line core

dist:
	(mkdir line-1.2 ; \
	cp $(DISTFILES) $(DISTRIBUTION) ; \
	tar cf $(DISTRIBUTION).tar $(DISTRIBUTION) ; \
        rm -fr line-1.2)

