Changeset 184 for trunk/kBuild


Ignore:
Timestamp:
Dec 4, 2004, 3:26:54 AM (21 years ago)
Author:
bird
Message:

Dependencies.

Location:
trunk/kBuild
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer.kmk

    r183 r184  
    577577$(eval obj         := $(outbase)$(objsuff))
    578578$(eval dep         := $(outbase)$(SUFF_DEP))
    579 
    580 #$ (warning dbg: target=$(target) source=$(source) tool=$(tool) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff))
     579$(eval deps        := \
     580        $($(target)_$(source)_DEPS)\
     581    $($(target)_$(source)_DEPS.$(BUILD_TYPE))\
     582    $($(target)_$(source)_DEPS.$(BUILD_TARGET))\
     583    $($(target)_$(source)_DEPS.$(BUILD_TARGET_ARCH))\
     584    $($(target)_$(source)_DEPS.$(BUILD_TARGET_CPU))\
     585        $($(source)_DEPS)\
     586        $($(source)_DEPS.$(BUILD_TYPE))\
     587        $($(source)_DEPS.$(BUILD_TARGET))\
     588        $($(target)_DEPS)\
     589        $($(target)_DEPS.$(BUILD_TARGET_ARCH))\
     590        $($(target)_DEPS.$(BUILD_TARGET_CPU)))
     591
     592
     593#$ (warning dbg: target=$(target) source=$(source) tool=$(tool) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff) deps=$(deps))
    581594ifndef TOOL_$(tool)_COMPILE_$(type)
    582595$$(warning kBuild: TOOL_$(tool)_COMPILE_$(type) is not defined. source=$(source) target=$(target) )
     
    667680$(eval dirdep      := $(dir $(lib)).dir_created)
    668681## @todo fix dependencies on makefiles an such
    669 $(eval deps        := )
     682$(eval deps        := $($(target)_DEPS))
    670683
    671684$(eval $(TOOL_$(tool)_LINK_LIBRARY))
     
    798811$(eval dirdep      := $(dir $(exe)).dir_created)
    799812## @todo fix dependencies
    800 $(eval deps        := )
     813$(eval deps        := $($(target)_DEPS))
    801814#
    802815$(eval custom_pre    := $(strip $(firstword
     
    950963$(eval dirdep      := $(dir $(dll)).dir_created)
    951964## @todo fix dependencies
    952 $(eval deps        := )
     965$(eval deps        := $($(target)_DEPS))
    953966#
    954967$(eval custom_pre    := $(strip $(firstword
     
    11161129$(eval dirdep      := $(dir $(sys)).dir_created)
    11171130## @todo fix dependencies
    1118 $(eval deps        := )
     1131$(eval deps        := $($(target)_DEPS))
    11191132#
    11201133$(eval custom_pre    := $(strip $(firstword
  • trunk/kBuild/tools/GCC.kmk

    r181 r184  
    7575# @param    $(incs)     Includes. No -I or something.
    7676# @param        $(dirdep)   Directory creation dependency.
     77# @param        $(deps)         Other dependencies.
    7778#
    7879# @param    $(outbase)  Output basename (full). Use this for list files and such.
    7980# @param        $(objsuff)  Object suffix.
    8081define TOOL_GCC_COMPILE_C
    81 #$ (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))
    82 $(obj): $(dirdep) $(PATH_CURRENT)/$(source)
     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): $(dirdep) $(PATH_CURRENT)/$(source) $(deps)
    8384        $(call MSG_L2,Compiling $$@ using GCC)
    8485        $(TOOL_GCC_CC) -c\
     
    8788                -o $$@\
    8889                $(call ABSPATH,$(source))
    89                
     90
    9091endef
    9192
     
    100101# @param    $(incs)     Includes. No -I or something.
    101102# @param        $(dirdep)   Directory creation dependency.
     103# @param        $(deps)         Other dependencies.
    102104#
    103105# @param    $(outbase)  Output basename (full). Use this for list files and such.
    104106# @param        $(objsuff)  Object suffix.
    105107define TOOL_GCC_COMPILE_CXX
    106 #$ (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))
    107 $(obj): $(dirdep) $(source)
     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): $(dirdep) $(source) $(deps)
    108110        $(call MSG_L2,Compiling $$@ using GCC)
    109111        $(TOOL_GCC_CXX) -c\
     
    112114                -o $$@\
    113115                $(call ABSPATH,$(source))
    114                
     116
    115117endef
    116118
     
    131133        $(RM) -f $$@
    132134        $(TOOL_GCC_AR) $(flags) $$@ $(objs)
    133        
     135
    134136endef
    135137
     
    155157ifneq ($(custom_pre),)
    156158        $(eval $(custom_pre))
    157 endif   
     159endif
    158160        $(TOOL_GCC_LD) $(flags) -o $$@ $(objs) \
    159161        $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
    160162ifneq ($(custom_post),)
    161163        $(eval $(custom_post))
    162 endif   
    163        
     164endif
     165
    164166endef
    165167
     
    185187ifneq ($(custom_pre),)
    186188        $(eval $(custom_pre))
    187 endif   
     189endif
    188190        $(TOOL_GCC_LD) $(TOOL_GCC_LDFLAGS.dll) $(flags) -o $$@ $(objs) \
    189191        $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
    190192ifneq ($(custom_post),)
    191193        $(eval $(custom_post))
    192 endif   
    193        
     194endif
     195
    194196endef
    195197
  • trunk/kBuild/tools/GCC3.kmk

    r181 r184  
    8080# @param    $(incs)     Includes. No -I or something.
    8181# @param        $(dirdep)   Directory creation dependency.
     82# @param        $(deps)         Other dependencies.
    8283#
    8384# @param    $(outbase)  Output basename (full). Use this for list files and such.
     
    8586define TOOL_GCC3_COMPILE_C
    8687#$ (warning dbg: TOOL_GCC3_COMPILE_C: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff))
    87 $(obj): $(dirdep) $(source)
     88$(obj): $(dirdep) $(source) $(deps)
    8889        $(call MSG_L2,Compiling $$@ using GCC3)
    8990        $(TOOL_GCC3_CC) -c\
     
    9293                -o $$@\
    9394                $(call ABSPATH,$(source))
    94                
     95
    9596endef
    9697
     
    105106# @param    $(incs)     Includes. No -I or something.
    106107# @param        $(dirdep)   Directory creation dependency.
     108# @param        $(deps)         Other dependencies.
    107109#
    108110# @param    $(outbase)  Output basename (full). Use this for list files and such.
     
    110112define TOOL_GCC3_COMPILE_CXX
    111113#$ (warning dbg: TOOL_GCC3_COMPILE_CXX: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff))
    112 $(obj): $(dirdep) $(source)
     114$(obj): $(dirdep) $(source) $(deps)
    113115        $(call MSG_L2,Compiling $$@ using GCC3)
    114116        $(TOOL_GCC3_CXX) -c\
     
    117119                -o $$@\
    118120                $(call ABSPATH,$(source))
    119                
     121
    120122endef
    121123
     
    136138        $(RM) -f $$@
    137139        $(TOOL_GCC3_AR) $(flags) $$@ $(objs)
    138        
     140
    139141endef
    140142
     
    160162ifneq ($(custom_pre),)
    161163        $(eval $(custom_pre))
    162 endif   
     164endif
    163165        $(TOOL_GCC3_LD) $(flags) -o $$@ $(objs) \
    164166        $(foreach p,$(libpath), -L$(p)) \
     
    166168ifneq ($(custom_post),)
    167169        $(eval $(custom_post))
    168 endif   
    169        
     170endif
     171
    170172endef
    171173
     
    191193ifneq ($(custom_pre),)
    192194        $(eval $(custom_pre))
    193 endif   
     195endif
    194196        $(TOOL_GCC3_LD) $(TOOL_GCC3_LDFLAGS.dll) $(flags) -o $$@ $(objs) \
    195197        $(foreach p,$(libpath), -L$(p)) \
     
    197199ifneq ($(custom_post),)
    198200        $(eval $(custom_post))
    199 endif   
    200        
     201endif
     202
    201203endef
    202204
     
    221223ifneq ($(custom_pre),)
    222224        $(eval $(custom_pre))
    223 endif   
     225endif
    224226        $(TOOL_GCC3_LD_SYSMOD) $(TOOL_GCC3_LDFLAGS.sysmod) $(flags) -o $$@ $(objs) \
    225227                $(foreach p,$(libpath), -L$(p)) \
     
    227229ifneq ($(custom_post),)
    228230        $(eval $(custom_post))
    229 endif   
    230 
    231 endef
    232                                                                                                        
     231endif
     232
     233endef
     234
  • trunk/kBuild/tools/GCC3OMF.kmk

    r182 r184  
    8080# @param    $(incs)     Includes. No -I or something.
    8181# @param        $(dirdep)   Directory creation dependency.
     82# @param        $(deps)         Other dependencies.
    8283#
    8384# @param    $(outbase)  Output basename (full). Use this for list files and such.
    8485# @param        $(objsuff)  Object suffix.
    8586define TOOL_GCC3OMF_COMPILE_C
    86 #$ (warning dbg: TOOL_GCC3OMF_COMPILE_C: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff))
    87 $(obj): $(dirdep) $(source)
     87#$ (warning dbg: TOOL_GCC3OMF_COMPILE_C: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff) deps=$(deps))
     88$(obj): $(dirdep) $(source) $(deps)
    8889        $(call MSG_L2,Compiling $$@ using GCC3)
    8990        $(TOOL_GCC3OMF_CC) -c\
     
    9293                -o $$@\
    9394                $(call ABSPATH,$(source))
    94                
     95
    9596endef
    9697
     
    105106# @param    $(incs)     Includes. No -I or something.
    106107# @param        $(dirdep)   Directory creation dependency.
     108# @param        $(deps)         Other dependencies.
    107109#
    108110# @param    $(outbase)  Output basename (full). Use this for list files and such.
    109111# @param        $(objsuff)  Object suffix.
    110112define TOOL_GCC3OMF_COMPILE_CXX
    111 #$ (warning dbg: TOOL_GCC3OMF_COMPILE_CXX: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff))
    112 $(obj): $(dirdep) $(source)
     113#$ (warning dbg: TOOL_GCC3OMF_COMPILE_CXX: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff) deps=$(deps))
     114$(obj): $(dirdep) $(source) $(deps)
    113115        $(call MSG_L2,Compiling $$@ using GCC3)
    114116        $(TOOL_GCC3OMF_CXX) -c\
     
    117119                -o $$@\
    118120                $(call ABSPATH,$(source))
    119                
     121
    120122endef
    121123
     
    136138        $(RM) -f $$@
    137139        $(TOOL_GCC3OMF_AR) $(flags) $$@ $(objs)
    138        
     140
    139141endef
    140142
     
    160162ifneq ($(custom_pre),)
    161163        $(eval $(custom_pre))
    162 endif   
     164endif
    163165        $(TOOL_GCC3OMF_LD) $(flags) -o $$@ $(objs) \
    164166        $(foreach p,$(libpath), -L$(p)) \
     
    166168ifneq ($(custom_post),)
    167169        $(eval $(custom_post))
    168 endif   
    169        
     170endif
     171
    170172endef
    171173
     
    191193ifneq ($(custom_pre),)
    192194        $(eval $(custom_pre))
    193 endif   
     195endif
    194196        $(TOOL_GCC3OMF_LD) $(TOOL_GCC3OMF_LDFLAGS.dll) $(flags) -o $$@ $(objs) \
    195197        $(foreach p,$(libpath), -L$(p)) \
     
    197199ifneq ($(custom_post),)
    198200        $(eval $(custom_post))
    199 endif   
    200        
     201endif
     202
    201203endef
    202204
     
    221223ifneq ($(custom_pre),)
    222224        $(eval $(custom_pre))
    223 endif   
     225endif
    224226        $(TOOL_GCC3OMF_LD_SYSMOD) $(TOOL_GCC3OMF_LDFLAGS.sysmod) $(flags) -o $$@ $(objs) \
    225227                $(foreach p,$(libpath), -L$(p)) \
     
    227229ifneq ($(custom_post),)
    228230        $(eval $(custom_post))
    229 endif   
    230 
    231 endef
    232                                                                                                        
     231endif
     232
     233endef
     234
  • trunk/kBuild/tools/MINGW32.kmk

    r181 r184  
    2828
    2929# find latest installed version
    30 ifndef PATH_TOOL_MINGW32                                                               
     30ifndef PATH_TOOL_MINGW32
    3131PATH_TOOL_MINGW32            := $(sort $(wildcard $(PATH_DEV)/$(BUILD_PLATFORM_ARCH).$(BUILD_PLATFORM)/mingw32/v*.*))
    3232ifeq ($(PATH_TOOL_MINGW32),)
     
    5555endif
    5656endif
    57                                                                
     57
    5858TOOL_MINGW32_CC                 := $(_TOOL_MINGW32_PREFIX)gcc$(_TOOL_MINGW32_SUFF_EXE)
    5959TOOL_MINGW32_COBJSUFF           := .o
     
    105105# @param    $(incs)     Includes. No -I or something.
    106106# @param        $(dirdep)   Directory creation dependency.
     107# @param        $(deps)         Other dependencies.
    107108#
    108109# @param    $(outbase)  Output basename (full). Use this for list files and such.
    109110# @param        $(objsuff)  Object suffix.
    110111define TOOL_MINGW32_COMPILE_C
    111 #$ (warning dbg: TOOL_MINGW32_COMPILE_C: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff))
    112 $(obj): $(dirdep) $(source)
     112#$ (warning dbg: TOOL_MINGW32_COMPILE_C: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff) deps=$(deps))
     113$(obj): $(dirdep) $(source) $(deps)
    113114        $(call MSG_L2,Compiling $$@ using MINGW32)
    114115        $(TOOL_MINGW32_CC) -c\
     
    117118                -o $$@\
    118119                $(call ABSPATH,$(source))
    119                
     120
    120121endef
    121122
     
    130131# @param    $(incs)     Includes. No -I or something.
    131132# @param        $(dirdep)   Directory creation dependency.
     133# @param        $(deps)         Other dependencies.
    132134#
    133135# @param    $(outbase)  Output basename (full). Use this for list files and such.
    134136# @param        $(objsuff)  Object suffix.
    135137define TOOL_MINGW32_COMPILE_CXX
    136 #$ (warning dbg: TOOL_MINGW32_COMPILE_CXX: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff))
    137 $(obj): $(dirdep) $(source)
     138#$ (warning dbg: TOOL_MINGW32_COMPILE_CXX: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff) deps=$(deps))
     139$(obj): $(dirdep) $(source) $(deps)
    138140        $(call MSG_L2,Compiling $$@ using MINGW32)
    139141        $(TOOL_MINGW32_CXX) -c\
     
    142144                -o $$@\
    143145                $(call ABSPATH,$(source))
    144                
     146
    145147endef
    146148
     
    161163        $(RM) -f $$@
    162164        $(TOOL_MINGW32_AR) $(flags) $$@ $(objs)
    163        
     165
    164166endef
    165167
     
    185187ifneq ($(custom_pre),)
    186188        $(eval $(custom_pre))
    187 endif   
     189endif
    188190        $(TOOL_MINGW32_LD) $(flags) -o $$@ $(objs) \
    189191        $(foreach p,$(libpath), -L$(p)) \
     
    191193ifneq ($(custom_post),)
    192194        $(eval $(custom_post))
    193 endif   
    194        
     195endif
     196
    195197endef
    196198
     
    216218ifneq ($(custom_pre),)
    217219        $(eval $(custom_pre))
    218 endif   
     220endif
    219221        $(TOOL_MINGW32_DLLWRAP) $(flags) \
    220222                --dllname=$(dll) \
     
    231233ifneq ($(custom_post),)
    232234        $(eval $(custom_post))
    233 endif   
     235endif
    234236_OUT_FILES += $(outbase).map $(outbase).a $(outbase).exp
    235237
  • trunk/kBuild/tools/NASM.kmk

    r129 r184  
    3333endif
    3434endif
    35                
     35
    3636ifneq ($(PATH_TOOL_NASM),)
    3737TOOL_NASM_AS                  := $(PATH_TOOL_NASM)/nasm$(HOSTSUFF_EXE)
     
    5151# @param    $(incs)     Includes. No -I or something.
    5252# @param        $(dirdep)   Directory creation dependency.
     53# @param        $(deps)         Other dependencies.
    5354#
    5455# @param    $(outbase)  Output basename (full). Use this for list files and such.
    5556# @param        $(objsuff)  Object suffix.
    5657define TOOL_NASM_COMPILE_AS
    57 #$ (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))
    58 $(obj): $(dirdep) $(source)
     58#$ (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): $(dirdep) $(source) $(deps)
    5960        $(call MSG_L2,Compiling $$@ using NASM)
    6061        $(TOOL_NASM_AS) \
     
    6465                $(call ABSPATH,$(source))
    6566_OUT_FILES += $(outbase).lst
    66                
     67
    6768endef
    6869
  • trunk/kBuild/tools/VCC70.kmk

    r181 r184  
    7070# @param    $(incs)     Includes. No -I or something.
    7171# @param        $(dirdep)   Directory creation dependency.
     72# @param        $(deps)         Other dependencies.
    7273#
    7374# @param    $(outbase)  Output basename (full). Use this for list files and such.
     
    7576define TOOL_VCC70_COMPILE_C
    7677#$ (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))
    77 $(obj): $(dirdep) $(source)
     78$(obj): $(dirdep) $(source) $(deps)
    7879        $(call MSG_L2,Compiling $$@ using VCC70)
    7980        $(TOOL_VCC70_CC) -c\
     
    101102# @param    $(incs)     Includes. No -I or something.
    102103# @param        $(dirdep)   Directory creation dependency.
     104# @param        $(deps)         Other dependencies.
    103105#
    104106# @param    $(outbase)  Output basename (full). Use this for list files and such.
     
    106108define TOOL_VCC70_COMPILE_CXX
    107109#$ (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))
    108 $(obj): $(dirdep) $(source)
     110$(obj): $(dirdep) $(source) $(deps)
    109111        $(call MSG_L2,Compiling $$@ using VCC70)
    110112        $(TOOL_VCC70_CXX) -c\
     
    118120                -D__DATE__=\"0000.00.00\" -D__FILE__=\"filename.c\" -D__LINE__=42 -D__TIME__=\"00.00.00\" -D__TIMESTAMP__=\"lotsofnumbers\" \
    119121                $(addprefix -D, $(defs)) $(addprefix -I, $(incs)) \
    120                 $(call ABSPATH,$(source)) 
     122                $(call ABSPATH,$(source))
    121123_OUT_FILES += $(outbase).pdb
    122124
     
    252254                $(foreach p,$(libpath), /LIBPATH:$(p)) \
    253255                $(subst /,\\,$(objs)) \
    254                 $(subst /,\\,$(libs))           
     256                $(subst /,\\,$(libs))
    255257ifeq ($(filter %.exp .def,$(othersrc)),)
    256258        if test -f $(outbase).exp; then $(CP) $(outbase).exp $(PATH_LIB)/; fi
Note: See TracChangeset for help on using the changeset viewer.