1 | # $Id: MSLINK510.kmk 2413 2010-09-11 17:43:04Z bird $
|
---|
2 | ## @file
|
---|
3 | # kBuild Tool Config - Microsoft Link v5.10
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (c) 2008-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
|
---|
8 | #
|
---|
9 | # This file is part of kBuild.
|
---|
10 | #
|
---|
11 | # kBuild is free software; you can redistribute it and/or modify
|
---|
12 | # it under the terms of the GNU General Public License as published by
|
---|
13 | # the Free Software Foundation; either version 2 of the License, or
|
---|
14 | # (at your option) any later version.
|
---|
15 | #
|
---|
16 | # kBuild is distributed in the hope that it will be useful,
|
---|
17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | # GNU General Public License for more details.
|
---|
20 | #
|
---|
21 | # You should have received a copy of the GNU General Public License
|
---|
22 | # along with kBuild; if not, write to the Free Software
|
---|
23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
24 | #
|
---|
25 | #
|
---|
26 | # As a special exception you are granted permission to include this file, via
|
---|
27 | # the kmk include directive, as you wish without this in itself causing the
|
---|
28 | # resulting makefile, program or whatever to be covered by the GPL license.
|
---|
29 | # This exception does not however invalidate any other reasons why the makefile,
|
---|
30 | # program, whatever should not be covered the GPL.
|
---|
31 | #
|
---|
32 | #
|
---|
33 |
|
---|
34 | TOOL_MSLINK510 := Microsoft Segmented-Executable Linker Version 5.10
|
---|
35 |
|
---|
36 | # Tool Specific Properties
|
---|
37 | ifndef TOOL_MSLINK510_LD
|
---|
38 | TOOL_MSLINK510_LD := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS)/os2.x86/ddk/*/base/tools/link$(HOSTSUFF_EXE))))
|
---|
39 | ifeq ($(TOOL_MSLINK510_LD),)
|
---|
40 | TOOL_MSLINK510_LD := $(firstword $(rsort $(wildcard \
|
---|
41 | $(PATH_DEVTOOLS)/os2.x86/ddk/*/video/tools/os2.386/lx.386/bin/link$(HOSTSUFF_EXE) \
|
---|
42 | $(PATH_DEVTOOLS)/os2.x86/ddk/*/base32/tools/os2.386/bin/link$(HOSTSUFF_EXE) \
|
---|
43 | $(PATH_DEVTOOLS)/os2.x86/ddk/*/base32/tools/os2.386/lx.386/bin/link$(HOSTSUFF_EXE) \
|
---|
44 | $(PATH_DEVTOOLS)/os2.x86/ddk/*/print/tools/os2.386/lx.386/bin/link$(HOSTSUFF_EXE) \
|
---|
45 | $(PATH_DEVTOOLS)/os2.x86/ddk/*/wpshell/tools/os2.386/lx.386/bin/link$(HOSTSUFF_EXE) \
|
---|
46 | $(PATH_DEVTOOLS)/os2.x86/ddk/*/mme/tools/os2.386/lx.386/bin/link$(HOSTSUFF_EXE) \
|
---|
47 | )))
|
---|
48 | endif
|
---|
49 | ifneq ($(TOOL_MSLINK510_LD),)
|
---|
50 | TOOL_MSLINK510_LD := $(TOOL_MSLINK510_LD)
|
---|
51 | endif
|
---|
52 | endif
|
---|
53 | ifeq ($(TOOL_MSLINK510_LD),)
|
---|
54 | TOOL_MSLINK510_LD := $(firstword $(which link$(HOSTSUFF_EXE)) path/notfound/link$(HOSTSUFF_EXE))
|
---|
55 | endif
|
---|
56 |
|
---|
57 | TOOL_MSLINK510_ENV_SETUP = $(REDIRECT) \
|
---|
58 | -Z -E 'LIB=$1' \
|
---|
59 | --
|
---|
60 |
|
---|
61 | # General Properties used by kBuild
|
---|
62 | TOOL_MSLINK510_LDFLAGS ?= /nologo /map:full /linenumbers
|
---|
63 |
|
---|
64 | TOOL_MSLINK510_LINK_PROGRAM_OUTPUT = $(outbase).map $(outbase).rsp
|
---|
65 | TOOL_MSLINK510_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
66 | TOOL_MSLINK510_LINK_PROGRAM_DEPORD =
|
---|
67 | define TOOL_MSLINK510_LINK_PROGRAM_CMDS
|
---|
68 | $(QUIET)$(APPEND) -n $(outbase).rsp '$(subst $(SP),+' ',$(strip $(subst /,\,$(objs)))),'
|
---|
69 | $(QUIET)$(APPEND) $(outbase).rsp '$(subst /,\,$(out)),'
|
---|
70 | $(QUIET)$(APPEND) $(outbase).rsp '$(subst /,\,$(outbase)).map,'
|
---|
71 | $(QUIET)$(APPEND) -n $(outbase).rsp '$(subst $(SP),+' ',$(strip $(subst /,\,$(libs))))$(if $(filter %.def,$(othersrc)),$(COMMA),;)'
|
---|
72 | $(if $(filter %.def,$(othersrc)),$(QUIET)$(APPEND) $(outbase).rsp '$(subst /,\,$(filter %.def,$(othersrc)));',)
|
---|
73 | $(QUIET)$(call TOOL_MSLINK510_ENV_SETUP,$(subst $(SP),;,$(libpath))) \
|
---|
74 | $(TOOL_MSLINK510_LD) $(flags) '@$(subst /,\,$(outbase).rsp)'
|
---|
75 | endef
|
---|
76 |
|
---|
77 |
|
---|
78 | TOOL_MSLINK510_LINK_DLL_OUTPUT = $(outbase).map $(outbase).rsp
|
---|
79 | TOOL_MSLINK510_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
80 | TOOL_MSLINK510_LINK_DLL_DEPORD =
|
---|
81 | define TOOL_MSLINK510_LINK_DLL_CMDS
|
---|
82 | $(QUIET)$(APPEND) -n $(outbase).rsp '$(subst $(SP),+' ',$(strip $(subst /,\,$(objs)))),'
|
---|
83 | $(QUIET)$(APPEND) $(outbase).rsp '$(subst /,\,$(out)),'
|
---|
84 | $(QUIET)$(APPEND) $(outbase).rsp '$(subst /,\,$(outbase)).map,'
|
---|
85 | $(QUIET)$(APPEND) -n $(outbase).rsp '$(subst $(SP),+' ',$(strip $(subst /,\,$(libs))))$(if $(filter %.def,$(othersrc)),$(COMMA),;)'
|
---|
86 | $(if $(filter %.def,$(othersrc)),$(QUIET)$(APPEND) $(outbase).rsp '$(subst /,\,$(filter %.def,$(othersrc)));',)
|
---|
87 | $(QUIET)$(call TOOL_MSLINK510_ENV_SETUP,$(subst $(SP),;,$(libpath))) \
|
---|
88 | $(TOOL_MSLINK510_LD) $(flags) '@$(subst /,\,$(outbase).rsp)'
|
---|
89 | endef
|
---|
90 |
|
---|
91 |
|
---|
92 | TOOL_MSLINK510_LINK_SYSMOD_OUTPUT = $(outbase).map $(outbase).rsp
|
---|
93 | TOOL_MSLINK510_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
94 | TOOL_MSLINK510_LINK_SYSMOD_DEPORD =
|
---|
95 | define TOOL_MSLINK510_LINK_SYSMOD_CMDS
|
---|
96 | $(QUIET)$(APPEND) -n $(outbase).rsp '$(subst $(SP),+' ',$(strip $(subst /,\,$(objs)))),'
|
---|
97 | $(QUIET)$(APPEND) $(outbase).rsp '$(subst /,\,$(out)),'
|
---|
98 | $(QUIET)$(APPEND) $(outbase).rsp '$(subst /,\,$(outbase)).map,'
|
---|
99 | $(QUIET)$(APPEND) -n $(outbase).rsp '$(subst $(SP),+' ',$(strip $(subst /,\,$(libs))))$(if $(filter %.def,$(othersrc)),$(COMMA),;)'
|
---|
100 | $(if $(filter %.def,$(othersrc)),$(QUIET)$(APPEND) $(outbase).rsp '$(subst /,\,$(filter %.def,$(othersrc)));',)
|
---|
101 | $(QUIET)$(call TOOL_MSLINK510_ENV_SETUP,$(subst $(SP),;,$(libpath))) \
|
---|
102 | $(TOOL_MSLINK510_LD) $(flags) '@$(subst /,\,$(outbase).rsp)'
|
---|
103 | endef
|
---|
104 |
|
---|