diff options
Diffstat (limited to 'solenv/doc/gbuild/solenv/gbuild/types.mk')
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/types.mk | 80 |
1 files changed, 54 insertions, 26 deletions
diff --git a/solenv/doc/gbuild/solenv/gbuild/types.mk b/solenv/doc/gbuild/solenv/gbuild/types.mk index 1cddf1a7f401..ecb736834736 100644 --- a/solenv/doc/gbuild/solenv/gbuild/types.mk +++ b/solenv/doc/gbuild/solenv/gbuild/types.mk @@ -9,6 +9,8 @@ namespace gb { namespace gb { namespace types { + /// A type of target, with its set of rules etc., as used in the build system. + class TargetType {}; /// A plain old string. class String {}; /// A partial, relative or absolute filesystem path. @@ -18,10 +20,10 @@ namespace gb { namespace types { public: /// The absolute filesystem path representing the target. + + /// This function needs to be defined in solenv/gbuild/target_names.mk so that it is available to everywhere. Path get_target(); }; - /// A target that can be linked against statically. - class StaticLinkable {}; /// A partial or complete shell-command. class Command {}; /// A integer number. @@ -53,6 +55,8 @@ namespace gb { namespace types { public: /// The (phony) absolute filesystem path to clean the target. + + /// This function needs to be defined in solenv/gbuild/target_names.mk so that it is available to everywhere. Path get_clean_target(); }; /// A target that has generated dependencies. @@ -60,6 +64,8 @@ namespace gb { namespace types { public: /// The absolute filesystem path to the file containing the dependencies. + + /// This function needs to be defined in solenv/gbuild/target_names.mk so that it is available to everywhere. Path get_dep_target(); }; /// A target that has a source file from which it is generated. @@ -74,68 +80,90 @@ namespace gb { namespace types { public: /// Add a CObject to be compiled and linked. - void add_cobject(const CObject& cobject); + void add_cobject(CObject cobject); /// Add multiple CObject s to be compiled and linked. - void add_cobjects(const List<CObject>& cobjects); + void add_cobjects(List<CObject> cobjects); /// Add a CxxObject to be compiled and linked. - void add_cxxobject(const CxxObject& cobject); + void add_cxxobject(CxxObject cobject); /// Add multiple CxxObject s to be compiled and linked. - void add_cxxobjects(const List<CxxObject>& cobjects); + void add_cxxobjects(List<CxxObject> cobjects); /// Add multiple CxxObject s to be compiled and linked (with exceptions enabled). - void add_exception_objects(const List<CxxObject>& cobject); + void add_exception_objects(List<CxxObject> cobject); /// Add libraries to link against dynamically. - void add_linked_libs(const List<Library>& linked_libs); + void add_linked_libs(List<Library> linked_libs); /// Add libraries to link against statically. - void add_linked_static_libs(const List<StaticLibrary>& linked_static_libs); + void add_linked_static_libs(List<StaticLibrary> linked_static_libs); /// Add multiple CxxObject s to be compiled and linked (without exceptions enabled). - /// @deprecated { We should not care about disabling exception. } - void add_noexception_objects(const List<CxxObject>& cobject); + /// @deprecated We should not care about disabling exception. + void add_noexception_objects(List<CxxObject> cobject); /// Set auxiliary files that are produced by linking (for cleanup and copying). - void set_auxtargets(const List<Path>& auxtargets); + void set_auxtargets(List<Path> auxtargets); /// Set the location for the produced DLL (used on Windows only). - void set_dll_target(const Path& dlltarget); + void set_dll_target(Path dlltarget); /// Set additional flags for the link command. - void set_ldflags(const List<Path>& ldflags); + void set_ldflags(List<Path> ldflags); }; /// A target that delivers headers of some kind. class DeliversHeaders { public: /// The absolute filesystem path which is touched when all headers for this target are prepared. + + /// This function needs to be defined in solenv/gbuild/target_names.mk so that it is available to everywhere. Path get_headers_target(); /// The absolute filesystem path which is touched when all external headers for this target are prepared. + + /// This function needs to be defined in solenv/gbuild/target_names.mk so that it is available to everywhere. Path get_external_headers_target(); /// Add multiple Packages that need to be delivered/generated /// before compilation or dependency generation can start. - void add_package_headers(const List<Package>& packages); + void add_package_headers(List<Package> packages); /// Add multiple SdiTargets that need to be delivered/generated /// before compilation or dependency generation can start. - void add_sdi_headers(const List<SdiTarget>& sdis); + void add_sdi_headers(List<SdiTarget> sdis); }; /// A target where settings for the compilation can be set. class HasCompileSettings { public: /// Sets flags for plain C compilation. - /// \$\$(CFLAGS) contains the current flags and can be used, if + /// \$\$(CFLAGS) contains the current flags and can be used if /// just a few need to be modified. - void set_cflags(const List<String>& cflags); + void set_cflags(List<String> cflags); /// Sets flags for C++ compilation. - /// \$\$(CXXFLAGS) contains the current flags and can be used, if + /// \$\$(CXXFLAGS) contains the current flags and can be used if /// just a few need to be modified. - void set_cxxflags(const List<String>& cxxflags); + void set_cxxflags(List<String> cxxflags); /// Sets defines for C/C++ compilation. - /// \$\$(DEFS) contains the current flags and can be used, if + /// \$\$(DEFS) contains the current flags and can be used if /// just a few need to be modified. - void set_defs(const List<String>& defs); + void set_defs(List<String> defs); /// Sets the include paths for C/C++ compilation. - /// \$\$(INCLUDE) contains the current paths and can be used, if + /// \$\$(INCLUDE) contains the current paths and can be used if /// just a few need to be modified. - void set_include(const List<Path>& include); + void set_include(List<Path> include); /// Sets the stl include paths for C++ compilation. - /// \$\$(INCLUDE_STL) contains the current paths and can be used, if + /// \$\$(INCLUDE_STL) contains the current paths and can be used if /// just a few need to be modified. - void set_include_stl(const List<Path>& include_stl); + void set_include_stl(List<Path> include_stl); + }; + /// A target using the resource compiler + class UsesRsc + { + public: + /// The command to execute rsc. + static const Command RSCCOMMAND; + /// The target on with to depend to make sure the rsc executable is available. + static const Path RSCTARGET; + }; + /// A target processing a set of srs files + class HasSrs + { + public: + /// Add a SrsTarget to be processed. + void add_one_srs(SrsTarget srs); + /// Add multiple SrsTarget s to be processed. + void add_srs(List<SrsTarget> srs); }; }}; /* vim: set filetype=cpp : */ |