Changeset 353 for trunk/kBuild/tools


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.

Location:
trunk/kBuild/tools
Files:
7 edited

Legend:

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

    r301 r353  
    5757define TOOL_ALP_COMPILE_AS
    5858#$ (warning dbg: TOOL_ALP_COMPILE_AS: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff) deps=$(deps))
    59 $(obj): $(deps) $(source) | $(dirdep)
     59$(obj) $(outbase).lst: $(deps) $(source) | $(dirdep)
    6060        $(call MSG_L2,Compiling $$@ using ALP)
    6161        $(TOOL_ALP_AS) \
     
    6969endef
    7070
    71 
  • trunk/kBuild/tools/GCC.kmk

    r300 r353  
    44# kBuild Tool Config - Generic GCC.
    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#
     
    139139## Link program
    140140# @param    $(target)   Normalized main target name.
    141 # @param    $(exe)              Program name.
     141# @param    $(out)              Program name.
    142142# @param    $(objs)     Object files to link together.
    143143# @param    $(libs)     Libraries to search.
     
    152152# @param    $(outbase)  Output basename (full). Use this for list files and such.
    153153define TOOL_GCC_LINK_PROGRAM
    154 #$ (warning dbg: TOOL_GCC_LINK_PROGRAM: target=$(target) exe=$(exe) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))
    155 $(exe): $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) | $(dirdep)
     154#$ (warning dbg: TOOL_GCC_LINK_PROGRAM: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))
     155$(out): $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) | $(dirdep)
    156156        $(call MSG_L1,Creating Program $$@)
    157157ifneq ($(custom_pre),)
     
    167167
    168168
    169 ## Link program
     169## Link DLL
    170170# @param    $(target)   Normalized main target name.
    171 # @param    $(exe)              Program name.
     171# @param    $(out)              Program name.
    172172# @param    $(objs)     Object files to link together.
    173173# @param    $(libs)     Libraries to search.
     
    182182# @param    $(outbase)  Output basename (full). Use this for list files and such.
    183183define TOOL_GCC_LINK_DLL
    184 #$ (warning dbg: TOOL_GCC_LINK_DLL: target=$(target) exe=$(exe) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))
    185 $(exe): $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) | $(dirdep)
     184#$ (warning dbg: TOOL_GCC_LINK_DLL: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))
     185$(out): $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) | $(dirdep)
    186186        $(call MSG_L1,Creating Program $$@)
    187187ifneq ($(custom_pre),)
     
    189189endif
    190190        $(TOOL_GCC_LD) $(TOOL_GCC_LDFLAGS.dll) $(flags) -o $$@ $(objs) \
    191         $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
     191                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
    192192ifneq ($(custom_post),)
    193193        $(eval $(custom_post))
  • trunk/kBuild/tools/GCC3.kmk

    r337 r353  
    44# kBuild Tool Config - Generic GCC.
    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#
     
    146146define TOOL_GCC3_LINK_LIBRARY_ADDMOD
    147147
    148         echo "ADDMOD $(o)" >> $$@.ar-script
     148        echo "ADDMOD $(o)" >> $(lib).ar-script
    149149endef
    150150
     
    153153        $(MKDIR) -p $(dir $(outbase))ar.extract/$(notdir $(srclib))
    154154        cd $(dir $(outbase))ar.extract/$(notdir $(srclib)) && $(TOOL_GCC3_AR) x $(srclib)
    155         for o in `$(TOOL_GCC3_AR) t $(srclib)`; do echo "ADDMOD $(dir $(outbase))ar.extract/$(notdir $(srclib))/$$$${o}" >> $$@.ar-script; done
     155        for o in `$(TOOL_GCC3_AR) t $(srclib)`; do echo "ADDMOD $(dir $(outbase))ar.extract/$(notdir $(srclib))/$$$${o}" >> $(lib).ar-script; done
    156156endef
    157157
     
    162162        $(RM) -f $$@
    163163ifneq ($(strip $(filter %.a %.lib,$(othersrc))),)
    164         echo "CREATE $$@" > $$@.ar-script
     164        echo "CREATE $$@" > $(lib).ar-script
    165165        $(foreach o, $(objs),$(TOOL_GCC3_LINK_LIBRARY_ADDMOD))
    166166        $(foreach srclib, $(filter %.a %.lib,$(othersrc)),$(TOOL_GCC3_LINK_LIBRARY_EXPAND_LIB))
    167         echo "SAVE" >> $$@.ar-script
    168         echo "END" >> $$@.ar-script
    169         $(TOOL_GCC3_AR) -M < $$@.ar-script
     167        echo "SAVE" >> $(lib).ar-script
     168        echo "END" >> $(lib).ar-script
     169        $(TOOL_GCC3_AR) -M < $(lib).ar-script
    170170        $(RM) -Rf "$(dir $(outbase))ar.extract/"
     171
     172_OUT_FILES += $(lib).ar-script
    171173else
    172174        $(TOOL_GCC3_AR) $(flags) $$@ $(objs)
     
    178180## Link program
    179181# @param    $(target)   Normalized main target name.
    180 # @param    $(exe)              Program name.
     182# @param    $(out)              Program name.
    181183# @param    $(objs)     Object files to link together.
    182184# @param    $(libs)     Libraries to search.
     
    191193# @param    $(outbase)  Output basename (full). Use this for list files and such.
    192194define TOOL_GCC3_LINK_PROGRAM
    193 #$ (warning dbg: TOOL_GCC3_LINK_PROGRAM: target=$(target) exe=$(exe) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))
    194 $(exe): $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) | $(dirdep)
     195#$ (warning dbg: TOOL_GCC3_LINK_PROGRAM: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))
     196$(out) $(outbase).map: $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) | $(dirdep)
    195197        $(call MSG_L1,Creating Program $$@)
    196198ifneq ($(custom_pre),)
     
    212214## Link DLL
    213215# @param    $(target)   Normalized main target name.
    214 # @param    $(dll)              Program name.
     216# @param    $(out)              Program name.
    215217# @param    $(objs)     Object files to link together.
    216218# @param    $(libs)     Libraries to search.
     
    225227# @param    $(outbase)  Output basename (full). Use this for list files and such.
    226228define TOOL_GCC3_LINK_DLL
    227 #$ (warning dbg: TOOL_GCC3_LINK_PROGRAM: target=$(target) dll=$(dll) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))
    228 $(dll): $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) | $(dirdep)
     229#$ (warning dbg: TOOL_GCC3_LINK_PROGRAM: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))
     230$(out) $(outbase).map: $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) | $(dirdep)
    229231        $(call MSG_L1,Creating Program $$@)
    230232ifneq ($(custom_pre),)
     
    233235        $(RM) -f $$@
    234236        $(TOOL_GCC3_LD) $(TOOL_GCC3_LDFLAGS.dll) $(flags) -o $$@ \
    235                 $(if $(filter-out win32 os2, $(BUILD_TARGET)),$(call TOOL_GCC3_LD_SONAME,$(target),$(dll))) \
     237                $(if $(filter-out win32 os2, $(BUILD_TARGET)),$(call TOOL_GCC3_LD_SONAME,$(target),$(out))) \
    236238                $(objs) \
    237239                $(foreach p,$(libpath), -L$(p)) \
     
    247249## Link system module (windows aka driver, linux aka kernel module)
    248250# @param    $(target)   Normalized main target name.
    249 # @param    $(sys)              System module name.
     251# @param    $(out)              System module name.
    250252# @param    $(objs)     Object files to link together.
    251253# @param    $(libs)     Libraries to search.
     
    260262# @param    $(outbase)  Output basename (full). Use this for list files and such.
    261263define TOOL_GCC3_LINK_SYSMOD
    262 #$ (warning dbg: TOOL_GCC3_LINK_SYSMOD: target=$(target) sys=$(sys) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase))
    263 $(sys): $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) | $(dirdep)
     264#$ (warning dbg: TOOL_GCC3_LINK_SYSMOD: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase))
     265$(out) $(outbase).map: $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) | $(dirdep)
    264266        $(call MSG_L1,Creating Program $$@)
    265267ifneq ($(custom_pre),)
  • trunk/kBuild/tools/GCC3OMF.kmk

    r337 r353  
    44# kBuild Tool Config - OS/2 GCC v3 OMF.
    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#
     
    149149## Link program
    150150# @param    $(target)   Normalized main target name.
    151 # @param    $(exe)              Program name.
     151# @param    $(out)              Program name.
    152152# @param    $(objs)     Object files to link together.
    153153# @param    $(libs)     Libraries to search.
     
    162162# @param    $(outbase)  Output basename (full). Use this for list files and such.
    163163define TOOL_GCC3OMF_LINK_PROGRAM
    164 #$ (warning dbg: TOOL_GCC3OMF_LINK_PROGRAM: target=$(target) exe=$(exe) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))
    165 $(exe): $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(filter %.def, $(othersrc)) | $(dirdep)
     164#$ (warning dbg: TOOL_GCC3OMF_LINK_PROGRAM: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))
     165$(out) $(outbase).map: $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(filter %.def, $(othersrc)) | $(dirdep)
    166166        $(call MSG_L1,Creating Program $$@)
    167167ifneq ($(custom_pre),)
     
    183183## Link DLL
    184184# @param    $(target)   Normalized main target name.
    185 # @param    $(dll)              Program name.
     185# @param    $(out)              Program name.
    186186# @param    $(objs)     Object files to link together.
    187187# @param    $(libs)     Libraries to search.
     
    196196# @param    $(outbase)  Output basename (full). Use this for list files and such.
    197197define TOOL_GCC3OMF_LINK_DLL
    198 #$ (warning dbg: TOOL_GCC3OMF_LINK_PROGRAM: target=$(target) dll=$(dll) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))
    199 $(dll): $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(filter %.def, $(othersrc)) | $(dirdep)
     198#$ (warning dbg: TOOL_GCC3OMF_LINK_PROGRAM: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))
     199$(out) $(outbase).map: $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(filter %.def, $(othersrc)) | $(dirdep)
    200200        $(call MSG_L1,Creating Program $$@)
    201201ifneq ($(custom_pre),)
     
    216216## Link system module (windows aka driver, linux aka kernel module)
    217217# @param    $(target)   Normalized main target name.
    218 # @param    $(sys)              System module name.
     218# @param    $(out)              System module name.
    219219# @param    $(objs)     Object files to link together.
    220220# @param    $(libs)     Libraries to search.
     
    229229# @param    $(outbase)  Output basename (full). Use this for list files and such.
    230230define TOOL_GCC3OMF_LINK_SYSMOD
    231 #$ (warning dbg: TOOL_GCC3OMF_LINK_SYSMOD: target=$(target) sys=$(sys) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase))
    232 $(sys): $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(filter %.def, $(othersrc)) | $(dirdep)
     231#$ (warning dbg: TOOL_GCC3OMF_LINK_SYSMOD: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase))
     232$(out) $(outbase).map: $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(filter %.def, $(othersrc)) | $(dirdep)
    233233        $(call MSG_L1,Creating Program $$@)
    234234ifneq ($(custom_pre),)
  • trunk/kBuild/tools/MINGW32.kmk

    r300 r353  
    44# kBuild Tool Config - MINGW32 GCC.
    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#
     
    150150## Link library
    151151# @param    $(target)   Normalized main target name.
    152 # @param    $(lib)              Library name.
     152# @param    $(lib)      Library name.
    153153# @param    $(objs)     Object files to put in the library.
    154154# @param    $(flags)    Flags.
    155155# @param    $(dirdep)   Directory creation dependency.
    156 # @param    $(deps)             Other dependencies.
     156# @param    $(deps)     Other dependencies.
    157157#
    158158# @param    $(outbase)  Output basename (full). Use this for list files and such.
     
    169169## Link program
    170170# @param    $(target)   Normalized main target name.
    171 # @param    $(exe)              Program name.
     171# @param    $(out)      Program name.
    172172# @param    $(objs)     Object files to link together.
    173173# @param    $(libs)     Libraries to search.
     
    175175# @param    $(flags)    Flags.
    176176# @param    $(dirdep)   Directory creation dependency.
    177 # @param    $(deps)             Other dependencies.
    178 # @param    $(othersrc) Unhandled sources.
     177# @param    $(deps)     Other dependencies.
     178# @param    $(othersrc)     Unhandled sources.
    179179# @param    $(custom_pre)   Custom step invoked before linking.
    180180# @param    $(custom_post)  Custom step invoked after linking.
     
    182182# @param    $(outbase)  Output basename (full). Use this for list files and such.
    183183define TOOL_MINGW32_LINK_PROGRAM
    184 #$ (warning dbg: TOOL_MINGW32_LINK_PROGRAM: target=$(target) exe=$(exe) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))
    185 $(exe): $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) | $(dirdep)
     184#$ (warning dbg: TOOL_MINGW32_LINK_PROGRAM: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))
     185$(out): $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) | $(dirdep)
    186186        $(call MSG_L1,Creating Program $$@)
    187187ifneq ($(custom_pre),)
     
    198198
    199199
    200 ## Link system module (windows aka driver, linux aka kernel module)
    201 # @param    $(target)   Normalized main target name.
    202 # @param    $(dll)              System module name.
     200## Link DLL.
     201# @param    $(target)   Normalized main target name.
     202# @param    $(out)      DLL name.
    203203# @param    $(objs)     Object files to link together.
    204204# @param    $(libs)     Libraries to search.
     
    206206# @param    $(flags)    Flags.
    207207# @param    $(dirdep)   Directory creation dependency.
    208 # @param    $(deps)             Other dependencies.
    209 # @param    $(othersrc) Unhandled sources.
     208# @param    $(deps)     Other dependencies.
     209# @param    $(othersrc)     Unhandled sources.
    210210# @param    $(custom_pre)   Custom step invoked before linking.
    211211# @param    $(custom_post)  Custom step invoked after linking.
     
    213213# @param    $(outbase)  Output basename (full). Use this for list files and such.
    214214define TOOL_MINGW32_LINK_DLL
    215 #$ (warning dbg: TOOL_MINGW32_LINK_DLL: target=$(target) dll=$(dll) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase))
    216 $(dll): $(deps) $(call DIRDEP,$(PATH_LIB)) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) | $(dirdep)
     215#$ (warning dbg: TOOL_MINGW32_LINK_DLL: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase))
     216$(out) $(outbase).a $(outbase).exp: \
     217                $(deps) $(call DIRDEP,$(PATH_LIB)) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) | $(dirdep)
    217218        $(call MSG_L1,Creating Program $$@)
    218219ifneq ($(custom_pre),)
     
    220221endif
    221222        $(TOOL_MINGW32_DLLWRAP) $(flags) \
    222                 --dllname=$(dll) \
     223                --dllname=$(out) \
    223224                --output-exp=$(outbase).exp \
    224225                --output-lib=$(outbase).a \
     
    234235        $(eval $(custom_post))
    235236endif
    236 _OUT_FILES += $(outbase).map $(outbase).a $(outbase).exp
    237 
    238 endef
    239 
     237_OUT_FILES += $(outbase).a $(outbase).exp
     238
     239endef
     240
  • trunk/kBuild/tools/NASM.kmk

    r300 r353  
    44# kBuild Tool Config - NASM     0.98 or later.
    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#
     
    5757define TOOL_NASM_COMPILE_AS
    5858#$ (warning dbg: TOOL_NASM_COMPILE_AS: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff) deps=$(deps))
    59 $(obj): $(deps) $(source) | $(dirdep)
     59$(obj) $(outbase).lst: $(deps) $(source) | $(dirdep)
    6060        $(call MSG_L2,Compiling $$@ using NASM)
    6161        $(TOOL_NASM_AS) \
     
    6868endef
    6969
    70 
  • 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.