# Make the Sun/IRAF shared library. $call relink $exit update: $call relink $call install $iffile (V.o) $call clean $endif ; relink: $set rebuild = no $goto relink_ Relink: $set rebuild = yes relink_: $set ADDR = 10000000 $set VV = "$$(@S.ver.$(MACH))" $ifeq (OSVERSION, 4) $set SI = bin$$S$(VV).e $else $set SI = bin$$S$(VV)_$(OSRELEASE).e $endif $set L1 = $set L2 = $set L3 = $set L4 = $ifnfile ($(SI), lib$libshare.a) $set rebuild = yes $else $ifolder ($(SI): $(L1), $(L2), $(L3), $(L4), Slib.c) $set rebuild = yes $end $ifeq (rebuild, yes) $ifeq (OSVERSION, 4) !./mkshlib.sos4 -a $(ADDR) $else !./mkshlib.ssol -a $(ADDR) $endif $call libshare $else $echo "shared library is up to date" $endif ; install: $set VV = "$$(@S.ver.$(MACH))" $ifeq (OSVERSION, 4) $set SI = S$(VV).e $else $set SI = S$(VV)_$(OSRELEASE).e $endif $iffile (S.e) $iffile (bin$$$(SI).2) $move bin$$$(SI).2 bin$$$(SI).3 $endif $iffile (bin$$$(SI).1) $move bin$$$(SI).1 bin$$$(SI).2 $endif $iffile (bin$$$(SI) ) $move bin$$$(SI) bin$$$(SI).1 $endif $move S.e bin$$$(SI) $move libshare.a bin$ $iffile (bin$$$(SI).1, bin$$$(SI).2, bin$$$(SI).3) !(find $(iraf)bin/$(SI).[123] -atime +1 -exec rm {} \;) $endif $endif ; libshare: libshare.a: $set SYSF = onentry.o $omake S.s !ar xv $(iraf)bin.$(MACH)/libsys.a $(SYSF) !ar rv libshare.a S.o $(SYSF); ranlib libshare.a; rm -f $(SYSF) $endif ; coff: coff.e: $omake coff.c !cc coff.o -o coff.e ; edsym: edsym.e: $ifeq (OSVERSION, 4) $omake edsym-sos4.c !cc edsym-sos4.o -o edsym.e $else $omake edsym-ssol.c !cc edsym-ssol.o -lelf -o edsym.e $endif ; clean: $ifeq (OSVERSION, 4) !./mkshlib.sos4 -c $else !./mkshlib.ssol -c $endif ;