CFLAGS = -O

# comment out next line if you have getopt() in your library
GETOPT = getopt.o

# comment out next line if you have efopen() in your library
EFOPEN = efopen.o

# comment out next line if you have fgetsmod() in your library
FGETSMOD = fgetsmod.o

SRC = fmtr.c command.c lowtext.c efopen.c getopt.c fgetsmod.c
OBJ = fmtr.o command.o lowtext.o $(EFOPEN) $(GETOPT) $(FGETSMOD)

# You may wish to modify either or both of the following:
BINDIR = /usr/local
MANDIR = /usr/man/man1

fmtr:	$(OBJ)
	cc $(CFLAGS) -s -o fmtr $(OBJ)

fmtr.o command.o lowtext.o:	fmtr.h

install:	fmtr fmtr.1h
	cp -c fmtr $(BINDIR)
	cp -c fmtr.1h $(MANDIR)

shar:
	shar -a README Makefile $(SRC) fmtr.h fmtr.1 efopen.3s \
	fgetsmod.3s getopt.3 > fmtr.shar

clean:
	/bin/rm -f *.o a.out core fmtr fmtr.shar
