]> git.tdb.fi Git - builder.git/blob - source/executable.cpp
Split Binary filename generation to Executable and SharedLibrary
[builder.git] / source / executable.cpp
1 #include "builder.h"
2 #include "component.h"
3 #include "executable.h"
4 #include "sourcepackage.h"
5
6 using namespace std;
7 using namespace Msp;
8
9 Executable::Executable(Builder &b, const Component &c, const std::list<ObjectFile *> &objs):
10         Binary(b, c, generate_filename(c), objs)
11 {
12         install_location = "bin";
13 }
14
15 string Executable::generate_filename(const Component &comp)
16 {
17         const Architecture &arch = comp.get_package().get_builder().get_current_arch();
18         return arch.get_executable_patterns().front().apply(comp.get_name());
19 }