##############################################################################
#
#                         occam2.lib makefile
#
#                     occam2 toolset; 16-Nov-90 SRH
#
#                  This makefile is set up for UNIX.
#
##############################################################################


# UNIX specific macros
SWITCH=-
RENAME=mv
DELETE=rm


# for the flexibility to pass something in from the command line 
OCCEXTRAS=

# tools and global options
PREPROCESSOR=preocc
PREOPT=$(SWITCH)d OCCAM $(SWITCH)d T2
LIBRARIAN=ilibr
LIBOPT=
OCCAM=oc
OCCOPT=$(SWITCH)d $(SWITCH)v $(SWITCH)t2 $(OCCEXTRAS)


TARGETLIB=occam2.lib


# the files in USEUTL all #USE occamutl.lib; they are mentioned here
# for reference
USEUTL=		r32op.t2h    r32operr.t2h ie32op.t2h  \
		r32rem.t2h   r32remer.t2h ie32rem.t2h \
		r64op.t2h    r64operr.t2h ie64op.t2h  \
		r64rem.t2h   r64remer.t2h ie64rem.t2h \
		r64toi16.t2h rargred.t2h  dargred.t2h    \
		r32op.t2x    r32operr.t2x ie32op.t2x  \
		r32rem.t2x   r32remer.t2x ie32rem.t2x \
		r64op.t2x    r64operr.t2x ie64op.t2x  \
		r64rem.t2x   r64remer.t2x ie64rem.t2x \
		r64toi16.t2x rargred.t2x  dargred.t2x


#T2 integer files
INTT2H= 	i32mul.t2h   i32divrm.t2h                           \
		i64add.t2h   i64plus.t2h  i64sub.t2h   i64minus.t2h \
		i64mul.t2h   i64times.t2h i64divrm.t2h              \
		i64eq.t2h    i64gt.t2h    i64lshft.t2h i64rshft.t2h \
		i64band.t2h  i64bor.t2h   i64xor.t2h   i64bnot.t2h  \
		i16toi64.t2h i32toi64.t2h i64toi16.t2h i64toi32.t2h

INTT2X= 	i32mul.t2x   i32divrm.t2x                           \
		i64add.t2x   i64plus.t2x  i64sub.t2x   i64minus.t2x \
		i64mul.t2x   i64times.t2x i64divrm.t2x              \
		i64eq.t2x    i64gt.t2x    i64lshft.t2x i64rshft.t2x \
		i64band.t2x  i64bor.t2x   i64xor.t2x   i64bnot.t2x  \
		i16toi64.t2x i32toi64.t2x i64toi16.t2x i64toi32.t2x

#T2 graphics files
GRAPHT2H=	draw2d.t2h clip2d.t2h move2d.t2h
GRAPHT2X=	draw2d.t2x clip2d.t2x move2d.t2x

#T2 bit manipulation files
BITT2H= 	bitcount.t2h crcword.t2h crcbyte.t2h brevnbit.t2h brevword.t2h
BITT2X= 	bitcount.t2x crcword.t2x crcbyte.t2x brevnbit.t2x brevword.t2x

#T2 REAL functions
REALT2H=	r32operr.t2h r32op.t2h    ie32op.t2h                \
		r32remer.t2h r32rem.t2h   ie32rem.t2h               \
		r32eqerr.t2h r32gterr.t2h r32eq.t2h    r32gt.t2h    \
		r64operr.t2h r64op.t2h    ie64op.t2h                \
		r64remer.t2h r64rem.t2h   ie64rem.t2h               \
		r64eqerr.t2h r64gterr.t2h r64eq.t2h    r64gt.t2h    \
		r32toi16.t2h i16tor32.t2h r32toi32.t2h i32tor32.t2h \
		r32toi64.t2h i64tor32.t2h r64tor32.t2h r32tor64.t2h \
		r64toi16.t2h i16tor64.t2h r64toi32.t2h i32tor64.t2h \
		r64toi64.t2h i64tor64.t2h                           \
		rnotfnte.t2h rfunpack.t2h rminusx.t2h  rcpysign.t2h \
		rnxtaftr.t2h rsqrt.t2h                              \
		dnotfnte.t2h dfunpack.t2h dminusx.t2h  dcpysign.t2h \
		dnxtaftr.t2h dsqrt.t2h                              \
		rabsfint.t2h ranalyse.t2h rscaleb.t2h  rargred.t2h  \
		rmulby2.t2h  rdivby2.t2h  rlogb.t2h    ie32comp.t2h \
		dabsfint.t2h danalyse.t2h dscaleb.t2h  dargred.t2h  \
		dmulby2.t2h  ddivby2.t2h  dlogb.t2h    ie64comp.t2h \
		fracmul.t2h

REALT2X=	r32operr.t2x r32op.t2x    ie32op.t2x                \
		r32remer.t2x r32rem.t2x   ie32rem.t2x               \
		r32eqerr.t2x r32gterr.t2x r32eq.t2x    r32gt.t2x    \
		r64operr.t2x r64op.t2x    ie64op.t2x                \
		r64remer.t2x r64rem.t2x   ie64rem.t2x               \
		r64eqerr.t2x r64gterr.t2x r64eq.t2x    r64gt.t2x    \
		r32toi16.t2x i16tor32.t2x r32toi32.t2x i32tor32.t2x \
		r32toi64.t2x i64tor32.t2x r64tor32.t2x r32tor64.t2x \
		r64toi16.t2x i16tor64.t2x r64toi32.t2x i32tor64.t2x \
		r64toi64.t2x i64tor64.t2x                           \
		rnotfnte.t2x rfunpack.t2x rminusx.t2x  rcpysign.t2x \
		rnxtaftr.t2x rsqrt.t2x                              \
		dnotfnte.t2x dfunpack.t2x dminusx.t2x  dcpysign.t2x \
		dnxtaftr.t2x dsqrt.t2x                              \
		rabsfint.t2x ranalyse.t2x rscaleb.t2x  rargred.t2x  \
		rmulby2.t2x  rdivby2.t2x  rlogb.t2x    ie32comp.t2x \
		dabsfint.t2x danalyse.t2x dscaleb.t2x  dargred.t2x  \
		dmulby2.t2x  ddivby2.t2x  dlogb.t2x    ie64comp.t2x \
		fracmul.t2x

#---------------------------------- Rules -------------------------------------

# Force the whole library to be made
all:		$(TARGETLIB)

$(TARGETLIB): occam2.lbb $(INTT2H) $(GRAPHT2H) $(BITT2H) $(REALT2H) \
	    $(INTT2X) $(GRAPHT2X) $(BITT2X) $(REALT2X)
	$(LIBRARIAN) $(LIBOPT) $(SWITCH)f occam2.lbb $(SWITCH)o $(TARGETLIB)

# pattern matching rules
# an explicit rule is chosen in preference to a pattern matching one
# $< is a dynamic macro meaning the name of the dependency file;
# $* is a dynamic macro meaning the base name of the current target
%.t2h: %.occ
	$(PREPROCESSOR) $< $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $*.p2h
	$(OCCAM) $*.p2h $(SWITCH)h $(OCCOPT) $(SWITCH)o $*.t2h
	$(DELETE) $*.p2h

%.t2x: %.occ
	$(PREPROCESSOR) $< $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $*.p2x
	$(OCCAM) $*.p2x $(SWITCH)x $(OCCOPT) $(SWITCH)o $*.t2x
	$(DELETE) $*.p2x


#--------------------------- files with dependencies ---------------------------
#
# We are booting ourselves up here - we have to create the target library with
# what we know will be required from it by the compiler in order that the
# target file may be compiled.  We delete the target library after each use of
# it so that it is only in existence when we want it to be and ensures that
# nothing goes on behind our backs.
#
# $@ is a dynamic macro which means the current target
# $(@:.t2h=.p2h) is a macro which means replace the suffix of the target
# ( .t2h ) by the new suffix .p2h;  we use this rather than $* because 
# $* is really only meant for use in pattern matching rules or suffix rules,
# and gives strange results in explicit rules.

# now for halt mode of files that are related to single precision reals

rabsfint.t2h:	r32gterr.t2h i32tor32.t2h r32toi32.t2h rabsfint.occ
	$(LIBRARIAN) $(LIBOPT) r32gterr.t2h i32tor32.t2h r32toi32.t2h $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2h=.occ) $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $(@:.t2h=.p2h)
	$(OCCAM) $(@:.t2h=.p2h) $(SWITCH)h $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2h=.p2h)
	$(DELETE) $(TARGETLIB)

rscaleb.t2h:	r32operr.t2h rscaleb.occ
	$(LIBRARIAN) $(LIBOPT) r32operr.t2h $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2h=.occ) $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $(@:.t2h=.p2h)
	$(OCCAM) $(@:.t2h=.p2h) $(SWITCH)h $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2h=.p2h)
	$(DELETE) $(TARGETLIB)

# rargred.t2h also depends on occamutl.lib
rargred.t2h:	r32operr.t2h i32tor32.t2h rargred.occ
	$(LIBRARIAN) $(LIBOPT) r32operr.t2h i32tor32.t2h $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2h=.occ) $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $(@:.t2h=.p2h)
	$(OCCAM) $(@:.t2h=.p2h) $(SWITCH)h $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2h=.p2h)
	$(DELETE) $(TARGETLIB)

rmulby2.t2h:	r32operr.t2h rmulby2.occ
	$(LIBRARIAN) $(LIBOPT) r32operr.t2h $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2h=.occ) $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $(@:.t2h=.p2h)
	$(OCCAM) $(@:.t2h=.p2h) $(SWITCH)h $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2h=.p2h)
	$(DELETE) $(TARGETLIB)

rdivby2.t2h:	r32operr.t2h rdivby2.occ
	$(LIBRARIAN) $(LIBOPT) r32operr.t2h $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2h=.occ) $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $(@:.t2h=.p2h)
	$(OCCAM) $(@:.t2h=.p2h) $(SWITCH)h $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2h=.p2h)
	$(DELETE) $(TARGETLIB)

rlogb.t2h:	i16tor32.t2h rlogb.occ
	$(LIBRARIAN) $(LIBOPT) i16tor32.t2h $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2h=.occ) $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $(@:.t2h=.p2h)
	$(OCCAM) $(@:.t2h=.p2h) $(SWITCH)h $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2h=.p2h)
	$(DELETE) $(TARGETLIB)

ie32comp.t2h:	r32eq.t2h r32gt.t2h ranalyse.t2h ie32comp.occ
	$(LIBRARIAN) $(LIBOPT) r32eq.t2h r32gt.t2h ranalyse.t2h $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2h=.occ) $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $(@:.t2h=.p2h)
	$(OCCAM) $(@:.t2h=.p2h) $(SWITCH)h $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2h=.p2h)
	$(DELETE) $(TARGETLIB)

# now for universal mode of files that are related to single precision reals

rabsfint.t2x:	r32gterr.t2x i32tor32.t2x r32toi32.t2x rabsfint.occ
	$(LIBRARIAN) $(LIBOPT) r32gterr.t2x i32tor32.t2x r32toi32.t2x $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2x=.occ) $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $(@:.t2x=.p2x)
	$(OCCAM) $(@:.t2x=.p2x) $(SWITCH)x $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2x=.p2x)
	$(DELETE) $(TARGETLIB)

rscaleb.t2x:	r32operr.t2x rscaleb.occ
	$(LIBRARIAN) $(LIBOPT) r32operr.t2x $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2x=.occ) $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $(@:.t2x=.p2x)
	$(OCCAM) $(@:.t2x=.p2x) $(SWITCH)x $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2x=.p2x)
	$(DELETE) $(TARGETLIB)

# rargred.t2x also depends on occamutl.lib
rargred.t2x:	r32operr.t2x i32tor32.t2x rargred.occ
	$(LIBRARIAN) $(LIBOPT) r32operr.t2x i32tor32.t2x $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2x=.occ) $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $(@:.t2x=.p2x)
	$(OCCAM) $(@:.t2x=.p2x) $(SWITCH)x $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2x=.p2x)
	$(DELETE) $(TARGETLIB)

rmulby2.t2x:	r32operr.t2x rmulby2.occ
	$(LIBRARIAN) $(LIBOPT) r32operr.t2x $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2x=.occ) $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $(@:.t2x=.p2x)
	$(OCCAM) $(@:.t2x=.p2x) $(SWITCH)x $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2x=.p2x)
	$(DELETE) $(TARGETLIB)

rdivby2.t2x:	r32operr.t2x rdivby2.occ
	$(LIBRARIAN) $(LIBOPT) r32operr.t2x $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2x=.occ) $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $(@:.t2x=.p2x)
	$(OCCAM) $(@:.t2x=.p2x) $(SWITCH)x $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2x=.p2x)
	$(DELETE) $(TARGETLIB)

rlogb.t2x:	i16tor32.t2x rlogb.occ
	$(LIBRARIAN) $(LIBOPT) i16tor32.t2x $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2x=.occ) $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $(@:.t2x=.p2x)
	$(OCCAM) $(@:.t2x=.p2x) $(SWITCH)x $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2x=.p2x)
	$(DELETE) $(TARGETLIB)

ie32comp.t2x:	r32eq.t2x r32gt.t2x ranalyse.t2x ie32comp.occ
	$(LIBRARIAN) $(LIBOPT) r32eq.t2x r32gt.t2x ranalyse.t2x $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2x=.occ) $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $(@:.t2x=.p2x)
	$(OCCAM) $(@:.t2x=.p2x) $(SWITCH)x $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2x=.p2x)
	$(DELETE) $(TARGETLIB)


# now for halt mode of files that are related to double precision reals

DSQRT2H=	i64bor.t2h   i64band.t2h  i64gt.t2h    \
		i64eq.t2h    i64rshft.t2h i64lshft.t2h

dsqrt.t2h:	$(DSQRT2H) dsqrt.occ
	$(LIBRARIAN) $(LIBOPT) $(DSQRT2H) $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2h=.occ) $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $(@:.t2h=.p2h)
	$(OCCAM) $(@:.t2h=.p2h) $(SWITCH)h $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2h=.p2h)
	$(DELETE) $(TARGETLIB)

dabsfint.t2h:	r64gterr.t2h i64tor64.t2h r64toi64.t2h i64bor.t2h i64band.t2h dabsfint.occ
	$(LIBRARIAN) $(LIBOPT) r64gterr.t2h i64tor64.t2h r64toi64.t2h i64bor.t2h i64band.t2h $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2h=.occ) $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $(@:.t2h=.p2h)
	$(OCCAM) $(@:.t2h=.p2h) $(SWITCH)h $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2h=.p2h)
	$(DELETE) $(TARGETLIB)

dscaleb.t2h:	r64operr.t2h dscaleb.occ
	$(LIBRARIAN) $(LIBOPT) r64operr.t2h $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2h=.occ) $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $(@:.t2h=.p2h)
	$(OCCAM) $(@:.t2h=.p2h) $(SWITCH)h $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2h=.p2h)
	$(DELETE) $(TARGETLIB)

# dargred.t2h also depends on occamutl.lib
dargred.t2h:	r64operr.t2h i32tor64.t2h dargred.occ
	$(LIBRARIAN) $(LIBOPT) r64operr.t2h i32tor64.t2h $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2h=.occ) $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $(@:.t2h=.p2h)
	$(OCCAM) $(@:.t2h=.p2h) $(SWITCH)h $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2h=.p2h)
	$(DELETE) $(TARGETLIB)

dmulby2.t2h:	r64operr.t2h dmulby2.occ
	$(LIBRARIAN) $(LIBOPT) r64operr.t2h $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2h=.occ) $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $(@:.t2h=.p2h)
	$(OCCAM) $(@:.t2h=.p2h) $(SWITCH)h $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2h=.p2h)
	$(DELETE) $(TARGETLIB)

ddivby2.t2h:	r64operr.t2h ddivby2.occ
	$(LIBRARIAN) $(LIBOPT) r64operr.t2h $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2h=.occ) $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $(@:.t2h=.p2h)
	$(OCCAM) $(@:.t2h=.p2h) $(SWITCH)h $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2h=.p2h)
	$(DELETE) $(TARGETLIB)

dlogb.t2h:	i16tor64.t2h dlogb.occ
	$(LIBRARIAN) $(LIBOPT) i16tor64.t2h $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2h=.occ) $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $(@:.t2h=.p2h)
	$(OCCAM) $(@:.t2h=.p2h) $(SWITCH)h $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2h=.p2h)
	$(DELETE) $(TARGETLIB)

ie64comp.t2h:	r64eq.t2h r64gt.t2h danalyse.t2h ie64comp.occ
	$(LIBRARIAN) $(LIBOPT) r64eq.t2h r64gt.t2h danalyse.t2h $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2h=.occ) $(PREOPT) $(SWITCH)d HALT $(SWITCH)o $(@:.t2h=.p2h)
	$(OCCAM) $(@:.t2h=.p2h) $(SWITCH)h $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2h=.p2h)
	$(DELETE) $(TARGETLIB)

# now for universal mode of files that are related to double precision reals

DSQRT2X=	i64bor.t2x   i64band.t2x  i64gt.t2x    \
		i64eq.t2x    i64rshft.t2x i64lshft.t2x

dsqrt.t2x:	$(DSQRT2X) dsqrt.occ
	$(LIBRARIAN) $(LIBOPT) $(DSQRT2X) $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2x=.occ) $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $(@:.t2x=.p2x)
	$(OCCAM) $(@:.t2x=.p2x) $(SWITCH)x $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2x=.p2x)
	$(DELETE) $(TARGETLIB)

dabsfint.t2x:	r64gterr.t2x i64tor64.t2x r64toi64.t2x i64bor.t2x i64band.t2x dabsfint.occ
	$(LIBRARIAN) $(LIBOPT) r64gterr.t2x i64tor64.t2x r64toi64.t2x i64bor.t2x i64band.t2x $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2x=.occ) $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $(@:.t2x=.p2x)
	$(OCCAM) $(@:.t2x=.p2x) $(SWITCH)x $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2x=.p2x)
	$(DELETE) $(TARGETLIB)

dscaleb.t2x:	r64operr.t2x dscaleb.occ
	$(LIBRARIAN) $(LIBOPT) r64operr.t2x $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2x=.occ) $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $(@:.t2x=.p2x)
	$(OCCAM) $(@:.t2x=.p2x) $(SWITCH)x $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2x=.p2x)
	$(DELETE) $(TARGETLIB)

# dargred.t2x also depends on occamutl.lib
dargred.t2x:	r64operr.t2x i32tor64.t2x dargred.occ
	$(LIBRARIAN) $(LIBOPT) r64operr.t2x i32tor64.t2x $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2x=.occ) $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $(@:.t2x=.p2x)
	$(OCCAM) $(@:.t2x=.p2x) $(SWITCH)x $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2x=.p2x)
	$(DELETE) $(TARGETLIB)

dmulby2.t2x:	r64operr.t2x dmulby2.occ
	$(LIBRARIAN) $(LIBOPT) r64operr.t2x $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2x=.occ) $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $(@:.t2x=.p2x)
	$(OCCAM) $(@:.t2x=.p2x) $(SWITCH)x $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2x=.p2x)
	$(DELETE) $(TARGETLIB)

ddivby2.t2x:	r64operr.t2x ddivby2.occ
	$(LIBRARIAN) $(LIBOPT) r64operr.t2x $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2x=.occ) $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $(@:.t2x=.p2x)
	$(OCCAM) $(@:.t2x=.p2x) $(SWITCH)x $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2x=.p2x)
	$(DELETE) $(TARGETLIB)

dlogb.t2x:	i16tor64.t2x dlogb.occ
	$(LIBRARIAN) $(LIBOPT) i16tor64.t2x $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2x=.occ) $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $(@:.t2x=.p2x)
	$(OCCAM) $(@:.t2x=.p2x) $(SWITCH)x $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2x=.p2x)
	$(DELETE) $(TARGETLIB)

ie64comp.t2x:	r64eq.t2x r64gt.t2x danalyse.t2x ie64comp.occ
	$(LIBRARIAN) $(LIBOPT) r64eq.t2x r64gt.t2x danalyse.t2x $(SWITCH)o $(TARGETLIB)
	$(PREPROCESSOR) $(@:.t2x=.occ) $(PREOPT) $(SWITCH)d UNISTOP $(SWITCH)o $(@:.t2x=.p2x)
	$(OCCAM) $(@:.t2x=.p2x) $(SWITCH)x $(OCCOPT) $(SWITCH)o $@
	$(DELETE) $(@:.t2x=.p2x)
	$(DELETE) $(TARGETLIB)
