#sccs	"@(#)macros:Makefile	1.1"
#	text Development Support Library (DSL) macros make file

TMACFILES = tmac.an tmac.m tmac.org tmac.ptx tmac.osd tmac.v
INSFILES = an cmp.n.d.an cmp.n.d.m cmp.n.t.an cmp.n.t.m mmn \
           vmca ucmp.n.an ucmp.n.m
DEPENDLIST = ntar.c
ID = id.o
include $(MAKEINC)/Makepre.h

all:	Makeincludes ntar mmn vmca osdd man tmac ptx

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

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

ntar:	ntar.c $(ID)
	${CC} ${IFLAG} -O -s -o ntar ntar.c $(ID)

mmn:	ntar
	sh ./macrunch -n m ${MINS} -d ${OL}usr mmn

mmt:	ntar
	sh ./macrunch -t m ${MINS} -d ${OL}usr mmt

vmca:	ntar
	sh ./macrunch ${MINS} -d ${OL}usr vmca

org:	ntar
	sh ./macrunch ${MINS} -d ${OL}usr org

osdd:	ntar
	sh ./macrunch ${MINS} -d ${OL}usr osdd

man:	ntar
	sh ./macrunch -n an ${MINS} -d ${OL}usr an
#	sh ./macrunch -t an ${MINS} -d ${OL}usr an

ptx:	ntar
	sh ./macrunch ${MINS} -d ${OL}usr ptx

tmac:

build:  bldmk bldntar bldmmn bldmmt bldvmca bldosdd bldman bldtmac \
		bldmacr bldptx
	
install: 
	@for I in $(INSFILES) $(TMACFILES); do echo installing $$I...; \
		$(INSTALL) -i$(EXITFLAG) $$I $(INSDIR) $(PROTOFILE); done
	$(INSTALL) -i$(EXITFLAG) ptx%/usr/lib/macros $(INSDIR) $(PROTOFILE)
	$(INSTALL) -i$(EXITFLAG) osdd%/usr/lib/macros $(INSDIR) $(PROTOFILE)

clean:
	rm -f mmn mmt vmca org osdd an

clobber: clean
	rm -f ntar

id.c: macros.sl
	mkslid > id.c

populate:
	getunit

include Makeincludes
include $(MAKEINC)/Makepost.h
