- sharedlib_patterns.push_back(Pattern("%.dll"));
- sharedlib_patterns.push_back(Pattern("lib%.dll"));
- /* XXX Hack: Consider import libraries (*.dll.a) as dynamic libraries,
- even though technically they are linked statically. */
- sharedlib_patterns.push_back(Pattern("lib%.dll.a"));
- staticlib_patterns.push_back(Pattern("lib%.a"));
- executable_patterns.push_back(Pattern("%.exe"));
+ add_pattern<SharedLibrary>("%.dll");
+ if(toolchain=="msvc")
+ {
+ add_pattern<ObjectFile>("%.obj");
+ add_pattern<ImportLibrary>("%.lib");
+ add_pattern<StaticLibrary>("%_static.lib");
+ }
+ else
+ {
+ add_pattern<ObjectFile>("%.o");
+ add_pattern<SharedLibrary>("lib%.dll");
+ add_pattern<ImportLibrary>("lib%.dll.a");
+ add_pattern<StaticLibrary>("lib%.a");
+ }
+ add_pattern<Executable>("%.exe");