home *** CD-ROM | disk | FTP | other *** search
- /* Edge Macro: INTERNAL to hn_compile
- **
- ** $VER: hn_link_sc5.edge 1.0 (10-Feb-93 22:26:36)
- **
- ** Usage: INTERNAL
- ** call hn_link(fullname,outdir,linkoptions)
- **
- ** Synopsis: Link compiled file
- ** SAS/C 5 Version
- **
- ** Special-strings in linkoptions:
- ** $* -> objectfile (same as $@.o)
- ** $@ -> output filename (outdir+filename without .ext)
- **
- ** Default linkoptions: (If not changed by compiler)
- ** lib:AStartup.obj $* TO $@ 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:lc.lib LIB:amiga.lib'
- end
-
- if ~exists(outdir||filename'.o') then do
- say 'File not compiled!'
- return 10
- end
-
- do while index(linkoptions,'$*')>0
- parse var linkoptions pre '$*' post
- linkoptions=pre||'"'outdir||filename'.o"'||post
- end
- do while index(linkoptions,'$@')>0
- parse var linkoptions pre '$@' post
- linkoptions=pre||'"'outdir||filename'"'||post
- end
-
- address command 'blink >"echo:t:link_'filename'"' linkoptions
- if RC~=0 then do
- return 10
- end
-
- return 0
-