Changeset 206
- Timestamp:
- Dec 29, 2004, 8:43:09 PM (21 years ago)
- Location:
- trunk/kBuild/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/tools/GCC3.kmk
r188 r206 131 131 # @param $(dirdep) Directory creation dependency. 132 132 # @param $(deps) Other dependencies. 133 # 134 # @param $(outbase) Output basename (full). Use this for list files and such. 133 # @param $(othersrc) Unhandled sources. 134 # 135 # @param $(outbase) Output basename (full). Use this for list files and such. 136 137 define TOOL_GCC3_LINK_LIBRARY_ADDMODE 138 139 echo "ADDMOD $(o)" >> $$@.ar-script 140 endef 141 142 define TOOL_GCC3_LINK_LIBRARY_EXPAND_LIB 143 144 $(MKDIR) -p $(dir $(outbase))ar.extract/$(notdir $(srclib)) 145 cd $(dir $(outbase))ar.extract/$(notdir $(srclib)) && $(TOOL_GCC3_AR) x $(srclib) 146 for o in `$(TOOL_GCC3_AR) t $(srclib)`; do echo "ADDMOD $(dir $(outbase))ar.extract/$(notdir $(srclib))/$$$${o}" >> $$@.ar-script; done 147 endef 148 135 149 define TOOL_GCC3_LINK_LIBRARY 136 #$ (warning dbg: TOOL_GCC3_LINK_LIBRARY: target=$(target) lib=$(lib) objs=$(objs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) o utbase=$(outbase))137 $(lib): $(dirdep) $(objs) $(deps) 150 #$ (warning dbg: TOOL_GCC3_LINK_LIBRARY: target=$(target) lib=$(lib) objs=$(objs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase)) 151 $(lib): $(dirdep) $(objs) $(deps) $(filter %.a %.lib,$(othersrc)) 138 152 $(call MSG_L1,Creating Library $$@) 139 153 $(RM) -f $$@ 154 ifneq ($(strip $(filter %.a %.lib,$(othersrc))),,) 155 echo "CREATE $$@" > $$@.ar-script 156 $(foreach o, $(objs), $(TOOL_GCC3_LINK_LIBRARY_ADDMOD)) 157 $(foreach srclib, $(filter %.a %.lib,$(othersrc)),$(TOOL_GCC3_LINK_LIBRARY_EXPAND_LIB)) 158 echo "SAVE" >> $$@.ar-script 159 echo "END" >> $$@.ar-script 160 $(TOOL_GCC3_AR) -M < $$@.ar-script 161 $(RM) -Rf "$(dir $(outbase))ar.extract/" 162 else 140 163 $(TOOL_GCC3_AR) $(flags) $$@ $(objs) 164 endif 141 165 142 166 endef -
trunk/kBuild/tools/GCC3OMF.kmk
r187 r206 130 130 # @param $(dirdep) Directory creation dependency. 131 131 # @param $(deps) Other dependencies. 132 # @param $(othersrc) Unhandled sources. 132 133 # 133 134 # @param $(outbase) Output basename (full). Use this for list files and such. 134 135 define TOOL_GCC3OMF_LINK_LIBRARY 135 #$ (warning dbg: TOOL_GCC3OMF_LINK_LIBRARY: target=$(target) lib=$(lib) objs=$(objs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) o utbase=$(outbase))136 $(lib): $(dirdep) $(objs) $(deps) 136 #$ (warning dbg: TOOL_GCC3OMF_LINK_LIBRARY: target=$(target) lib=$(lib) objs=$(objs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase)) 137 $(lib): $(dirdep) $(objs) $(deps) $(filter %.a %.lib,$(othersrc)) 137 138 $(call MSG_L1,Creating Library $$@) 138 139 $(RM) -f $$@ 139 $(TOOL_GCC3OMF_AR) $(flags) $$@ $(objs) 140 $(TOOL_GCC3OMF_AR) $(flags) $$@ $(objs) $(filter %.a %.lib,$(othersrc)) 140 141 141 142 endef … … 158 159 define TOOL_GCC3OMF_LINK_PROGRAM 159 160 #$ (warning dbg: TOOL_GCC3OMF_LINK_PROGRAM: target=$(target) exe=$(exe) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase)) 160 $(exe): $(dirdep) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) 161 $(exe): $(dirdep) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) $(filter %.def, $(othersrc)) 161 162 $(call MSG_L1,Creating Program $$@) 162 163 ifneq ($(custom_pre),) … … 164 165 endif 165 166 $(TOOL_GCC3OMF_LD) $(flags) -o $$@ $(objs) \ 166 $(foreach p,$(libpath), -L$(p)) \ 167 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) 167 $(filter %.def, $(othersrc)) \ 168 $(foreach p,$(libpath), -L$(p)) \ 169 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) 168 170 ifneq ($(custom_post),) 169 171 $(eval $(custom_post)) … … 220 222 define TOOL_GCC3OMF_LINK_SYSMOD 221 223 #$ (warning dbg: TOOL_GCC3OMF_LINK_SYSMOD: target=$(target) sys=$(sys) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase)) 222 $(sys): $(dirdep) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) 224 $(sys): $(dirdep) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) $(filter %.def, $(othersrc)) 223 225 $(call MSG_L1,Creating Program $$@) 224 226 ifneq ($(custom_pre),) … … 226 228 endif 227 229 $(TOOL_GCC3OMF_LD_SYSMOD) $(TOOL_GCC3OMF_LDFLAGS.sysmod) $(flags) -o $$@ $(objs) \ 230 $(filter %.def, $(othersrc)) \ 228 231 $(foreach p,$(libpath), -L$(p)) \ 229 232 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) -
trunk/kBuild/tools/VCC70.kmk
r184 r206 141 141 $(call MSG_L1,Creating Library $$@) 142 142 $(RM) -f $$@ 143 $(TOOL_VCC70_AR) $(flags) /OUT:$(lib) $(subst /,\\,$(objs) ) \144 143 $(TOOL_VCC70_AR) $(flags) /OUT:$(lib) $(subst /,\\,$(objs) $(filter %.a %.lib,$(othersrc))) \ 144 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) 145 145 146 146 endef … … 163 163 define TOOL_VCC70_LINK_PROGRAM 164 164 #$ (warning dbg: TOOL_VCC70_LINK_PROGRAM: target=$(target) exe=$(exe) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase)) 165 $(exe): $(dirdep) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) 165 $(exe): $(dirdep) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) $(filter %.def,$(othersrc)) 166 166 $(call MSG_L1,Creating Program $$@) 167 167 ifneq ($(custom_pre),) … … 201 201 define TOOL_VCC70_LINK_SYSMOD 202 202 #$ (warning dbg: TOOL_VCC70_LINK_SYSMOD: target=$(target) sys=$(sys) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase)) 203 $(sys): $(dirdep) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) 203 $(sys): $(dirdep) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) $(filter %.def %.exp %.res,$(othersrc)) 204 204 $(call MSG_L1,Creating Program $$@) 205 205 ifneq ($(custom_pre),) … … 239 239 define TOOL_VCC70_LINK_DLL 240 240 #$ (warning dbg: TOOL_VCC70_LINK_DLL: target=$(target) dll=$(dll) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase)) 241 $(dll): $(dirdep) $(call DIRDEP,$(PATH_LIB)) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) 241 $(dll): $(dirdep) $(call DIRDEP,$(PATH_LIB)) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) $(filter %.def %.exp %.res,$(othersrc)) 242 242 $(call MSG_L1,Creating Program $$@) 243 243 ifneq ($(custom_pre),)
Note:
See TracChangeset
for help on using the changeset viewer.