include /src/Configfile

.SUFFIXES:	.sm4 .s .o

.sm4.o:
		$(M4) $< >$*.s
		tas $*.s
		rm -f $*.s

.sm4.s:
		$(M4) $< >$*.s

.o:		$(LIBDIR)/rt0.o $(LIBDIR)/libiserver.a $(LIBDIR)/rt1.o
		tld -b -o $@ $(LIBDIR)/rt0.o $< $(LIBDIR)/libiserver.a $(LIBDIR)/rt1.o

PRGS=		tperf blink memtest passlink tlinkcheck

all:		$(PRGS)

memtest:	$(LIBDIR)/rt0_small.o memtest.o $(LIBDIR)/libiserver.a $(LIBDIR)/rt1.o
		tld -b -o $@ $(LIBDIR)/rt0_small.o memtest.o $(LIBDIR)/libiserver.a $(LIBDIR)/rt1.o

tlinkcheck:	$(LIBDIR)/rt0_small.o tlinkcheck.o $(LIBDIR)/rt1.o
		tld -b -o $@ $(LIBDIR)/rt0_small.o tlinkcheck.o $(LIBDIR)/rt1.o

tperf:		$(LIBDIR)/rt0_small.o tperf.o $(LIBDIR)/rt1.o
		tld -b -o $@ $(LIBDIR)/rt0_small.o tperf.o $(LIBDIR)/rt1.o

install:	all
		install -c $(PRGS) $(BINTDIR)

depend:

clean:
		rm -f *.o

clobber:	clean
		rm -f core $(PRGS)
