#sccs	"@(#)doccmd:Makefile	"
#	Makefile for Commands 

include $(MAKEINC)/Makepre.h

UBINFILES=\
300\
300s\
4014\
450\
checkcw\
cw\
hp\
newform\
tabs

DEPENDLIST=\
300.c\
300s.c\
4014.c\
450.c\
checkcw.c\
cw.c\
hp.c\
newform.c\
ptx.c\
tabs.c

ID = id.o

all:	Makeincludes $(ID) $(UBINFILES)

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

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

install:
	@for i in $(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)

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
