home *** CD-ROM | disk | FTP | other *** search
- /* Edge Macro: internal to hn_compile
- **
- ** $VER: hn_link_sc6.edge 1.0 (16-Feb-93 01:21:09)
- **
- ** Usage: INTERNAL
- ** call hn_link(fullname,outdir,linkoptions)
- **
- ** Synopsis: Link compiled file
- ** SAS/C 6 Version
- **
- ** Special-strings in linkoptions:
- ** $* -> objectfile (same as $@.o)
- ** $@ -> output filename (outdir+filename without .ext)
- **
- ** Default linkoptions: (If not changed by compiler)
- ** lib:c.o $* TO $@ LIB LIB:sc.lib LIB:amiga.lib
- **
- ** Author: Henrik Nordström
- ** Ängsvägen 1
- ** S 756 45 Uppsala
- */
-
- parse arg fullname,outdir,linkoptions
-
- options results
-
- parse var fullname filename '.' type
-
- if linkoptions='' then do
- linkoptions='lib:c.o $* TO $@ LIB LIB:sc.lib LIB:amiga.lib'
- end
-
- if ~exists(outdir||filename'.o') then do
- say 'File not compiled!'
- return 10
- end
- s=index(linkoptions,'$*')
- do while s>0
- linkoptions=left(linkoptions,s-1)'"'outdir||filename'.o"'substr(linkoptions,s+2)
- s=index(linkoptions,'$*')
- end
- s=index(linkoptions,'$@')
- do while s>0
- linkoptions=left(linkoptions,s-1)'"'outdir||filename'"'substr(linkoptions,s+2)
- s=index(linkoptions,'$@')
- end
-
- address command 'slink >"echo:t:link_'filename'" 'linkoptions
- if RC~=0 then do
- return 10
- end
-
- return 0
-