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/GCC.kmk

    r353 r380  
    7676# @param    $(dirdep)   Directory creation dependency.
    7777# @param    $(deps)             Other dependencies.
    78 #
    7978# @param    $(outbase)  Output basename (full). Use this for list files and such.
    8079# @param    $(objsuff)  Object suffix.
    81 define TOOL_GCC_COMPILE_C
    82 #$ (warning dbg: TOOL_GCC_COMPILE_C: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff) deps=$(deps))
    83 $(obj): $(deps) $(source) | $(dirdep)
    84         $(call MSG_L2,Compiling $$@ using GCC)
     80#
     81TOOL_GCC_COMPILE_C_OUTPUT =
     82TOOL_GCC_COMPILE_C_DEPEND =
     83TOOL_GCC_COMPILE_C_DEPORD =
     84define TOOL_GCC_COMPILE_C_CMDS
    8585        $(TOOL_GCC_CC) -c\
    8686                $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
    87                 -Wp,-MD,$(dep) -Wp,-MT,$$@ \
    88                 -o $$@\
     87                -Wp,-MD,$(dep) -Wp,-MT,$(out) \
     88                -o $(out)\
    8989                $(call ABSPATH,$(source))
    90 
    9190endef
    9291
     
    105104# @param    $(outbase)  Output basename (full). Use this for list files and such.
    106105# @param    $(objsuff)  Object suffix.
    107 define TOOL_GCC_COMPILE_CXX
    108 #$ (warning dbg: TOOL_GCC_COMPILE_CXX: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff) deps=$(deps))
    109 $(obj): $(deps) $(source) | $(dirdep)
    110         $(call MSG_L2,Compiling $$@ using GCC)
     106TOOL_GCC_COMPILE_CXX_OUTPUT =
     107TOOL_GCC_COMPILE_CXX_DEPEND =
     108TOOL_GCC_COMPILE_CXX_DEPORD =
     109define TOOL_GCC_COMPILE_CXX_CMDS
    111110        $(TOOL_GCC_CXX) -c\
    112111                $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
    113                 -Wp,-MD,$(dep) -Wp,-MT,$$@ \
    114                 -o $$@\
     112                -Wp,-MD,$(dep) -Wp,-MT,$(out) \
     113                -o $(out)\
    115114                $(call ABSPATH,$(source))
    116 
    117115endef
    118116
     
    120118## Link library
    121119# @param    $(target)   Normalized main target name.
    122 # @param    $(lib)              Library name.
     120# @param    $(out)      Library name.
    123121# @param    $(objs)     Object files to put in the library.
    124122# @param    $(flags)    Flags.
     
    127125#
    128126# @param    $(outbase)  Output basename (full). Use this for list files and such.
    129 define TOOL_GCC_LINK_LIBRARY
    130 #$ (warning dbg: TOOL_GCC_LINK_LIBRARY: target=$(target) lib=$(lib) objs=$(objs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) outbase=$(outbase))
    131 $(lib): $(deps) $(objs) | $(dirdep)
    132         $(call MSG_L1,Creating Library $$@)
    133         $(RM) -f $$@
    134         $(TOOL_GCC_AR) $(flags) $$@ $(objs)
    135 
     127TOOL_GCC_LINK_LIBRARY_OUTPUT =
     128TOOL_GCC_LINK_LIBRARY_DEPEND =
     129TOOL_GCC_LINK_LIBRARY_DEPORD =
     130define TOOL_GCC_LINK_LIBRARY_CMDS
     131        $(TOOL_GCC_AR) $(flags) $(out) $(objs)
    136132endef
    137133
     
    151147#
    152148# @param    $(outbase)  Output basename (full). Use this for list files and such.
    153 define TOOL_GCC_LINK_PROGRAM
    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)
    156         $(call MSG_L1,Creating Program $$@)
    157 ifneq ($(custom_pre),)
    158         $(eval $(custom_pre))
    159 endif
    160         $(TOOL_GCC_LD) $(flags) -o $$@ $(objs) \
    161         $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
    162 ifneq ($(custom_post),)
    163         $(eval $(custom_post))
    164 endif
    165 
     149TOOL_GCC_LINK_PROGRAM_OUTPUT =
     150TOOL_GCC_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
     151TOOL_GCC_LINK_PROGRAM_DEPORD =
     152define TOOL_GCC_LINK_PROGRAM_CMDS
     153        $(TOOL_GCC_LD) $(flags) -o $(out) $(objs) \
     154                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
    166155endef
    167156
     
    179168# @param    $(custom_pre)   Custom step invoked before linking.
    180169# @param    $(custom_post)  Custom step invoked after linking.
    181 #
    182 # @param    $(outbase)  Output basename (full). Use this for list files and such.
    183 define TOOL_GCC_LINK_DLL
    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)
    186         $(call MSG_L1,Creating Program $$@)
    187 ifneq ($(custom_pre),)
    188         $(eval $(custom_pre))
    189 endif
    190         $(TOOL_GCC_LD) $(TOOL_GCC_LDFLAGS.dll) $(flags) -o $$@ $(objs) \
     170# @param    $(outbase)      Output basename (full). Use this for list files and such.
     171TOOL_GCC_LINK_DLL_OUTPUT =
     172TOOL_GCC_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
     173TOOL_GCC_LINK_DLL_DEPORD =
     174define TOOL_GCC_LINK_DLL_CMDS
     175        $(TOOL_GCC_LD) $(TOOL_GCC_LDFLAGS.dll) $(flags) -o $(out) $(objs) \
    191176                $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
    192 ifneq ($(custom_post),)
    193         $(eval $(custom_post))
    194 endif
    195 
    196177endef
    197178
Note: See TracChangeset for help on using the changeset viewer.