aboutsummaryrefslogtreecommitdiff
path: root/build/native.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build/native.cxx')
-rw-r--r--build/native.cxx41
1 files changed, 38 insertions, 3 deletions
diff --git a/build/native.cxx b/build/native.cxx
index d8b0149..42b6cf3 100644
--- a/build/native.cxx
+++ b/build/native.cxx
@@ -8,13 +8,48 @@ using namespace std;
namespace build
{
+ const target_type obja::static_type
+ {
+ typeid (obja),
+ "obja",
+ &file::static_type,
+ &member_target_factory<obja, obj>,
+ file::static_type.search
+ };
+
+ const target_type objso::static_type
+ {
+ typeid (objso),
+ "objso",
+ &file::static_type,
+ &member_target_factory<objso, obj>,
+ file::static_type.search
+ };
+
+ static target*
+ obj_factory (dir_path d, string n, const string* e)
+ {
+ target* a (targets.find (obja::static_type, d, n));
+ target* so (targets.find (objso::static_type, d, n));
+
+ obj* t (new obj (move (d), move (n), e));
+
+ if ((t->a = static_cast<obja*> (a)))
+ a->group = t;
+
+ if ((t->so = static_cast<objso*> (so)))
+ so->group = t;
+
+ return t;
+ }
+
const target_type obj::static_type
{
typeid (obj),
"obj",
- &file::static_type,
- &target_factory<obj>,
- file::static_type.search
+ &target::static_type,
+ &obj_factory,
+ target::static_type.search
};
const target_type exe::static_type