Changeset 130 for trunk/kBuild/tools
- Timestamp:
- Jun 29, 2004, 7:30:14 PM (21 years ago)
- Location:
- trunk/kBuild/tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/tools/GCC.kmk
r129 r130 58 58 TOOL_GCC_LDFLAGS.debug := -g 59 59 TOOL_GCC_LDFLAGS.release := -s 60 TOOL_GCC_LDFLAGS.dll.os2 := -Zdll 61 ifndef TOOL_GCC_LDFLAGS.$(BUILD_TARGET) 62 TOOL_GCC_LDFLAGS.dll := -shared 63 else 64 TOOL_GCC_LDFLAGS.dll := $(TOOL_GCC_LDFLAGS.$(BUILD_TARGET)) 65 endif 60 66 61 67 … … 138 144 # @param $(dirdep) Directory creation dependency. 139 145 # @param $(deps) Other dependencies. 140 # @param $( deffile) Definition file. (optional, PC only)146 # @param $(othersrc) Unhandled sources. 141 147 # @param $(custom_pre) Custom step invoked before linking. 142 148 # @param $(custom_post) Custom step invoked after linking. … … 158 164 endef 159 165 166 167 ## Link program 168 # @param $(target) Normalized main target name. 169 # @param $(exe) Program name. 170 # @param $(objs) Object files to link together. 171 # @param $(libs) Libraries to search. 172 # @param $(libpath) Library search paths. 173 # @param $(flags) Flags. 174 # @param $(dirdep) Directory creation dependency. 175 # @param $(deps) Other dependencies. 176 # @param $(othersrc) Unhandled sources. 177 # @param $(custom_pre) Custom step invoked before linking. 178 # @param $(custom_post) Custom step invoked after linking. 179 # 180 # @param $(outbase) Output basename (full). Use this for list files and such. 181 define TOOL_GCC_LINK_DLL 182 #$ (warning dbg: TOOL_GCC_LINK_DLL: target=$(target) exe=$(exe) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase)) 183 $(exe): $(dirdep) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) 184 $(call MSG_L1,Creating Program $$@) 185 ifneq ($(custom_pre),) 186 $(eval $(custom_pre)) 187 endif 188 $(TOOL_GCC_LD) $(TOOL_GCC_LDFLAGS.dll) $(flags) -o $$@ $(objs) \ 189 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) 190 ifneq ($(custom_post),) 191 $(eval $(custom_post)) 192 endif 193 194 endef 195 -
trunk/kBuild/tools/GCC3.kmk
r129 r130 57 57 TOOL_GCC3_LDFLAGS.debug := -g 58 58 TOOL_GCC3_LDFLAGS.release := -s 59 ifndef TOOL_GCC3_LDFLAGS.$(BUILD_TARGET) 60 TOOL_GCC3_LDFLAGS.dll := -shared 61 else 62 TOOL_GCC3_LDFLAGS.dll := $(TOOL_GCC3_LDFLAGS.$(BUILD_TARGET)) 63 endif 59 64 60 65 … … 137 142 # @param $(dirdep) Directory creation dependency. 138 143 # @param $(deps) Other dependencies. 139 # @param $( deffile) Definition file. (optional, PC only)144 # @param $(othersrc) Unhandled sources. 140 145 # @param $(custom_pre) Custom step invoked before linking. 141 146 # @param $(custom_post) Custom step invoked after linking. … … 155 160 $(eval $(custom_post)) 156 161 endif 157 $(MKDIR) -p $(PATH_BIN)158 $(CP) $$@ $(PATH_BIN)/159 162 160 163 endef 161 164 165 166 ## Link DLL 167 # @param $(target) Normalized main target name. 168 # @param $(dll) Program name. 169 # @param $(objs) Object files to link together. 170 # @param $(libs) Libraries to search. 171 # @param $(libpath) Library search paths. 172 # @param $(flags) Flags. 173 # @param $(dirdep) Directory creation dependency. 174 # @param $(deps) Other dependencies. 175 # @param $(othersrc) Unhandled sources. 176 # @param $(custom_pre) Custom step invoked before linking. 177 # @param $(custom_post) Custom step invoked after linking. 178 # 179 # @param $(outbase) Output basename (full). Use this for list files and such. 180 define TOOL_GCC3_LINK_DLL 181 #$ (warning dbg: TOOL_GCC3_LINK_PROGRAM: target=$(target) dll=$(dll) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase)) 182 $(dll): $(dirdep) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) 183 $(call MSG_L1,Creating Program $$@) 184 ifneq ($(custom_pre),) 185 $(eval $(custom_pre)) 186 endif 187 $(TOOL_GCC3_LD) $(TOOL_GCC3_LDFLAGS.dll) $(flags) -o $$@ $(objs) \ 188 $(foreach p,$(libpath), -L$(p)) \ 189 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) 190 ifneq ($(custom_post),) 191 $(eval $(custom_post)) 192 endif 193 194 endef 195 -
trunk/kBuild/tools/MINGW32.kmk
r129 r130 171 171 # @param $(dirdep) Directory creation dependency. 172 172 # @param $(deps) Other dependencies. 173 # @param $( deffile) Definition file. (optional, PC only)173 # @param $(othersrc) Unhandled sources. 174 174 # @param $(custom_pre) Custom step invoked before linking. 175 175 # @param $(custom_post) Custom step invoked after linking. … … 189 189 $(eval $(custom_post)) 190 190 endif 191 $(MKDIR) -p $(PATH_BIN)192 $(CP) $$@ $(PATH_BIN)/193 191 194 192 endef -
trunk/kBuild/tools/VCC70.kmk
r129 r130 143 143 # @param $(dirdep) Directory creation dependency. 144 144 # @param $(deps) Other dependencies. 145 # @param $( deffile) Definition file. (optional, PC only)145 # @param $(othersrc) Unhandled sources. 146 146 # @param $(custom_pre) Custom step invoked before linking. 147 147 # @param $(custom_post) Custom step invoked after linking. … … 149 149 # @param $(outbase) Output basename (full). Use this for list files and such. 150 150 define TOOL_VCC70_LINK_PROGRAM 151 #$ (warning dbg: TOOL_VCC70_LINK_PROGRAM: target=$(target) exe=$(exe) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))151 #$ (warning dbg: TOOL_VCC70_LINK_PROGRAM: target=$(target) exe=$(exe) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase)) 152 152 $(exe): $(dirdep) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) 153 153 $(call MSG_L1,Creating Program $$@) … … 159 159 /MAPINFO:EXPORTS /MAPINFO:LINES \ 160 160 /MAP:$(outbase).map \ 161 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \ 162 $(filter %.exp %.res,$(othersrc)) \ 163 $(foreach p,$(libpath), /LIBPATH:$(p)) \ 161 164 $(subst /,\\,$(objs)) \ 162 165 $(subst /,\\,$(libs)) 163 $(MKDIR) -p $(PATH_BIN)164 $(CP) $$@ $(PATH_BIN)/165 166 ifneq ($(custom_post),) 166 167 $(eval $(custom_post)) … … 180 181 # @param $(dirdep) Directory creation dependency. 181 182 # @param $(deps) Other dependencies. 182 # @param $( deffile) Definition file. (optional, PC only)183 # @param $(othersrc) Unhandled sources. 183 184 # @param $(custom_pre) Custom step invoked before linking. 184 185 # @param $(custom_post) Custom step invoked after linking. … … 186 187 # @param $(outbase) Output basename (full). Use this for list files and such. 187 188 define TOOL_VCC70_LINK_SYSMOD 188 #$ (warning dbg: TOOL_VCC70_LINK_SYSMOD: target=$(target) sys=$(sys) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase))189 #$ (warning dbg: TOOL_VCC70_LINK_SYSMOD: target=$(target) sys=$(sys) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase)) 189 190 $(sys): $(dirdep) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) 190 191 $(call MSG_L1,Creating Program $$@) … … 196 197 /MAPINFO:EXPORTS /MAPINFO:LINES \ 197 198 /MAP:$(outbase).map \ 199 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \ 200 $(filter %.exp %.res,$(othersrc)) \ 201 $(foreach p,$(libpath), /LIBPATH:$(p)) \ 198 202 $(subst /,\\,$(objs)) \ 199 203 $(subst /,\\,$(libs)) 200 $(MKDIR) -p $(PATH_BIN)201 $(CP) $$@ $(PATH_BIN)/202 204 ifneq ($(custom_post),) 203 205 $(eval $(custom_post)) … … 207 209 endef 208 210 211 212 ## Link system module (windows aka driver, linux aka kernel module) 213 # @param $(target) Normalized main target name. 214 # @param $(dll) System module name. 215 # @param $(objs) Object files to link together. 216 # @param $(libs) Libraries to search. 217 # @param $(libpath) Library search paths. 218 # @param $(flags) Flags. 219 # @param $(dirdep) Directory creation dependency. 220 # @param $(deps) Other dependencies. 221 # @param $(othersrc) Unhandled sources. 222 # @param $(custom_pre) Custom step invoked before linking. 223 # @param $(custom_post) Custom step invoked after linking. 224 # 225 # @param $(outbase) Output basename (full). Use this for list files and such. 226 define TOOL_VCC70_LINK_DLL 227 #$ (warning dbg: TOOL_VCC70_LINK_DLL: target=$(target) dll=$(dll) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase)) 228 $(dll): $(dirdep) $(call DIRDEP,$(PATH_LIB)) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) 229 $(call MSG_L1,Creating Program $$@) 230 ifneq ($(custom_pre),) 231 $(eval $(custom_pre)) 232 endif 233 $(TOOL_VCC70_LD) $(flags) \ 234 /OUT:$(dll) \ 235 /IMPLIB:$(outbase).lib \ 236 /MAPINFO:EXPORTS /MAPINFO:LINES \ 237 /MAP:$(outbase).map \ 238 /DLL \ 239 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \ 240 $(filter %.exp %.res,$(othersrc)) \ 241 $(foreach p,$(libpath), /LIBPATH:$(p)) \ 242 $(subst /,\\,$(objs)) \ 243 $(subst /,\\,$(libs)) 244 ifeq ($(filter %.exp .def,$(othersrc)),) 245 $(CP) $(outbase).exp $(outbase).lib $(PATH_LIB)/ 246 endif 247 ifneq ($(custom_post),) 248 $(eval $(custom_post)) 249 endif 250 _OUT_FILES += $(outbase).map $(outbase).lib $(outbase).exp 251 252 endef 253
Note:
See TracChangeset
for help on using the changeset viewer.