| 1 | # $Id: setup.optional.link.mk,v 1.1 2002-08-29 10:01:40 bird Exp $
 | 
|---|
| 2 | 
 | 
|---|
| 3 | #
 | 
|---|
| 4 | # Helper file for all the option stuff for the ibm linker (ilink).
 | 
|---|
| 5 | #
 | 
|---|
| 6 | _LD_ALIGN       =
 | 
|---|
| 7 | _LD_DEFAULT_LIBS= /NoD
 | 
|---|
| 8 | _LD_EXTDIC      = /NoE
 | 
|---|
| 9 | _LD_PACKCODE    = /Packcode
 | 
|---|
| 10 | _LD_PACKDATA    = /Packdata
 | 
|---|
| 11 | _LD_IGNORECASE  = /NoI
 | 
|---|
| 12 | _LD_DOSSEG      =
 | 
|---|
| 13 | _LD_FAR         = /Far
 | 
|---|
| 14 | 
 | 
|---|
| 15 | !if defined(LD_ALIGN)
 | 
|---|
| 16 | _LD_ALIGN       = /ALIGNMENT:$(LD_ALIGN)
 | 
|---|
| 17 | !endif
 | 
|---|
| 18 | !if defined(LD_DEFAULT_LIBS) || defined(ALL_DEFAULT_LIBS)
 | 
|---|
| 19 | _LD_DEFAULT_LIBS = /Def
 | 
|---|
| 20 | !endif
 | 
|---|
| 21 | !if defined(LD_EXTDIC)
 | 
|---|
| 22 | _LD_EXTDIC      = /Ext
 | 
|---|
| 23 | !endif
 | 
|---|
| 24 | !if defined(LD_NO_EXTDIC)
 | 
|---|
| 25 | _LD_EXTDIC      = /NoE
 | 
|---|
| 26 | !endif
 | 
|---|
| 27 | !if defined(LD_NO_PACKCODE)
 | 
|---|
| 28 | _LD_PACKCODE    = /NoPackcode
 | 
|---|
| 29 | !endif
 | 
|---|
| 30 | !if defined(LD_PACKCODE)
 | 
|---|
| 31 | _LD_PACKCODE    = /Packcode:$(LD_PACKCODE)
 | 
|---|
| 32 | !endif
 | 
|---|
| 33 | !if defined(LD_NO_PACKDATA)
 | 
|---|
| 34 | _LD_PACKDATA    = /NoPackdata
 | 
|---|
| 35 | !endif
 | 
|---|
| 36 | !if defined(LD_PACKDATA)
 | 
|---|
| 37 | _LD_PACKDATA    = /Packdata:$(LD_PACKDATA)
 | 
|---|
| 38 | !endif
 | 
|---|
| 39 | !if defined(LD_IGNORECASE) || defined(ALL_IGNORECASE)
 | 
|---|
| 40 | _LD_IGNORECASE  = /Ig
 | 
|---|
| 41 | !endif
 | 
|---|
| 42 | !if defined(LD_NO_IGNORECASE) || defined(ALL_NO_IGNORECASE)
 | 
|---|
| 43 | _LD_IGNORECASE  = /NoI
 | 
|---|
| 44 | !endif
 | 
|---|
| 45 | !ifdef LD_NO_DOSSEG
 | 
|---|
| 46 | _LD_DOSSEG      =
 | 
|---|
| 47 | !endif
 | 
|---|
| 48 | !ifdef LD_DOSSEG
 | 
|---|
| 49 | _LD_DOSSEG      = /DOSSEG
 | 
|---|
| 50 | !endif
 | 
|---|
| 51 | !ifdef LD_NO_FAR
 | 
|---|
| 52 | _LD_FAR         =
 | 
|---|
| 53 | !endif
 | 
|---|
| 54 | !ifdef LD_FAR
 | 
|---|
| 55 | _LD_FAR         = /FAR
 | 
|---|
| 56 | !endif
 | 
|---|
| 57 | 
 | 
|---|
| 58 | 
 | 
|---|
| 59 | _LD_OPTIONAL = $(_LD_ALIGN) $(_LD_DEFAULT_LIBS) $(_LD_EXTDIC) $(_LD_PACKCODE) $(_LD_PACKDATA) $(_LD_IGNORECASE) $(_LD_DOSSEG) $(_LD_FAR)
 | 
|---|
| 60 | 
 | 
|---|
| 61 | #!if !$(BUILD_FORWARDING)
 | 
|---|
| 62 | #! ifdef LD_FORMAT
 | 
|---|
| 63 | #!  if "$(LD_FORMAT)" != "LX"
 | 
|---|
| 64 | #!   error LD_FORMAT other than LX is not supported by this linker ($(ENV_NAME)).
 | 
|---|
| 65 | #!  endif
 | 
|---|
| 66 | #! endif
 | 
|---|
| 67 | #!endif
 | 
|---|
| 68 | 
 | 
|---|
| 69 | 
 | 
|---|
| 70 | # unsupported option checks.
 | 
|---|
| 71 | !ifdef LD_SORT_BOTH
 | 
|---|
| 72 | ! error LD_SORT_BOTH is not supported by this linker (link).
 | 
|---|
| 73 | !endif
 | 
|---|
| 74 | !ifdef LD_SORT_GLOBAL
 | 
|---|
| 75 | ! error LD_SORT_GLOBAL is not supported by this linker (link).
 | 
|---|
| 76 | !endif
 | 
|---|
| 77 | !ifdef LD_SORT_ALPHABETICAL
 | 
|---|
| 78 | ! error LD_SORT_ALPHABETICAL is not supported by this linker (link).
 | 
|---|
| 79 | !endif
 | 
|---|
| 80 | !if defined(LD_NO_DBGPACK) || defined(LD_DBGPACK)
 | 
|---|
| 81 | ! error LD_NO_DBGPACK/LD_DBGPACK is not supported by this linker (link).
 | 
|---|
| 82 | !endif
 | 
|---|
| 83 | !if defined(LD_OPTFUNC) || defined(LD_NO_OPTFUNC)
 | 
|---|
| 84 | ! error LD_NO_OPTFUNC/LD_OPTFUNC is not supported by this linker (link).
 | 
|---|
| 85 | !endif
 | 
|---|
| 86 | !if defined(LD_NO_BASE) || defined(LD_BASE)
 | 
|---|
| 87 | ! error LD_BASE/LD_NO_BASE is not supported by this linker (link).
 | 
|---|
| 88 | !endif
 | 
|---|
| 89 | !if 0  # ignore this for the moment.
 | 
|---|
| 90 | !if defined(LD_OLDCPP) || defined(LD_NO_OLDCPP)
 | 
|---|
| 91 | ! error LD_OLDCPP/LD_NO_OLDCPP is not supported by this linker (link).
 | 
|---|
| 92 | !endif
 | 
|---|
| 93 | !endif
 | 
|---|
| 94 | 
 | 
|---|
| 95 | # assertions
 | 
|---|
| 96 | !if defined(LD_DOSSEG_NO) || defined(LD_DOSSEG_YES)
 | 
|---|
| 97 | ! error LD_DOSSEG_NO/LD_DOSSEG_YES is renamed to LD_NO_DOSSEG / LD_DOSSEG!
 | 
|---|
| 98 | !endif
 | 
|---|
| 99 | 
 | 
|---|