diff options
Diffstat (limited to 'solenv/doc/gbuild/solenv')
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/executable.mk | 43 | ||||
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/gbuild.mk | 89 | ||||
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/helper.mk | 54 | ||||
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/library.mk | 59 | ||||
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/linktarget.mk | 144 | ||||
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/package.mk | 48 | ||||
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/sdi.mk | 41 | ||||
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/static_library.mk | 55 | ||||
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/types.mk | 162 |
9 files changed, 695 insertions, 0 deletions
diff --git a/solenv/doc/gbuild/solenv/gbuild/executable.mk b/solenv/doc/gbuild/solenv/gbuild/executable.mk new file mode 100644 index 000000000..87b7992a7 --- /dev/null +++ b/solenv/doc/gbuild/solenv/gbuild/executable.mk @@ -0,0 +1,43 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include <types.h> + +namespace gb +{ + using namespace types; + + class LinkTarget; + + class Executable : public IsCleanable, public HasDependencies, public IsLinking, public DeliversHeaders, public HasCompileSettings, public Target + { + public: + Executable(String name); + + private: + /// private helper function for the constructor + void Executable_impl(LinkTarget library_linktarget); + /// platformdependent additional setup for constructor (used on Windows only) + void Executable_platform(LinkTarget library_linktarget); + /// helper function to wrap LinkTargets functions (this is more or less pimpl ...) + void forward_to_linktarget(Function f); + + static const List<String> TARGETTYPEFLAGS; + }; +} +/* vim: set filetype=cpp : */ diff --git a/solenv/doc/gbuild/solenv/gbuild/gbuild.mk b/solenv/doc/gbuild/solenv/gbuild/gbuild.mk new file mode 100644 index 000000000..55ef76cdc --- /dev/null +++ b/solenv/doc/gbuild/solenv/gbuild/gbuild.mk @@ -0,0 +1,89 @@ +/// +/// This file is part of the LibreOffice project. +/// +/// This Source Code Form is subject to the terms of the Mozilla Public +/// License, v. 2.0. If a copy of the MPL was not distributed with this +/// file, You can obtain one at http://mozilla.org/MPL/2.0/. +/// +/// This file incorporates work covered by the following license notice: +/// +/// Licensed to the Apache Software Foundation (ASF) under one or more +/// contributor license agreements. See the NOTICE file distributed +/// with this work for additional information regarding copyright +/// ownership. The ASF licenses this file to you under the Apache +/// License, Version 2.0 (the "License"); you may not use this file +/// except in compliance with the License. You may obtain a copy of +/// the License at http://www.apache.org/licenses/LICENSE-2.0 . +/// + +#include <types.mk> +using namespace gb::types; + +// GNU make specific setup +static const Command SHELL; + + +// gbuild root directories +static Path SRCDIR; +static Path WORKDIR; + +// Expected from configure/environment +static const Integer OSL_DEBUG_LEVEL; +static const List<Path> SOLARINC; +static const Path GBUILDDIR; +static const Path JAVA_HOME; +static const Path UPD; +static const String LIBXML_CFLAGS; +static const String OS; +static const Bool DEBUG; + +// gbuild global variables derived from the configure/environment +// some of these are defined per platform +namespace gb +{ + /// building with generated dependencies + static const Bool FULLDEPS; + /// command to run awk scripts + static const Command AWK; + /// command to compile c source files + static const Command CC; + /// command to compile c++ source files + static const Command CXX; + /// command to process input with a gcc compatible preprocessor + static const Command GCCP; + /// command to link objects on the microsoft toolchain + static const Command LINK; + /// command to create a unique temporary file + static const Command MKTEMP; + /// debuglevel: + /// 0=no debugging, + /// 1=non-product build, + /// 2=debugging build (either product or nonproduct) + static const Integer DEBUGLEVEL; + /// compiler specific optimization flags + static const List<String> COMPILEROPTFLAGS; + /// default c compilation compiler flags + static const List<String> CFLAGS; + /// compiler specific defines + static const List<String> COMPILERDEFS; + /// cpu-specific default defines + static const List<String> CPUDEFS; + /// default c++ compilation compiler flags + static const List<String> CXXFLAGS; + /// platform- and compiler independent default defines + static const List<String> GLOBALDEFS; + /// default objective c++ compilation compiler flags + static const List<String> OBJCXXFLAGS; + /// platformspecific default defines + static const List<String> OSDEFS; + /// ? + static const Path SDKDIR; +}; + +// PTHREAD_CFLAGS (Linux) +// SYSTEM_ICU (Linux) +// SYSTEM_JPEG (Linux) +// SYSTEM_LIBXML (Linux) +// USE_SYSTEM_STL (Linux) + +/* vim: set filetype=cpp : */ diff --git a/solenv/doc/gbuild/solenv/gbuild/helper.mk b/solenv/doc/gbuild/solenv/gbuild/helper.mk new file mode 100644 index 000000000..b2db7ef7d --- /dev/null +++ b/solenv/doc/gbuild/solenv/gbuild/helper.mk @@ -0,0 +1,54 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include <types.h> + +String NEWLINE; +String COMMA; + +namespace gb +{ + using namespace types; + + class Helper + { + public: + /// Abbreviates the common directory roots in a command + static Command abbreviate_dirs(Command c); + /// Announces the start/end of a task. + static void announce(String announcement); + /// Creates the default get_clean_target() function for the type. + static void make_clean_target(TargetType t); + /// Creates the default get_clean_target() function for the types. + static void make_clean_targets(List<TargetType> ts); + /// Creates the default get_dep_target() function for the type. + static void make_dep_target(TargetType t); + /// Creates the default get_dep_target() function for the types. + static void make_dep_targets(List<TargetType> ts); + + /// The path to a zero length file. + static const Path NULLFILE; + /// The path to the misc directory for temporary files etc. + static const Path MISC; + /// The path to a phony target, that is always outdated. + static const Path PHONY; + /// Internally used dummy file. + static const Path MISCDUMMY; + }; +} +/* vim: set filetype=cpp : */ diff --git a/solenv/doc/gbuild/solenv/gbuild/library.mk b/solenv/doc/gbuild/solenv/gbuild/library.mk new file mode 100644 index 000000000..c06a19e9b --- /dev/null +++ b/solenv/doc/gbuild/solenv/gbuild/library.mk @@ -0,0 +1,59 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include <types.h> + +namespace gb +{ + using namespace types; + + class LinkTarget; + + class Library : public IsCleanable, public HasDependencies, public IsLinking, public DeliversHeaders, public HasCompileSettings, public Target + { + public: + Library(String name); + /// Returns how the library is named in the filesystem on the current platform. + /// Library filename schemes are defined in solenv/gbuild/libnames.mk (with some platformdependent hacks in solenv/gbuild/platform/*.mk. + + /// This function needs to be defined in solenv/gbuild/target_names.mk so that it is available to everywhere. + Path get_filename(); + + private: + /// private helper function for the constructor + void Library_impl(LinkTarget library_linktarget); + /// platformdependent additional setup for constructor (used on Windows only) + void Library_platform( + LinkTarget library_linktarget, + Path dllfile); + /// helper function to wrap LinkTargets functions (this is more or less pimpl ...) + void forward_to_linktarget(Function f); + + /// List of buildable libraries (i.e. libraries that are not expected to exist on the system). + static const List<Library> TARGETS; + /// List of additional defines for compiling objects for libraries + static const List<String> DEFS; + /// List of additional flags for linking a library + static const List<String> TARGETTYPEFLAGS; + /// Mapping from symbolic library names to dll filenames + static const Map<Library,Path> DLLFILENAMES; + /// Mapping from symbolic library names to filenames + static const Map<Library,Path> FILENAMES; + }; +} +/* vim: set filetype=cpp : */ diff --git a/solenv/doc/gbuild/solenv/gbuild/linktarget.mk b/solenv/doc/gbuild/solenv/gbuild/linktarget.mk new file mode 100644 index 000000000..0321c8a64 --- /dev/null +++ b/solenv/doc/gbuild/solenv/gbuild/linktarget.mk @@ -0,0 +1,144 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include <types.h> + +namespace gb +{ + using namespace types; + + class LinkTarget; + class Library; + class StaticLibrary; + class SdiTarget; + class Package; + + /// CObjects are never used standalone. They only exist as part of a + /// LinkTarget. + class CObject : public HasSource, public HasDependencies, public Target + { + public: + Path get_source(); + private: + /// CObjects do not need to be explicitly constructed. + /// They are named after the path of their source file (without + /// file extension) from the root of their source repository. + CObject(String name); + friend class LinkTarget; + + /// Platformdependent command to compile a plain C object. + static const Command command( + Path objectfile, + String name, + Path sourcefile, + List<String> defs, + List<String> cxxflags, + List<Path> include); + /// Platformdependent command to generate plain C object dependencies. + static const Command command_dep( + Path depfile, + String name, + Path sourcefile, + List<String> defs, + List<String> cxxflags, + List<Path> include); + }; + + /// CxxObjects are never used standalone. They only exist as part of a + /// LinkTarget. + class CxxObject : public HasSource, public HasDependencies, public Target + { + public: + Path get_source(); + private: + /// CxxObjects do not need to be explicitly constructed. + /// They are named after the path of their source file (without + /// file extension) from the root of their source repository. + CxxObject(String name); + friend class LinkTarget; + + /// Platformdependent command to compile a C++ object. + static const Command command( + Path objectfile, + String name, + Path sourcefile, + List<String> defs, + List<String> cxxflags, + List<Path> include); + /// Platformdependent command to generate C++ object dependencies. + static const Command command_dep( + Path objectfile, + String name, + Path sourcefile, + List<String> defs, + List<String> cxxflags, + List<Path> include); + }; + + class LinkTarget : public IsCleanable, public HasDependencies, public IsLinking, public DeliversHeaders, public HasCompileSettings, public Target + { + public: + LinkTarget(String name); + + private: + void get_external_headers_check(); + void add_internal_headers(const List<Target>& internal_headers); + + /// @warning Evil Hack: SELF is set to the name of the LinkTarget + /// in the constructor. If SELF is not set to the LinkTarget name in + /// the execution of the header rule, the LinkTarget is used (linked + /// against) but was never defined. This might work out, if the + /// LinkTarget has been provided by other means (for example: + /// build.pl/dmake), but it should never happen in a project where + /// all LinkTarget s are controlled by gbuild. + LinkTarget& SELF; + List<CObject> COBJECTS; + List<CxxObject> CXXOBJECTS; + List<Library> LINKED_LIBS; + List<Path> AUXTARGETS; + List<Path> INCLUDE; + List<StaticLibrary> LINKED_STATIC_LIBS; + List<String> CFLAGS; + List<String> CXXFLAGS; + List<String> DEFS; + List<String> LDFLAGS; + List<String> TARGETTYPE_FLAGS; + Path DLLTARGET; + + /// Platformdependent command for linking. + static const Command command ( + Path linktargetfile, + String linktargetname, + List<String> linkflags, + List<Library> linked_libs, + List<StaticLibrary> linked_static_libs, + List<CObject> cobjects, + List<CxxObject> cxxobjects); + /// Command to collect all dependencies of this LinkTarget. + static const Command command_dep( + Path depfile, + String linktargetname, + List<CObject> cobjects, + List<CxxObject> cxxobjects); + static const List<String> DEFAULTDEFS; + static const List<String> CXXFLAGS; + static const List<String> LDFLAGS; + static const List<Path> INCLUDE; + }; +} +/* vim: set filetype=cpp : */ diff --git a/solenv/doc/gbuild/solenv/gbuild/package.mk b/solenv/doc/gbuild/solenv/gbuild/package.mk new file mode 100644 index 000000000..b1d25a642 --- /dev/null +++ b/solenv/doc/gbuild/solenv/gbuild/package.mk @@ -0,0 +1,48 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include <types.h> + +namespace gb +{ + using namespace types; + class PackagePart + { + private: + /// PackagePart s do not need to be explicitly constructed. + /// They are named after the path of their source file (without + /// file extension) from the root of their source repository. + PackagePart(String name, Path Source); + friend Package; + /// Returns a list of absolute paths where files are copied to with the PackagePart class. + + /// This function needs to be defined in solenv/gbuild/target_names.mk so that it is available to everywhere. + static const List<Path> get_destinations(); + }; + + class Package : public Target, public IsCleanable + { + public: + /// Creates a new package that copies files from source_dir to the \$(INSTDIR). + Package(String name, Path source_dir); + /// Adds a file to the package. destination is the relative path in + /// the \$(INSTROOT) and source is the relative path in the source_dir. + add_file(Path destination, Path source); + } +} +/* vim: set filetype=cpp : */ diff --git a/solenv/doc/gbuild/solenv/gbuild/sdi.mk b/solenv/doc/gbuild/solenv/gbuild/sdi.mk new file mode 100644 index 000000000..0e21980fe --- /dev/null +++ b/solenv/doc/gbuild/solenv/gbuild/sdi.mk @@ -0,0 +1,41 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include <types.h> + +namespace gb +{ + using namespace types; + + class SdiTarget : public Target, public IsCleanable + { + public: + /// Creates a new SdiTarget. + SdiTarget(String name, String exports); + /// Sets the include paths for this SdiTarget. + set_include(List<Path> includes); + private: + /// The command to execute svidl. + static const Command SVIDLCOMMAND; + /// The target on with to depend to make sure the svidl executable is available. + static const Path SVIDLTARGET; + /// The target on with to depend to make sure the auxiliary files (libraries etc.) for the svidl executable are available. + static const Path SVIDLAUXDEPS; + }; +} +/* vim: set filetype=cpp : */ diff --git a/solenv/doc/gbuild/solenv/gbuild/static_library.mk b/solenv/doc/gbuild/solenv/gbuild/static_library.mk new file mode 100644 index 000000000..fe0272382 --- /dev/null +++ b/solenv/doc/gbuild/solenv/gbuild/static_library.mk @@ -0,0 +1,55 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include <types.h> + +namespace gb +{ + using namespace types; + + class LinkTarget; + + class StaticLibrary : public IsCleanable, public HasDependencies, public IsLinking, public DeliversHeaders, public HasCompileSettings, public Target + { + public: + StaticLibrary(String name); + /// Returns how the library is named in the filesystem on the current platform. + /// StaticLibrary filename schemes are defined in solenv/gbuild/libnames.mk (with some platformdependent hacks in solenv/gbuild/platform/*.mk. + + /// This function needs to be defined in solenv/gbuild/target_names.mk so that it is available to everywhere. + Path get_filename(); + + private: + /// private helper function for the constructor + void StaticLibrary_impl(LinkTarget library_linktarget); + /// helper function to wrap LinkTargets functions (this is more or less pimpl ...). + void forward_to_linktarget(Function f); + + /// List of buildable static libraries (i.e. static libraries that are not expected to exist on the system). + static const List<StaticLibrary> TARGETS; + /// List of additional defines for compiling objects for static libraries + static const List<String> DEFS; + /// List of additional flags for linking a static library + static const List<String> TARGETTYPEFLAGS; + /// Mapping from symbolic static library names to filenames + static const Map<StaticLibrary,Path> FILENAMES; + /// platformdependent file extension for static libraries + static const String PLAINEXT; + }; +} +/* vim: set filetype=cpp : */ diff --git a/solenv/doc/gbuild/solenv/gbuild/types.mk b/solenv/doc/gbuild/solenv/gbuild/types.mk new file mode 100644 index 000000000..8798f0105 --- /dev/null +++ b/solenv/doc/gbuild/solenv/gbuild/types.mk @@ -0,0 +1,162 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +namespace gb { + class CObject; + class CxxObject; + class Library; + class StaticLibrary; + class Package; + class SdiTarget; +}; + +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. + class Path {}; + /// A target to be build. + class Target + { + 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 partial or complete shell-command. + class Command {}; + /// A integer number. + class Integer {}; + /// A boolean value. + + /// There are const boolean values true and false for + /// comparisons (written as $(true) and $(false) in makefiles. + class Bool {}; + /// A language (for localisation) + + /// A language represented by its ISO 639-1:2002 code. + class Language {}; + /// A List of objects. + + /// A List of objects represented by a whitespace separated list + /// in makefiles. + template <typename T> + class List<T> {}; + + /// A Mapping from with a key of type K and a value of type V + + /// A Mapping is represented by a whitespace separated list + /// of key-value pairs. Key and value are separated by a colon (:). + template <typename K, typename V> + class Map<K,V> {}; + /// A target that can be cleaned. + class IsCleanable + { + 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. + class HasDependencies + { + 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. + class HasSource + { + public: + /// The absolute filesystem path to the source file. + Path get_source(); + }; + /// A target that links objects and libraries. + class IsLinking + { + public: + /// Add a CObject to be compiled and linked. + void add_cobject(CObject cobject); + /// Add multiple CObject s to be compiled and linked. + void add_cobjects(List<CObject> cobjects); + /// Add a CxxObject to be compiled and linked. + void add_cxxobject(CxxObject cobject); + /// Add multiple CxxObject s to be compiled and linked. + void add_cxxobjects(List<CxxObject> cobjects); + /// Add multiple CxxObject s to be compiled and linked (with exceptions enabled). + void add_exception_objects(List<CxxObject> cobject); + /// Add libraries to link against dynamically. + void add_linked_libs(List<Library> linked_libs); + /// Add libraries to link against statically. + void add_linked_static_libs(List<StaticLibrary> linked_static_libs); + /// Set auxiliary files that are produced by linking (for cleanup and copying). + void set_auxtargets(List<Path> auxtargets); + /// Set the location for the produced DLL (used on Windows only). + void set_dll_target(Path dlltarget); + /// Set additional flags for the link command. + 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(List<Package> packages); + /// Add multiple SdiTargets that need to be delivered/generated + /// before compilation or dependency generation can start. + 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 + /// just a few need to be modified. + void set_cflags(List<String> cflags); + /// Sets flags for C++ compilation. + /// \$\$(CXXFLAGS) contains the current flags and can be used if + /// just a few need to be modified. + void set_cxxflags(List<String> cxxflags); + /// Sets defines for C/C++ compilation. + /// \$\$(DEFS) contains the current flags and can be used if + /// just a few need to be modified. + void set_defs(List<String> defs); + /// Sets the include paths for C/C++ compilation. + /// \$\$(INCLUDE) contains the current paths and can be used if + /// just a few need to be modified. + void set_include(List<Path> include); + }; +}}; +/* vim: set filetype=cpp : */ |