# Makefile for tp, itp and dtp
#
# If your machine is big endian, uncomment the next line
#END= -DBIG_ENDIAN

CC= gcc
CFLAGS= -Wall $(END)
BINDIR=/usr/local/bin
MANDIR=/usr/local/man/man1

all: tp dtp itp

tp: tp.c
	$(CC) -o tp $(CFLAGS) tp.c

itp: itp.c
	$(CC) -o itp $(CFLAGS) itp.c

dtp: dtp.c
	$(CC) -o dtp $(CFLAGS) dtp.c

install: tp dtp itp tp.1 itp.1 dtp.1
	install -m 755 -o bin -g bin tp itp dtp $(BINDIR)
	install -c -m 644 -o bin -g bin tp.1 itp.1 dtp.1 $(MANDIR)

clean:
	rm -f tp itp dtp *.o
