Changeset 2065 for trunk/kBuild/tools


Ignore:
Timestamp:
Nov 17, 2008, 1:47:59 AM (17 years ago)
Author:
bird
Message:

VAC308 hacking, Watcom C v11.0c, MASM v5.10 and MS Link v5.10 (OS/2 related).

Location:
trunk/kBuild/tools
Files:
4 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/tools/VAC308.kmk

    r2064 r2065  
    3333
    3434TOOL_VAC308 := VisualAge for C++ v3.08
    35 
    36 TOOL_VAC308_ENV_SETUP ?=
    3735
    3836# Determin VAC308 location.
     
    5755endif
    5856ifneq ($(PATH_TOOL_VAC308),)
    59  TOOL_VAC308_PATHLESS := yes
    60  
     57 TOOL_VAC308_PATHLESS :=
     58
    6159 PATH_TOOL_VAC308_BIN    ?= $(PATH_TOOL_VAC308)/bin
    6260 PATH_TOOL_VAC308_LIB    ?= $(PATH_TOOL_VAC308)/lib
     
    6563 PATH_TOOL_VAC308_HELP   ?= $(PATH_TOOL_VAC308)/help
    6664 PATH_TOOL_VAC308_LOCALE ?= $(PATH_TOOL_VAC308)/locale
    67  
    68  TOOL_VAC308_REDIRECT ?= $(REDIRECT) \
     65
     66 TOOL_VAC308_ENV_SETUP ?= $(REDIRECT) \
    6967        -E 'BEGINLIBPATH=$(PATH_TOOL_VAC308_DLL);$(BEGINLIBPATH)' \
    7068        -E 'DPATH=$(PATH_TOOL_VAC308_LOCALE);$(PATH_TOOL_VAC308_HELP);$(DPATH)' \
     
    7270        -E 'INCLUDE=' \
    7371        --
    74  TOOL_VAC308_CC  ?= $(TOOL_VAC308_REDIRECT) $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE)
    75  TOOL_VAC308_CXX ?= $(TOOL_VAC308_REDIRECT) $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE)
    76  TOOL_VAC308_AR  ?= $(TOOL_VAC308_REDIRECT) $(PATH_TOOL_VAC308_BIN)/ilib$(HOSTSUFF_EXE)
    77  TOOL_VAC308_LD  ?= $(TOOL_VAC308_REDIRECT) $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE)
    78  TOOL_VAC308_RC  ?= $(TOOL_VAC308_REDIRECT) $(PATH_TOOL_VAC308_BIN)/rc$(HOSTSUFF_EXE)
     72 TOOL_VAC308_CC  ?= $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE)
     73 TOOL_VAC308_CXX ?= $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE)
     74 TOOL_VAC308_AR  ?= $(PATH_TOOL_VAC308_BIN)/ilib$(HOSTSUFF_EXE)
     75 TOOL_VAC308_LD  ?= $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE)
     76 TOOL_VAC308_RC  ?= $(PATH_TOOL_VAC308_BIN)/rc$(HOSTSUFF_EXE)
    7977
    8078else
    8179 # Pathless, relies on the environment.
    82  TOOL_VAC308_PATHLESS :=
     80 TOOL_VAC308_PATHLESS := yes
     81 TOOL_VAC308_ENV_SETUP ?= $(REDIRECT) \
     82        -E 'LIB=' \
     83        -E 'INCLUDE=' \
     84        --
    8385 TOOL_VAC308_CC  ?= icc$(HOSTSUFF_EXE)
    8486 TOOL_VAC308_CXX ?= icc$(HOSTSUFF_EXE)
     
    122124
    123125
    124 ## Compile C source.
    125 # @param    $(target)   Normalized main target name.
    126 # @param    $(source)   Source filename (relative).
    127 # @param    $(obj)      Object file name. This shall be (re)created by the compilation.
    128 # @param    $(dep)          Dependcy file. This shall be (re)created by the compilation.
    129 # @param    $(flags)    Flags.
    130 # @param    $(defs)     Definitions. No -D or something.
    131 # @param    $(incs)     Includes. No -I or something.
    132 # @param    $(dirdep)   Directory creation dependency.
    133 # @param    $(deps)             Other dependencies.
    134 #
    135 # @param    $(outbase)  Output basename (full). Use this for list files and such.
    136 # @param    $(objsuff)  Object suffix.
    137126TOOL_VAC308_COMPILE_C_DEPEND =
    138127TOOL_VAC308_COMPILE_C_DEPORD =
    139128TOOL_VAC308_COMPILE_C_OUTPUT =
    140129define TOOL_VAC308_COMPILE_C_CMDS
    141         $(QUIET) $(TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -c\
     130        $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -c\
    142131                $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
    143132                -Fo$(obj)\
    144133                $(abspath $(source))
    145         $(QUIET) $(TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -P+ -Pd+ \
     134        $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -P+ -Pd+ \
    146135                $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
    147136                $(abspath $(source)) \
     
    149138endef
    150139
    151 
    152 ## Compile C++ source.
    153 # @param    $(target)   Normalized main target name.
    154 # @param    $(source)   Source filename (relative).
    155 # @param    $(obj)      Object file name. This shall be (re)created by the compilation.
    156 # @param    $(dep)          Dependcy file. This shall be (re)created by the compilation.
    157 # @param    $(flags)    Flags.
    158 # @param    $(defs)     Definitions. No -D or something.
    159 # @param    $(incs)     Includes. No -I or something.
    160 # @param    $(dirdep)   Directory creation dependency.
    161 # @param    $(deps)             Other dependencies.
    162 #
    163 # @param    $(outbase)  Output basename (full). Use this for list files and such.
    164 # @param    $(objsuff)  Object suffix.
    165140TOOL_VAC308_COMPILE_CXX_DEPEND =
    166141TOOL_VAC308_COMPILE_CXX_DEPORD =
    167142TOOL_VAC308_COMPILE_CXX_OUTPUT =
    168143define TOOL_VAC308_COMPILE_CXX_CMDS
    169         $(QUIET) $(TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CXX) -c\
     144        $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CXX) -c\
    170145                $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
    171146                -Fo$(obj)\
    172147                $(abspath $(source))
    173         $(QUIET) $(TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CXX) -P+ -Pd+ \
     148        $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CXX) -P+ -Pd+ \
    174149                $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
    175150                $(abspath $(source)) \
     
    177152endef
    178153
    179 
    180 ## Compile resource source.
    181 # @param    $(target)   Normalized main target name.
    182 # @param    $(source)   Source filename (relative).
    183 # @param    $(obj)      Object file name. This shall be (re)created by the compilation.
    184 # @param    $(dep)      Dependcy file. This shall be (re)created by the compilation.
    185 # @param    $(flags)    Flags.
    186 # @param    $(defs)     Definitions. No -D or something.
    187 # @param    $(incs)     Includes. No -I or something.
    188 # @param    $(dirdep)   Directory creation dependency.
    189 # @param    $(deps)     Other dependencies.
    190 #
    191 # @param    $(outbase)  Output basename (full). Use this for list files and such.
    192 # @param    $(objsuff)  Object suffix.
    193154TOOL_VAC308_COMPILE_RC_OUTPUT =
    194155TOOL_VAC308_COMPILE_RC_DEPEND =
    195156TOOL_VAC308_COMPILE_RC_DEPORD =
    196157define TOOL_VAC308_COMPILE_RC_CMDS
    197         $(QUIET) $(TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_RC) -r\
     158        $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_RC) -r\
    198159                $(flags) $(addprefix -i, $(subst /,\\,$(incs))) $(addprefix -D, $(defs))\
    199160                $(subst /,\\,$(abspath $(source))) \
     
    201162endef
    202163
    203 
    204 ## Link library
    205 # @param    $(target)   Normalized main target name.
    206 # @param    $(out)              Library name.
    207 # @param    $(objs)     Object files to put in the library.
    208 # @param    $(flags)    Flags.
    209 # @param    $(dirdep)   Directory creation dependency.
    210 # @param    $(deps)             Other dependencies.
    211 # @param    $(othersrc) Unhandled sources.
    212 #
    213 # @param    $(outbase)  Output basename (full). Use this for list files and such.
    214 TOOL_VAC308_LINK_LIBRARY_OUTPUT = ## @todo $(outbase).rsp
     164TOOL_VAC308_LINK_LIBRARY_OUTPUT = ## @todo $(outbase).rsp
    215165TOOL_VAC308_LINK_LIBRARY_DEPEND = $(othersrc)
    216166TOOL_VAC308_LINK_LIBRARY_DEPORD =
    217167define TOOL_VAC308_LINK_LIBRARY_CMDS
    218168        $(if $(strip $(othersrc)),\
    219                 $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
     169                $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
    220170                $(TOOL_VAC308_IMP) $(TOOL_VAC308_IMPFLAGS) $(subst /,\\,$(out)) $(subst /,\\,$(othersrc)) )
    221         $(if $(strip $(objs)),$(QUIET)$(TOOL_VAC308_ENV_SETUP) \
    222                 $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
     171        $(if $(strip $(objs)),$(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
    223172                $(TOOL_VAC308_AR) $(flags) $(subst /,\\,$(out)) $(foreach obj,$(subst /,\\,$(objs)),+"$(obj)") ";" )
    224173endef
    225174
    226 
    227 ## Link program
    228 # @param    $(target)   Normalized main target name.
    229 # @param    $(out)              Program name.
    230 # @param    $(objs)     Object files to link together.
    231 # @param    $(libs)     Libraries to search.
    232 # @param    $(libpath)  Library search paths.
    233 # @param    $(flags)    Flags.
    234 # @param    $(dirdep)   Directory creation dependency.
    235 # @param    $(deps)             Other dependencies.
    236 # @param    $(othersrc) Unhandled sources.
    237 # @param    $(custom_pre)   Custom step invoked before linking.
    238 # @param    $(custom_post)  Custom step invoked after linking.
    239 #
    240 # @param    $(outbase)  Output basename (full). Use this for list files and such.
    241175TOOL_VAC308_LINK_PROGRAM_OUTPUT = $(outbase).map
    242176TOOL_VAC308_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
    243177TOOL_VAC308_LINK_PROGRAM_DEPORD =
    244178define TOOL_VAC308_LINK_PROGRAM_CMDS
    245         $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
    246         $(if $(strip $(libpath)),LIB="$(subst ; ,;,$(foreach lp,$(libpath),$(lp);))$(LIB)") \
     179        $(QUIET)$(call TOOL_VAC308_ENV_SETUP,$(subst $(SP),;,$(libpath))) \
    247180                $(TOOL_VAC308_LD) $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc)
    248         $(if $(filter %.res,$(objs)), $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
     181        $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
    249182                $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out))
    250183endef
    251184
    252 
    253 ## Link DLL
    254 # @param    $(target)   Normalized main target name.
    255 # @param    $(out)              Program name.
    256 # @param    $(objs)     Object files to link together.
    257 # @param    $(libs)     Libraries to search.
    258 # @param    $(libpath)  Library search paths.
    259 # @param    $(flags)    Flags.
    260 # @param    $(dirdep)   Directory creation dependency.
    261 # @param    $(deps)             Other dependencies.
    262 # @param    $(othersrc) Unhandled sources.
    263 # @param    $(custom_pre)   Custom step invoked before linking.
    264 # @param    $(custom_post)  Custom step invoked after linking.
    265 #
    266 # @param    $(outbase)  Output basename (full). Use this for list files and such.
    267185TOOL_VAC308_LINK_DLL_OUTPUT = $(outbase).map
    268186TOOL_VAC308_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
    269187TOOL_VAC308_LINK_DLL_DEPORD =
    270188define TOOL_VAC308_LINK_DLL_CMDS
    271         $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
    272         $(if $(strip $(libpath)),LIB="$(subst ; ,;,$(foreach lp,$(libpath),$(lp);))$(LIB)") \
     189        $(QUIET)$(call TOOL_VAC308_ENV_SETUP,$(subst $(SP),;,$(libpath))) \
    273190                $(TOOL_VAC308_LD) /B"/DLL" $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc)
    274         $(if $(filter %.res,$(objs)), $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
     191        $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
    275192                $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out))
    276193endef
    277194
    278 
    279 ## Link system module (windows aka driver, linux aka kernel module)
    280 # @param    $(target)   Normalized main target name.
    281 # @param    $(out)              System module name.
    282 # @param    $(objs)     Object files to link together.
    283 # @param    $(libs)     Libraries to search.
    284 # @param    $(libpath)  Library search paths.
    285 # @param    $(flags)    Flags.
    286 # @param    $(dirdep)   Directory creation dependency.
    287 # @param    $(deps)             Other dependencies.
    288 # @param    $(othersrc) Unhandled sources.
    289 # @param    $(custom_pre)   Custom step invoked before linking.
    290 # @param    $(custom_post)  Custom step invoked after linking.
    291 #
    292 # @param    $(outbase)  Output basename (full). Use this for list files and such.
    293195TOOL_VAC308_LINK_SYSMOD_OUTPUT = $(outbase).map
    294196TOOL_VAC308_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
    295197TOOL_VAC308_LINK_SYSMOD_DEPORD =
    296198define TOOL_VAC308_LINK_SYSMOD_CMDS
    297         $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
    298         $(if $(strip $(libpath)),LIB="$(subst ; ,;,$(foreach lp,$(libpath),$(lp);))$(LIB)") \
    299                 $(TOOL_VAC308_LD) $(flags) -Fe$(out)  -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc)
    300         $(if $(filter %.res,$(objs)), $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
     199        $(QUIET)$(call TOOL_VAC308_ENV_SETUP,$(subst $(SP),;,$(libpath))) \
     200                $(TOOL_VAC308_LD) $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc)
     201        $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
    301202                $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out))
    302203endef
Note: See TracChangeset for help on using the changeset viewer.