#sccs	"@(#)doccmd:Makefile	1.2"
#	Makefile for Commands 9/25/84

include $(MAKEINC)/Makepre.h

UBINFILES=\
300\
300s\
4014\
450\
checkcw\
checkeq\
col\
cw\
deroff\
diffmk\
hyphen\
hp\
newform\
tabs\
tc

DEPENDLIST=\
300.c\
300s.c\
4014.c\
450.c\
checkcw.c\
checkeq.c\
col.c\
cw.c\
deroff.c\
hyphen.c\
hp.c\
newform.c\
ptx.c\
tabs.c\
tc.c

ID = id.o

all:	Makeincludes $(ID) $(UBINFILES) ptx eign

Makeincludes: $(DEPENDLIST)
	$(INCCMD) $(DEPENDLIST) | $(SORT) | $(FILTER) > Makeincludes
	$(MAKE)

includes: $(DEPENDLIST)
	$(INCCMD) $(DEPENDLIST) | $(SORT) | $(FILTER) > Makeincludes

eign: eign.n
	cp eign.n eign

install:
	@for i in eign $(UBINFILES); do echo installing $$i...; \
	$(INSTALL) -i$(EXITFLAG) $$i $(INSDIR) $(PROTOFILE); done
	$(INSTALL) -i$(EXITFLAG) ptx%/usr/bin $(INSDIR) $(PROTOFILE)

clean:  
	rm -f *.o

clobber:	clean
	rm -f $(UBINFILES) ptx eign

id.c: doccmd.sl
	mkslid > id.c

populate:
	getunit

include Makeincludes
include $(MAKEINC)/Makepost.h


#	For shared libs
.c:
	$(CC) -c $(CFLAGS) $<
	$(LD) -s $(LDFLAGS) $(SHAREDLIB) $*.o $(ID) -o $*
	rm -f $*.o
