X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fobjectfile.h;h=fc844d9a04dff28786af13607351720dd404c1c6;hb=bde362811368647047f3ca13bdec596f092ecffe;hp=21483147cfa20cb7dd22b115450baec00e8ed89e;hpb=338eefb513953ae55e8e3614c009c242ba8ad74e;p=builder.git diff --git a/source/objectfile.h b/source/objectfile.h index 2148314..fc844d9 100644 --- a/source/objectfile.h +++ b/source/objectfile.h @@ -3,7 +3,6 @@ #include "filetarget.h" -class Component; class SourceFile; /** @@ -12,30 +11,27 @@ Object files are compiled from source files. class ObjectFile: public FileTarget { private: - const Component ∁ SourceFile &source; - TargetList new_deps; - + bool used_in_shlib; + public: ObjectFile(Builder &, const Component &, SourceFile &); - virtual const char *get_type() const { return "ObjectFile"; } - const Component &get_component() const { return comp; } +private: + static Msp::FS::Path generate_target_path(const Component &, const Msp::FS::Path &); + +public: + const char *get_type() const override { return "ObjectFile"; } SourceFile &get_source() const { return source; } - /** Processes as many new dependences as possible. Some may be created on - the fly and can't be processed until their own dependencies are ready. In - such cases this function needs to be called again. */ - virtual void find_depends(); + void set_used_in_shared_library(bool); + bool is_used_in_shared_library() const { return used_in_shlib; } -private: - /** Recursively looks for header targets and adds them as dependencies. */ - void find_depends(Target *); + void collect_build_info(BuildInfo &) const override; - /** Adds a target to the dependency list as well as the new dependencies - list. */ - void add_depend(Target *); +private: + void find_dependencies() override; - static Msp::FS::Path generate_target_path(const Component &, const std::string &); + void find_dependencies(FileTarget *); }; #endif