Ignore:
Timestamp:
Dec 18, 2005, 2:52:47 PM (20 years ago)
Author:
bird
Message:

Big command dependency job. More installation stuff.

File:
1 edited

Legend:

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

    r353 r380  
    8282# @param    $(outbase)  Output basename (full). Use this for list files and such.
    8383# @param    $(objsuff)  Object suffix.
    84 define TOOL_VCC70_COMPILE_C
    85 #$ (warning dbg: TOOL_VCC70_COMPILE_C: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff))
    86 $(obj) $(call TOOL_VCC70_PDB, $(outbase)-obj): $(deps) $(source) | $(dirdep)
    87         $(call MSG_L2,Compiling $$@ using VCC70)
     84TOOL_VCC70_COMPILE_C_OUTPUT     = $(call TOOL_VCC70_PDB, $(outbase)-obj)
     85TOOL_VCC70_COMPILE_C_DEPEND     =
     86TOOL_VCC70_COMPILE_C_DEPORD =
     87define TOOL_VCC70_COMPILE_C_CMDS
    8888        $(TOOL_VCC70_CC) -c\
    8989                $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
     
    9595                $(subst /,\\,$(call ABSPATH,$(source)))\
    9696                | $(DEP_PRE) -f -s -o $(dep) -t $(obj) -
    97 _OUT_FILES += $(call TOOL_VCC70_PDB, $(outbase)-obj)
    98 
    9997endef
    10098
     
    113111# @param    $(outbase)  Output basename (full). Use this for list files and such.
    114112# @param    $(objsuff)  Object suffix.
    115 define TOOL_VCC70_COMPILE_CXX
    116 #$ (warning dbg: TOOL_VCC70_COMPILE_CXX: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff))
    117 $(obj) $(call TOOL_VCC70_PDB, $(outbase)-obj): $(deps) $(source) | $(dirdep)
    118         $(call MSG_L2,Compiling $$@ using VCC70)
     113TOOL_VCC70_COMPILE_CXX_OUTPUT = $(call TOOL_VCC70_PDB, $(outbase)-obj)
     114TOOL_VCC70_COMPILE_CXX_DEPEND =
     115TOOL_VCC70_COMPILE_CXX_DEPORD =
     116define TOOL_VCC70_COMPILE_CXX_CMDS
    119117        $(TOOL_VCC70_CXX) -c\
    120118                $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
     
    126124                $(subst /,\\,$(call ABSPATH,$(source)))\
    127125                | $(DEP_PRE) -f -s -o $(dep) -t $(obj) -
    128 _OUT_FILES += $(call TOOL_VCC70_PDB, $(outbase)-obj)
    129 
    130126endef
    131127
     
    133129## Link library
    134130# @param    $(target)   Normalized main target name.
    135 # @param    $(lib)              Library name.
     131# @param    $(out)      Library name.
    136132# @param    $(objs)     Object files to put in the library.
    137133# @param    $(flags)    Flags.
    138134# @param    $(dirdep)   Directory creation dependency.
    139 # @param    $(deps)             Other dependencies.
     135# @param    $(deps)     Other dependencies.
    140136# @param    $(othersrc) Unhandled sources.
    141 #
    142 # @param    $(outbase)  Output basename (full). Use this for list files and such.
    143 define TOOL_VCC70_LINK_LIBRARY
    144 #$ (warning dbg: TOOL_VCC70_LINK_LIBRARY: target=$(target) lib=$(lib) objs=$(objs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) outbase=$(outbase))
    145 $(lib) $(outbase).lst $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)): $(deps) $(objs) $(othersrc) | $(dirdep)
    146         $(call MSG_L1,Creating Library $$@)
    147         $(RM) -f $$@
    148         $(TOOL_VCC70_AR) $(flags) /OUT:$(lib) $(subst /,\\,$(objs) $(filter %.a %.lib,$(othersrc))) \
     137# @param    $(outbase)  Output basename (full). Use this for list files and such.
     138#
     139TOOL_VCC70_LINK_LIBRARY_OUTPUT = $(outbase).lst $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase))
     140TOOL_VCC70_LINK_LIBRARY_DEPEND = $(othersrc)
     141TOOL_VCC70_LINK_LIBRARY_DEPORD =
     142define TOOL_VCC70_LINK_LIBRARY_CMDS
     143        $(TOOL_VCC70_AR) $(flags) /OUT:$(out) $(subst /,\\,$(objs) $(filter %.a %.lib,$(othersrc))) \
    149144                $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def))
    150 _OUT_FILES += $(outbase).lst $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase))
    151 
    152145endef
    153146
     
    165158# @param    $(custom_pre)   Custom step invoked before linking.
    166159# @param    $(custom_post)  Custom step invoked after linking.
    167 #
    168 # @param    $(outbase)  Output basename (full). Use this for list files and such.
    169 define TOOL_VCC70_LINK_PROGRAM
    170 #$ (warning dbg: TOOL_VCC70_LINK_PROGRAM: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase))
    171 $(out) $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk: \
    172                 $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) | $(dirdep)
    173         $(call MSG_L1,Creating Program $$@)
    174 ifneq ($(custom_pre),)
    175         $(eval $(custom_pre))
    176 endif
     160# @param    $(outbase)      Output basename (full). Use this for list files and such.
     161#
     162TOOL_VCC70_LINK_PROGRAM_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk
     163TOOL_VCC70_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
     164TOOL_VCC70_LINK_PROGRAM_DEPORD =
     165define TOOL_VCC70_LINK_PROGRAM_CMDS
    177166        $(TOOL_VCC70_LD) $(flags) \
    178167                /OUT:$(out) \
     
    184173                $(subst /,\\,$(objs)) \
    185174                $(subst /,\\,$(libs))
    186 ifneq ($(custom_post),)
    187         $(eval $(custom_post))
    188 endif
    189 _OUT_FILES += $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk
    190 
    191 endef
    192 
    193 
    194 ## Link system module (windows aka driver, linux aka kernel module)
    195 # @param    $(target)       Normalized main target name.
    196 # @param    $(out)          System module name.
    197 # @param    $(objs)         Object files to link together.
    198 # @param    $(libs)         Libraries to search.
    199 # @param    $(libpath)      Library search paths.
    200 # @param    $(flags)        Flags.
    201 # @param    $(dirdep)       Directory creation dependency.
    202 # @param    $(deps)         Other dependencies.
    203 # @param    $(othersrc)     Unhandled sources.
    204 # @param    $(custom_pre)   Custom step invoked before linking.
    205 # @param    $(custom_post)  Custom step invoked after linking.
    206 #
    207 # @param    $(outbase)  Output basename (full). Use this for list files and such.
    208 define TOOL_VCC70_LINK_SYSMOD
    209 #$ (warning dbg: TOOL_VCC70_LINK_SYSMOD: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase))
    210 $(out) $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk: \
    211                 $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) | $(dirdep)
    212         $(call MSG_L1,Creating Program $$@)
    213 ifneq ($(custom_pre),)
    214         $(eval $(custom_pre))
    215 endif
    216         $(TOOL_VCC70_LD) $(flags) \
    217                 /OUT:$(out) \
    218                 /MAPINFO:EXPORTS /MAPINFO:LINES \
    219                 /MAP:$(outbase).map \
    220                 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
    221                 $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
    222                 $(foreach p,$(libpath), /LIBPATH:$(p)) \
    223                 $(subst /,\\,$(objs)) \
    224                 $(subst /,\\,$(libs))
    225 ifneq ($(custom_post),)
    226         $(eval $(custom_post))
    227 endif
    228 _OUT_FILES += $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk
    229 
    230175endef
    231176
     
    245190#
    246191# @param    $(outbase)  Output basename (full). Use this for list files and such.
    247 define TOOL_VCC70_LINK_DLL
    248 #$ (warning dbg: TOOL_VCC70_LINK_DLL: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase))
    249 $(out) $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk: \
    250                 $(deps) $(call DIRDEP,$(PATH_LIB)) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) | $(dirdep)
    251         $(call MSG_L1,Creating Program $$@)
    252 ifneq ($(custom_pre),)
    253         $(eval $(custom_pre))
    254 endif
     192TOOL_VCC70_LINK_DLL_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk
     193TOOL_VCC70_LINK_DLL_DEPEND = $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
     194TOOL_VCC70_LINK_DLL_DEPORD = $(call DIRDEP,$(PATH_LIB))
     195define TOOL_VCC70_LINK_DLL_CMDS
    255196        $(TOOL_VCC70_LD) $(flags) \
    256197                /OUT:$(out) \
     
    268209        if test -f $(outbase).lib; then $(CP_EXT) $(outbase).lib $(PATH_LIB)/; fi
    269210endif
    270 ifneq ($(custom_post),)
    271         $(eval $(custom_post))
    272 endif
    273 _OUT_FILES += $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk
    274 _DIRS += $(PATH_LIB)
    275 
    276 endef
    277 
     211$(eval _DIRS += $(PATH_LIB))
     212endef
     213
     214
     215## Link system module (windows aka driver, linux aka kernel module)
     216# @param    $(target)       Normalized main target name.
     217# @param    $(out)          System module name.
     218# @param    $(objs)         Object files to link together.
     219# @param    $(libs)         Libraries to search.
     220# @param    $(libpath)      Library search paths.
     221# @param    $(flags)        Flags.
     222# @param    $(dirdep)       Directory creation dependency.
     223# @param    $(deps)         Other dependencies.
     224# @param    $(othersrc)     Unhandled sources.
     225# @param    $(custom_pre)   Custom step invoked before linking.
     226# @param    $(custom_post)  Custom step invoked after linking.
     227#
     228# @param    $(outbase)  Output basename (full). Use this for list files and such.
     229TOOL_VCC70_LINK_SYSMOD_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk
     230TOOL_VCC70_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
     231TOOL_VCC70_LINK_SYSMOD_DEPORD =
     232define TOOL_VCC70_LINK_SYSMOD_CMDS
     233        $(TOOL_VCC70_LD) $(flags) \
     234                /OUT:$(out) \
     235                /MAPINFO:EXPORTS /MAPINFO:LINES \
     236                /MAP:$(outbase).map \
     237                $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
     238                $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
     239                $(foreach p,$(libpath), /LIBPATH:$(p)) \
     240                $(subst /,\\,$(objs)) \
     241                $(subst /,\\,$(libs))
     242endef
     243
Note: See TracChangeset for help on using the changeset viewer.