PRGS=b.out
BINS=crtsun.b arp.b gw.b gwasm.b il.b lap.b pbuf.b
SRCS=Makefile README *.h *.c *.s *.ms *.hard *.rfc 
SRCS2=ddt/* dlq/* testscc/* tftp/*
.SUFFIXES: .b

.c.b:
	cc68 -c $<

.s.b:
	cc68 -c $<

all:	$(PRGS)

b.out:	$(BINS)
	ld68 -T 4000 -q -X $(BINS) -lddt -lc -x

# a few of the obvious dependencies.  almost everyone depends on gw.h,
# but we don't list it to avoid recompiling the world on every little
# addition.  I assume you will 'touch' or edit the appropriate files...

il.b:	il.h
lap.b:	lap.h lapref.s gwasm.h
gwasm.b: gwasm.h
pbuf.b:	pbuf.h

clean:
	-rm *.b b.out
	(cd ddt; make clean)
	(cd dlq; make clean)
	(cd testscc; make clean)

nm:
	nm68 -n -h b.out | imprint -P -3 -2 -O -f | lpr

back:
	-mkdir /dump/a/gw
	cp M* R* *.h *.c *.s *.ms *.hard /dump/a/gw

shar:
	shar $(SRCS) $(SRCS2) >zshar
	
shar2:
	shar $(SRCS) >zshar1
	shar $(SRCS2) >zshar2

sum:
	sum $(SRCS) $(SRCS2) > zsum

sharmail:
	sharmkdir $(SRCS) $(SRCS2)

	
