Changeset 353 for trunk/kBuild/tools/GCC3.kmk
- Timestamp:
- Dec 12, 2005, 4:36:07 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/tools/GCC3.kmk
r337 r353 4 4 # kBuild Tool Config - Generic GCC. 5 5 # 6 # Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>6 # Copyright (c) 2004-2005 knut st. osmundsen <bird-srcspam@anduin.net> 7 7 # 8 8 # … … 146 146 define TOOL_GCC3_LINK_LIBRARY_ADDMOD 147 147 148 echo "ADDMOD $(o)" >> $ $@.ar-script148 echo "ADDMOD $(o)" >> $(lib).ar-script 149 149 endef 150 150 … … 153 153 $(MKDIR) -p $(dir $(outbase))ar.extract/$(notdir $(srclib)) 154 154 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; done155 for o in `$(TOOL_GCC3_AR) t $(srclib)`; do echo "ADDMOD $(dir $(outbase))ar.extract/$(notdir $(srclib))/$$$${o}" >> $(lib).ar-script; done 156 156 endef 157 157 … … 162 162 $(RM) -f $$@ 163 163 ifneq ($(strip $(filter %.a %.lib,$(othersrc))),) 164 echo "CREATE $$@" > $ $@.ar-script164 echo "CREATE $$@" > $(lib).ar-script 165 165 $(foreach o, $(objs),$(TOOL_GCC3_LINK_LIBRARY_ADDMOD)) 166 166 $(foreach srclib, $(filter %.a %.lib,$(othersrc)),$(TOOL_GCC3_LINK_LIBRARY_EXPAND_LIB)) 167 echo "SAVE" >> $ $@.ar-script168 echo "END" >> $ $@.ar-script169 $(TOOL_GCC3_AR) -M < $ $@.ar-script167 echo "SAVE" >> $(lib).ar-script 168 echo "END" >> $(lib).ar-script 169 $(TOOL_GCC3_AR) -M < $(lib).ar-script 170 170 $(RM) -Rf "$(dir $(outbase))ar.extract/" 171 172 _OUT_FILES += $(lib).ar-script 171 173 else 172 174 $(TOOL_GCC3_AR) $(flags) $$@ $(objs) … … 178 180 ## Link program 179 181 # @param $(target) Normalized main target name. 180 # @param $( exe) Program name.182 # @param $(out) Program name. 181 183 # @param $(objs) Object files to link together. 182 184 # @param $(libs) Libraries to search. … … 191 193 # @param $(outbase) Output basename (full). Use this for list files and such. 192 194 define 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) 195 197 $(call MSG_L1,Creating Program $$@) 196 198 ifneq ($(custom_pre),) … … 212 214 ## Link DLL 213 215 # @param $(target) Normalized main target name. 214 # @param $( dll) Program name.216 # @param $(out) Program name. 215 217 # @param $(objs) Object files to link together. 216 218 # @param $(libs) Libraries to search. … … 225 227 # @param $(outbase) Output basename (full). Use this for list files and such. 226 228 define 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) 229 231 $(call MSG_L1,Creating Program $$@) 230 232 ifneq ($(custom_pre),) … … 233 235 $(RM) -f $$@ 234 236 $(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))) \ 236 238 $(objs) \ 237 239 $(foreach p,$(libpath), -L$(p)) \ … … 247 249 ## Link system module (windows aka driver, linux aka kernel module) 248 250 # @param $(target) Normalized main target name. 249 # @param $( sys) System module name.251 # @param $(out) System module name. 250 252 # @param $(objs) Object files to link together. 251 253 # @param $(libs) Libraries to search. … … 260 262 # @param $(outbase) Output basename (full). Use this for list files and such. 261 263 define 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) 264 266 $(call MSG_L1,Creating Program $$@) 265 267 ifneq ($(custom_pre),)
Note:
See TracChangeset
for help on using the changeset viewer.