Ignore:
Timestamp:
Dec 12, 2005, 4:36:07 AM (20 years ago)
Author:
bird
Message:

Use fixed lot's of those $$$$(PATH_<target>) thingies. Better target install, install pass and install target type. Generic passes. And more.

File:
1 edited

Legend:

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

    r339 r353  
    44# kBuild Tool Config - Visual C++ 7.0 (aka Visual .NET)
    55#
    6 # Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6# Copyright (c) 2004-2005 knut st. osmundsen <bird-srcspam@anduin.net>
    77#
    88#
     
    8484define TOOL_VCC70_COMPILE_C
    8585#$ (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): $(deps) $(source) | $(dirdep)
     86$(obj) $(call TOOL_VCC70_PDB, $(outbase)-obj): $(deps) $(source) | $(dirdep)
    8787        $(call MSG_L2,Compiling $$@ using VCC70)
    8888        $(TOOL_VCC70_CC) -c\
    8989                $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
    90                 -Fd$(outbase).pdb \
     90                -Fd$(outbase)-obj.pdb \
    9191                -Fo$(obj)\
    9292                $(subst /,\\,$(call ABSPATH,$(source)))
     
    9595                $(subst /,\\,$(call ABSPATH,$(source)))\
    9696                | $(DEP_PRE) -f -s -o $(dep) -t $(obj) -
    97 _OUT_FILES += $(call TOOL_VCC70_PDB, $(outbase))
     97_OUT_FILES += $(call TOOL_VCC70_PDB, $(outbase)-obj)
    9898
    9999endef
     
    115115define TOOL_VCC70_COMPILE_CXX
    116116#$ (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): $(deps) $(source) | $(dirdep)
     117$(obj) $(call TOOL_VCC70_PDB, $(outbase)-obj): $(deps) $(source) | $(dirdep)
    118118        $(call MSG_L2,Compiling $$@ using VCC70)
    119119        $(TOOL_VCC70_CXX) -c\
    120120                $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
    121                 -Fd$(outbase).pdb \
     121                -Fd$(outbase)-obj.pdb \
    122122                -Fo$(obj)\
    123123                $(subst /,\\,$(call ABSPATH,$(source)))
     
    126126                $(subst /,\\,$(call ABSPATH,$(source)))\
    127127                | $(DEP_PRE) -f -s -o $(dep) -t $(obj) -
    128 _OUT_FILES += $(call TOOL_VCC70_PDB, $(outbase))
     128_OUT_FILES += $(call TOOL_VCC70_PDB, $(outbase)-obj)
    129129
    130130endef
     
    143143define TOOL_VCC70_LINK_LIBRARY
    144144#$ (warning dbg: TOOL_VCC70_LINK_LIBRARY: target=$(target) lib=$(lib) objs=$(objs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) outbase=$(outbase))
    145 $(lib): $(deps) $(objs) $(othersrc) | $(dirdep)
     145$(lib) $(outbase).lst $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)): $(deps) $(objs) $(othersrc) | $(dirdep)
    146146        $(call MSG_L1,Creating Library $$@)
    147147        $(RM) -f $$@
     
    155155## Link program
    156156# @param    $(target)       Normalized main target name.
    157 # @param    $(exe)          Program name.
     157# @param    $(out)          Program name.
    158158# @param    $(objs)         Object files to link together.
    159159# @param    $(libs)         Libraries to search.
     
    168168# @param    $(outbase)  Output basename (full). Use this for list files and such.
    169169define TOOL_VCC70_LINK_PROGRAM
    170 #$ (warning dbg: TOOL_VCC70_LINK_PROGRAM: target=$(target) exe=$(exe) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase))
    171 $(exe): $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) | $(dirdep)
     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)
    172173        $(call MSG_L1,Creating Program $$@)
    173174ifneq ($(custom_pre),)
     
    175176endif
    176177        $(TOOL_VCC70_LD) $(flags) \
    177                 /OUT:$(exe) \
     178                /OUT:$(out) \
    178179                /MAPINFO:EXPORTS /MAPINFO:LINES \
    179180                /MAP:$(outbase).map \
     
    193194## Link system module (windows aka driver, linux aka kernel module)
    194195# @param    $(target)       Normalized main target name.
    195 # @param    $(sys)          System module name.
     196# @param    $(out)          System module name.
    196197# @param    $(objs)         Object files to link together.
    197198# @param    $(libs)         Libraries to search.
     
    206207# @param    $(outbase)  Output basename (full). Use this for list files and such.
    207208define TOOL_VCC70_LINK_SYSMOD
    208 #$ (warning dbg: TOOL_VCC70_LINK_SYSMOD: target=$(target) sys=$(sys) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase))
    209 $(sys): $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) | $(dirdep)
     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)
    210212        $(call MSG_L1,Creating Program $$@)
    211213ifneq ($(custom_pre),)
     
    213215endif
    214216        $(TOOL_VCC70_LD) $(flags) \
    215                 /OUT:$(sys) \
     217                /OUT:$(out) \
    216218                /MAPINFO:EXPORTS /MAPINFO:LINES \
    217219                /MAP:$(outbase).map \
     
    229231
    230232
    231 ## Link system module (windows aka driver, linux aka kernel module)
    232 # @param    $(target)   Normalized main target name.
    233 # @param    $(dll)              System module name.
     233## Link DLL.
     234# @param    $(target)   Normalized main target name.
     235# @param    $(out)      DLL name.
    234236# @param    $(objs)     Object files to link together.
    235237# @param    $(libs)     Libraries to search.
     
    237239# @param    $(flags)    Flags.
    238240# @param    $(dirdep)   Directory creation dependency.
    239 # @param    $(deps)             Other dependencies.
    240 # @param    $(othersrc) Unhandled sources.
     241# @param    $(deps)     Other dependencies.
     242# @param    $(othersrc)     Unhandled sources.
    241243# @param    $(custom_pre)   Custom step invoked before linking.
    242244# @param    $(custom_post)  Custom step invoked after linking.
     
    244246# @param    $(outbase)  Output basename (full). Use this for list files and such.
    245247define TOOL_VCC70_LINK_DLL
    246 #$ (warning dbg: TOOL_VCC70_LINK_DLL: target=$(target) dll=$(dll) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase))
    247 $(dll): $(deps) $(call DIRDEP,$(PATH_LIB)) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) | $(dirdep)
     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)
    248251        $(call MSG_L1,Creating Program $$@)
    249252ifneq ($(custom_pre),)
     
    251254endif
    252255        $(TOOL_VCC70_LD) $(flags) \
    253                 /OUT:$(dll) \
     256                /OUT:$(out) \
    254257                /IMPLIB:$(outbase).lib \
    255258                /MAPINFO:EXPORTS /MAPINFO:LINES \
Note: See TracChangeset for help on using the changeset viewer.