Changeset 141 for trunk/kBuild
- Timestamp:
- Aug 17, 2004, 8:26:34 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/tools/MINGW32.kmk
r130 r141 91 91 TOOL_MINGW32_LDFLAGS.debug := -g 92 92 TOOL_MINGW32_LDFLAGS.release := -s 93 94 TOOL_MINGW32_DLLWRAP := $(_TOOL_MINGW32_PREFIX)dllwrap$(_TOOL_MINGW32_SUFF_EXE) 95 TOOL_MINGW32_DLLTOOL := $(_TOOL_MINGW32_PREFIX)dlltool$(_TOOL_MINGW32_SUFF_EXE) 93 96 94 97 … … 192 195 endef 193 196 197 198 ## Link system module (windows aka driver, linux aka kernel module) 199 # @param $(target) Normalized main target name. 200 # @param $(dll) System module name. 201 # @param $(objs) Object files to link together. 202 # @param $(libs) Libraries to search. 203 # @param $(libpath) Library search paths. 204 # @param $(flags) Flags. 205 # @param $(dirdep) Directory creation dependency. 206 # @param $(deps) Other dependencies. 207 # @param $(othersrc) Unhandled sources. 208 # @param $(custom_pre) Custom step invoked before linking. 209 # @param $(custom_post) Custom step invoked after linking. 210 # 211 # @param $(outbase) Output basename (full). Use this for list files and such. 212 define TOOL_MINGW32_LINK_DLL 213 #$ (warning dbg: TOOL_MINGW32_LINK_DLL: target=$(target) dll=$(dll) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase)) 214 $(dll): $(dirdep) $(call DIRDEP,$(PATH_LIB)) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) 215 $(call MSG_L1,Creating Program $$@) 216 ifneq ($(custom_pre),) 217 $(eval $(custom_pre)) 218 endif 219 $(TOOL_MINGW32_DLLWRAP) $(flags) \ 220 --dllname=$(dll) \ 221 --output-exp=$(outbase).exp \ 222 --output-lib=$(outbase).a \ 223 $(foreach def,$(filter %.def,$(othersrc)), --def $(def)) \ 224 $(filter %.res,$(othersrc)) \ 225 $(foreach p,$(libpath), /LIBPATH:$(p)) \ 226 $(objs) \ 227 $(foreach p,$(libpath), -L$(p)) \ 228 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) 229 ifeq ($(filter %.exp .def,$(othersrc)),) 230 $(CP) $(outbase).exp $(outbase).a $(PATH_LIB)/ 231 endif 232 ifneq ($(custom_post),) 233 $(eval $(custom_post)) 234 endif 235 _OUT_FILES += $(outbase).map $(outbase).a $(outbase).exp 236 237 endef 238
Note:
See TracChangeset
for help on using the changeset viewer.