home *** CD-ROM | disk | FTP | other *** search
- /* Edge macro: INTERNAL to hn_compile
- **
- ** $VER: hn_compile_asm.edge 1.0 (16-Feb-93 01:09:18)
- **
- ** Usage: INTERNAL
- ** call hn_compile_asm(linkflag,filename,type,compilerflags,linkoptions,outdir)
- **
- ** Synopsis: Compile assembler source
- **
- ** Author: Henrik Nordström
- ** Ängsvägen 1
- ** S 756 45 Uppsala
- */
-
- deflinkopt="lib:astartup.obj $* to $@ lib lib:amiga.lib"
-
- options results
-
- parse arg linkflag,filename,type,compilerflags,linkoptions,outdir
-
- fullname=filename'.'type
-
- compilefail=0
-
- /* Modify linkoptions */
- if upper(linkflag) = 'LINK' & upper(linkoptions)='AUTO' then do
- /* AUTO NOT supported */
- 'requestnotify "AUTO linking is not supported for .'type' files,*n default linking used instead"'
- linkoptions=''
- end
-
- /* Set default link options if not specified */
- if linkoptions='' then do
- linkoptions=deflinkopt
- end
-
- /* Compile file */
- if upper(linkflag) ~= 'LINKONLY' then do
- address command 'asm >"echo:t:cm_'filename'" 'compilerflags' "-o'outdir||filename'.o" "edge:'fullname'"'
- call hn_readerr_asm('t:cm_'filename,fullname,linkflag)
- compilefail=result
- end
-
- /* Check if error, return new linkflags if not */
- if compilefail>=10 then
- return compilefail
- else
- return linkoptions
-