
LOCATE_TARGET = /mingw32/win32/lib ;

LIBPREFIX = lib ;

ILIBFLAGS = -k ;

rule ImportLibs
{
	local r d i ;

	for i in $(>)
	{
		r = $(LIBPREFIX)$(i)$(SUFLIB) ;
		d = $(i:S=.def) ;
		DEPENDS $(<) : $(r) ;
		ImportLib $(r) : $(d) ;
	}
	NOTFILE $(<) ;
}

# The absolutely necessary libraries to get Mingw32 going.
ImportLibs need : kernel32 ;

# The basic libraries for normal windows compiles.
ImportLibs basic : comctl32 comdlg32 gdi32 shell32 user32 ;

# Build the basics and get what you need.
DEPENDS basic : need ;

# The rest of the libraries that are needed under other circumstances.
ImportLibs extra : advapi32 ctl3d32 glu32 imm32 lz32 mapi32
	mgmtapi mpr msacm32 nddeapi netapi32 odbc32 ole32 oleaut32
	oledlg olepro32 opengl32 penwin32 pkpd32 rasapi32 rpcdce4 rpcns4
	rpcrt4 svrapi tapi32 th32 thunk32 url vdmdbg version vfw32
	win32spl winmm winspool winstrm wow32 wsock32 wst ;

# The winspool dll is actually named .drv!
# NOTE: This is on my system! On other systems it appears that winspool.dll
#       exists... what to do?
DLLNAME on libwinspool.a = winspool.drv ;

# The lib target is setup by the jambase file, and is invoked when jam is
# run with no target (i.e. all) or can be invoked explicitly (e.g. jam lib)
DEPENDS lib : basic extra ;

