home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / EDGE1_704.DMS / in.adf / ExtraStuff / Edge_SasC.lha / rexx / hn_compile_asm.edge < prev    next >
Encoding:
Text File  |  1993-08-09  |  1.2 KB  |  49 lines

  1. /* Edge macro: INTERNAL to hn_compile
  2. **
  3. ** $VER: hn_compile_asm.edge 1.0 (16-Feb-93 01:09:18)
  4. **
  5. ** Usage:    INTERNAL
  6. **           call hn_compile_asm(linkflag,filename,type,compilerflags,linkoptions,outdir)
  7. **
  8. ** Synopsis: Compile assembler source
  9. **
  10. ** Author:   Henrik Nordström
  11. **           Ängsvägen 1
  12. **           S 756 45 Uppsala
  13. */
  14.  
  15. deflinkopt="lib:astartup.obj $* to $@ lib lib:amiga.lib"
  16.  
  17. options results
  18.  
  19. parse arg linkflag,filename,type,compilerflags,linkoptions,outdir
  20.  
  21. fullname=filename'.'type
  22.  
  23. compilefail=0
  24.  
  25. /* Modify linkoptions */
  26. if upper(linkflag) = 'LINK' & upper(linkoptions)='AUTO' then do
  27.    /* AUTO NOT supported */
  28.     'requestnotify "AUTO linking is not supported for .'type' files,*n default linking used instead"'
  29.     linkoptions=''
  30. end
  31.  
  32. /* Set default link options if not specified */
  33. if linkoptions='' then do
  34.     linkoptions=deflinkopt
  35. end
  36.  
  37. /* Compile file */
  38. if upper(linkflag) ~= 'LINKONLY' then do
  39.     address command 'asm >"echo:t:cm_'filename'" 'compilerflags' "-o'outdir||filename'.o" "edge:'fullname'"'
  40.     call hn_readerr_asm('t:cm_'filename,fullname,linkflag)
  41.     compilefail=result
  42. end
  43.  
  44. /* Check if error, return new linkflags if not */
  45. if compilefail>=10 then
  46.     return compilefail
  47. else
  48.     return linkoptions
  49.