[9243] | 1 | # $Id: setup.optional.wlink.mk,v 1.6 2002-09-14 23:31:28 bird Exp $
|
---|
[9153] | 2 |
|
---|
| 3 | #
|
---|
| 4 | # Helper file for all the optional stuff which is common for
|
---|
| 5 | # all watcom11xx compilers.
|
---|
| 6 | # Concidering the size of this, it really make sense putting it here.
|
---|
| 7 | #
|
---|
[9243] | 8 | MAKE_INCLUDE_LD_OPT = $(PATH_MAKE)\setup.optional.wlink.mk
|
---|
[9153] | 9 |
|
---|
| 10 |
|
---|
| 11 | #
|
---|
| 12 | # Linker/defconvert flags.
|
---|
| 13 | #
|
---|
| 14 | _LD_FORMAT = $(BUILD_PLATFORM)
|
---|
| 15 | _LD_SORT = Sort global
|
---|
| 16 | # Option
|
---|
| 17 | _LD_QUIET =
|
---|
| 18 | _LD_DEFAULT_LIBS= ,nodefaultlibs
|
---|
| 19 | _LD_ALIGN =
|
---|
| 20 | _LD_DOSSEG = ,dosseg
|
---|
| 21 | _LD_BASE =
|
---|
| 22 | _LD_PACKCODE =
|
---|
| 23 | _LD_PACKDATA =
|
---|
| 24 | _LD_IGNORECASE = ,caseexact
|
---|
[9169] | 25 | _LD_CACHE = ,cache
|
---|
[9153] | 26 |
|
---|
| 27 |
|
---|
| 28 |
|
---|
| 29 | !ifdef LD_FORMAT
|
---|
| 30 | ! if "$(LD_FORMAT)" == "NE"
|
---|
[9170] | 31 | _LD_FORMAT = $(BUILD_PLATFORM)-16
|
---|
[9176] | 32 | TOOL_STRIP =
|
---|
[9153] | 33 | ! else
|
---|
| 34 | ! if "$(LD_FORMAT)" == "LX"
|
---|
[9170] | 35 | _LD_FORMAT = os2
|
---|
[9153] | 36 | ! else
|
---|
| 37 | ! error error: LD_FORMAT other than NE and LX is not supported by this compiler ($(ENV_NAME)).
|
---|
| 38 | ! endif
|
---|
| 39 | ! endif
|
---|
| 40 | !endif
|
---|
| 41 |
|
---|
| 42 | !if defined(LD_SORT_GLOBAL)
|
---|
| 43 | _LD_SORT = Sort global
|
---|
| 44 | !endif
|
---|
| 45 | !if defined(LD_SORT_ALPHABETICAL)
|
---|
| 46 | _LD_SORT = Sort alphabetical
|
---|
| 47 | !endif
|
---|
| 48 | !if defined(LD_SORT_BOTH)
|
---|
| 49 | _LD_SORT = Sort global alphabetical
|
---|
| 50 | !endif
|
---|
| 51 |
|
---|
| 52 | # Option
|
---|
| 53 | !if defined(BUILD_QUIET)
|
---|
| 54 | _LD_QUIET = ,quiet
|
---|
| 55 | !endif
|
---|
| 56 | !if defined(LD_ALIGN)
|
---|
| 57 | _LD_ALIGN = ,alignment=$(LD_ALIGN)
|
---|
| 58 | !endif
|
---|
| 59 | !if defined(LD_DEFAULT_LIBS) || defined(ALL_DEFAULT_LIBS)
|
---|
| 60 | _LD_DEFAULT_LIBS =
|
---|
| 61 | !endif
|
---|
| 62 | !if defined(LD_NO_DOSSEG)
|
---|
| 63 | _LD_DOSSEG =
|
---|
| 64 | !endif
|
---|
| 65 | !if defined(LD_DOSSEG)
|
---|
| 66 | _LD_DOSSEG = ,dosseg
|
---|
| 67 | !endif
|
---|
| 68 | !if defined(LD_NO_BASE)
|
---|
| 69 | _LD_BASE =
|
---|
| 70 | !endif
|
---|
| 71 | !if defined(LD_BASE)
|
---|
| 72 | _LD_BASE = offset=$(LD_BASE)
|
---|
| 73 | !endif
|
---|
| 74 | !if defined(LD_NO_PACKCODE)
|
---|
| 75 | _LD_PACKCODE =
|
---|
| 76 | !endif
|
---|
| 77 | !if defined(LD_PACKCODE)
|
---|
| 78 | _LD_PACKCODE = ,packcode=$(LD_PACKCODE)
|
---|
| 79 | !endif
|
---|
| 80 | !if defined(LD_NO_PACKDATA)
|
---|
| 81 | _LD_PACKDATA =
|
---|
| 82 | !endif
|
---|
| 83 | !if defined(LD_PACKDATA)
|
---|
| 84 | _LD_PACKDATA = ,packdata=$(LD_PACKDATA)
|
---|
| 85 | !endif
|
---|
| 86 | !if defined(LD_IGNORECASE) || defined(ALL_IGNORECASE)
|
---|
| 87 | _LD_IGNORECASE = ,nocaseexact
|
---|
| 88 | !endif
|
---|
| 89 | !if defined(LD_NO_IGNORECASE) || defined(ALL_NO_IGNORECASE)
|
---|
| 90 | _LD_IGNORECASE = ,caseexact
|
---|
| 91 | !endif
|
---|
[9169] | 92 | !if defined(LD_CACHE)
|
---|
| 93 | _LD_CACHE = ,cache
|
---|
| 94 | !endif
|
---|
| 95 | !if defined(LD_NO_CACHE)
|
---|
| 96 | _LD_CACHE = ,nocache
|
---|
| 97 | !endif
|
---|
| 98 | !if defined(LD_DEF_CACHE)
|
---|
| 99 | _LD_CACHE =
|
---|
| 100 | !endif
|
---|
[9153] | 101 |
|
---|
| 102 |
|
---|
[9169] | 103 | _LD_OPTIONAL = $(_LD_SORT) Option verbose $(_LD_QUIET) $(_LD_ALIGN) $(_LD_DOSSEG) $(_LD_BASE) $(_LD_PACKCODE) $(_LD_PACKDATA) $(_LD_CACHE) $(_LD_DEFAULT_LIBS)
|
---|
[9153] | 104 |
|
---|
[9169] | 105 |
|
---|
[9153] | 106 | # assert on nonsupported options.
|
---|
| 107 | !if defined(LD_EXTDIC) || defined(LD_NO_EXTDIC)
|
---|
| 108 | ! error error: LD_EXTDIC/LD_NO_EXTDIC is not supported by the linker (wlink).
|
---|
| 109 | !endif
|
---|
[9165] | 110 | # don't complain!
|
---|
| 111 | #!if defined(LD_OLDCPP) || defined(LD_NO_OLDCPP)
|
---|
| 112 | #! error error: LD_OLDCPP/LD_NO_OLDCPP is not supported by the linker (wlink).
|
---|
| 113 | #!endif
|
---|
[9153] | 114 | !if defined(LD_OPTFUNC) || defined(LD_NO_OPTFUNC)
|
---|
| 115 | ! error error: LD_DBGPACK/LD_NO_DBGPACK is not supported by the linker (wlink).
|
---|
| 116 | !endif
|
---|
| 117 |
|
---|
| 118 | # assert on obsolete options.
|
---|
| 119 | !if defined(LD_DOSSEG_YES) || defined(LD_DOSSEG_NO)
|
---|
| 120 | ! error error: LD_DOSSEG_YES/LD_DOSSEG_NO is obosolete. Use LD_DOSSEG and LD_NO_DOSSEG.
|
---|
| 121 | !endif
|
---|
| 122 |
|
---|