]> git.tdb.fi Git - builder.git/blobdiff - source/sharedlibrary.cpp
Change the suffix of modules
[builder.git] / source / sharedlibrary.cpp
index 6600b740332a23dff7a882a0a63e6c99afcbd8ec..c25c6f213f3e7c791525aad240259384335c60ac 100644 (file)
@@ -1,7 +1,7 @@
 #include <msp/fs/utils.h>
 #include <msp/strings/format.h>
+#include "binarycomponent.h"
 #include "builder.h"
-#include "component.h"
 #include "objectfile.h"
 #include "sharedlibrary.h"
 #include "sourcepackage.h"
@@ -28,7 +28,8 @@ SharedLibrary::SharedLibrary(Builder &b, const Component &c, const list<ObjectFi
        else
                install_location = "lib";
 
-       if(component->get_type()==Component::MODULE)
+       const BinaryComponent &bcomp = dynamic_cast<const BinaryComponent &>(*component);
+       if(bcomp.get_type()==BinaryComponent::MODULE)
                install_location /= package->get_name();
        else
        {
@@ -59,8 +60,9 @@ SharedLibrary::SharedLibrary(Builder &b, const Component &c, const list<ObjectFi
 
 string SharedLibrary::generate_filename(const Component &comp)
 {
-       if(comp.get_type()==Component::MODULE)
-               return comp.get_name()+".m";
+       const BinaryComponent &bcomp = dynamic_cast<const BinaryComponent &>(comp);
+       if(bcomp.get_type()==BinaryComponent::MODULE)
+               return comp.get_name()+".dlm";
        else
        {
                const Architecture &arch = comp.get_package().get_builder().get_current_arch();