]> git.tdb.fi Git - builder.git/blobdiff - source/executable.cpp
Add profile templates
[builder.git] / source / executable.cpp
index a5a944ed18e7131e856b7af5fbc3d13238fd4c67..db8bd11db0b3c832790d3cbdbef4d2f717ad80fd 100644 (file)
@@ -76,14 +76,23 @@ we need to pass the value to the Target c'tor.
 string Executable::generate_target_name(const Component &c)
 {
        string prefix,suffix;
+       const string &arch=c.get_package().get_arch();
 
        if(c.get_type()==Component::LIBRARY)
        {
                prefix="lib";
-               suffix=".so";
+               if(arch=="win32")
+                       suffix=".dll";
+               else
+                       suffix=".so";
        }
        else if(c.get_type()==Component::MODULE)
                suffix=".m";
+       else if(c.get_type()==Component::PROGRAM)
+       {
+               if(arch=="win32")
+                       suffix=".exe";
+       }
 
        return (c.get_package().get_out_dir()/(prefix+c.get_name()+suffix)).str();
 }