| [9165] | 1 | # $Id: setup.optional.wlink.mk,v 1.2 2002-08-29 10:01:41 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 | #
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 | #
|
|---|
| 11 | # Linker/defconvert flags.
|
|---|
| 12 | #
|
|---|
| 13 | _LD_FORMAT = $(BUILD_PLATFORM)
|
|---|
| 14 | _LD_SORT = Sort global
|
|---|
| 15 | # Option
|
|---|
| 16 | _LD_QUIET =
|
|---|
| 17 | _LD_DEFAULT_LIBS= ,nodefaultlibs
|
|---|
| 18 | _LD_ALIGN =
|
|---|
| 19 | _LD_DOSSEG = ,dosseg
|
|---|
| 20 | _LD_BASE =
|
|---|
| 21 | _LD_PACKCODE =
|
|---|
| 22 | _LD_PACKDATA =
|
|---|
| 23 | _LD_IGNORECASE = ,caseexact
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 | !ifdef LD_FORMAT
|
|---|
| 28 | ! if "$(LD_FORMAT)" == "NE"
|
|---|
| 29 | _LD_FORMAT = $(BUILD_PLATFORM)-16
|
|---|
| 30 | ! else
|
|---|
| 31 | ! if "$(LD_FORMAT)" == "LX"
|
|---|
| 32 | _LD_FORMAT = os2
|
|---|
| 33 | ! else
|
|---|
| 34 | ! error error: LD_FORMAT other than NE and LX is not supported by this compiler ($(ENV_NAME)).
|
|---|
| 35 | ! endif
|
|---|
| 36 | ! endif
|
|---|
| 37 | !endif
|
|---|
| 38 |
|
|---|
| 39 | !if defined(LD_SORT_GLOBAL)
|
|---|
| 40 | _LD_SORT = Sort global
|
|---|
| 41 | !endif
|
|---|
| 42 | !if defined(LD_SORT_ALPHABETICAL)
|
|---|
| 43 | _LD_SORT = Sort alphabetical
|
|---|
| 44 | !endif
|
|---|
| 45 | !if defined(LD_SORT_BOTH)
|
|---|
| 46 | _LD_SORT = Sort global alphabetical
|
|---|
| 47 | !endif
|
|---|
| 48 |
|
|---|
| 49 | # Option
|
|---|
| 50 | !if defined(BUILD_QUIET)
|
|---|
| 51 | _LD_QUIET = ,quiet
|
|---|
| 52 | !endif
|
|---|
| 53 | !if defined(LD_ALIGN)
|
|---|
| 54 | _LD_ALIGN = ,alignment=$(LD_ALIGN)
|
|---|
| 55 | !endif
|
|---|
| 56 | !if defined(LD_DEFAULT_LIBS) || defined(ALL_DEFAULT_LIBS)
|
|---|
| 57 | _LD_DEFAULT_LIBS =
|
|---|
| 58 | !endif
|
|---|
| 59 | !if defined(LD_NO_DOSSEG)
|
|---|
| 60 | _LD_DOSSEG =
|
|---|
| 61 | !endif
|
|---|
| 62 | !if defined(LD_DOSSEG)
|
|---|
| 63 | _LD_DOSSEG = ,dosseg
|
|---|
| 64 | !endif
|
|---|
| 65 | !if defined(LD_NO_BASE)
|
|---|
| 66 | _LD_BASE =
|
|---|
| 67 | !endif
|
|---|
| 68 | !if defined(LD_BASE)
|
|---|
| 69 | _LD_BASE = offset=$(LD_BASE)
|
|---|
| 70 | !endif
|
|---|
| 71 | !if defined(LD_NO_PACKCODE)
|
|---|
| 72 | _LD_PACKCODE =
|
|---|
| 73 | !endif
|
|---|
| 74 | !if defined(LD_PACKCODE)
|
|---|
| 75 | _LD_PACKCODE = ,packcode=$(LD_PACKCODE)
|
|---|
| 76 | !endif
|
|---|
| 77 | !if defined(LD_NO_PACKDATA)
|
|---|
| 78 | _LD_PACKDATA =
|
|---|
| 79 | !endif
|
|---|
| 80 | !if defined(LD_PACKDATA)
|
|---|
| 81 | _LD_PACKDATA = ,packdata=$(LD_PACKDATA)
|
|---|
| 82 | !endif
|
|---|
| 83 | !if defined(LD_IGNORECASE) || defined(ALL_IGNORECASE)
|
|---|
| 84 | _LD_IGNORECASE = ,nocaseexact
|
|---|
| 85 | !endif
|
|---|
| 86 | !if defined(LD_NO_IGNORECASE) || defined(ALL_NO_IGNORECASE)
|
|---|
| 87 | _LD_IGNORECASE = ,caseexact
|
|---|
| 88 | !endif
|
|---|
| 89 |
|
|---|
| 90 | _LD_OPTIONAL = $(_LD_SORT) Option verbose $(_LD_QUIET) $(_LD_ALIGN) $(_LD_DOSSEG) $(_LD_BASE) $(_LD_PACKCODE) $(_LD_PACKDATA)
|
|---|
| 91 |
|
|---|
| 92 |
|
|---|
| 93 | # assert on nonsupported options.
|
|---|
| 94 | !if defined(LD_EXTDIC) || defined(LD_NO_EXTDIC)
|
|---|
| 95 | ! error error: LD_EXTDIC/LD_NO_EXTDIC is not supported by the linker (wlink).
|
|---|
| 96 | !endif
|
|---|
| [9165] | 97 | # don't complain!
|
|---|
| 98 | #!if defined(LD_OLDCPP) || defined(LD_NO_OLDCPP)
|
|---|
| 99 | #! error error: LD_OLDCPP/LD_NO_OLDCPP is not supported by the linker (wlink).
|
|---|
| 100 | #!endif
|
|---|
| [9153] | 101 | !if defined(LD_OPTFUNC) || defined(LD_NO_OPTFUNC)
|
|---|
| 102 | ! error error: LD_DBGPACK/LD_NO_DBGPACK is not supported by the linker (wlink).
|
|---|
| 103 | !endif
|
|---|
| 104 |
|
|---|
| 105 | # assert on obsolete options.
|
|---|
| 106 | !if defined(LD_DOSSEG_YES) || defined(LD_DOSSEG_NO)
|
|---|
| 107 | ! error error: LD_DOSSEG_YES/LD_DOSSEG_NO is obosolete. Use LD_DOSSEG and LD_NO_DOSSEG.
|
|---|
| 108 | !endif
|
|---|
| 109 |
|
|---|