cmBorlandMakefileGenerator.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2001 Insight Consortium
  8. All rights reserved.
  9. Redistribution and use in source and binary forms, with or without
  10. modification, are permitted provided that the following conditions are met:
  11. * Redistributions of source code must retain the above copyright notice,
  12. this list of conditions and the following disclaimer.
  13. * Redistributions in binary form must reproduce the above copyright notice,
  14. this list of conditions and the following disclaimer in the documentation
  15. and/or other materials provided with the distribution.
  16. * The name of the Insight Consortium, nor the names of any consortium members,
  17. nor of any contributors, may be used to endorse or promote products derived
  18. from this software without specific prior written permission.
  19. * Modified source versions must be plainly marked as such, and must not be
  20. misrepresented as being the original software.
  21. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
  22. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24. ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
  25. ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  26. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  27. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  28. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  29. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  30. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. =========================================================================*/
  32. #ifndef cmBorlandMakefileGenerator_h
  33. #define cmBorlandMakefileGenerator_h
  34. #include "cmNMakeMakefileGenerator.h"
  35. /** \class cmBorlandMakefileGenerator
  36. * \brief Write an NMake makefile.
  37. *
  38. * cmBorlandMakefileGenerator produces a Unix makefile from its
  39. * member m_Makefile.
  40. */
  41. class cmBorlandMakefileGenerator : public cmNMakeMakefileGenerator
  42. {
  43. public:
  44. ///! Set cache only and recurse to false by default.
  45. cmBorlandMakefileGenerator();
  46. virtual ~cmBorlandMakefileGenerator();
  47. ///! Get the name for the generator.
  48. virtual const char* GetName() {return "Borland Makefiles";}
  49. ///! virtual copy constructor
  50. virtual cmMakefileGenerator* CreateObject()
  51. { return new cmBorlandMakefileGenerator;}
  52. ///! figure out about the current system information
  53. virtual void ComputeSystemInfo();
  54. protected:
  55. virtual void OutputMakeVariables(std::ostream&);
  56. virtual void BuildInSubDirectory(std::ostream& fout,
  57. const char* directory,
  58. const char* target1,
  59. const char* target2);
  60. void OutputMakeRule(std::ostream& fout,
  61. const char* comment,
  62. const char* target,
  63. const char* depends,
  64. const char* command,
  65. const char* command2=0,
  66. const char* command3=0,
  67. const char* command4=0);
  68. virtual void OutputBuildObjectFromSource(std::ostream& fout,
  69. const char* shortName,
  70. const cmSourceFile& source,
  71. const char* extraCompileFlags,
  72. bool sharedTarget);
  73. virtual void OutputSharedLibraryRule(std::ostream&, const char* name,
  74. const cmTarget &);
  75. virtual void OutputModuleLibraryRule(std::ostream&, const char* name,
  76. const cmTarget &);
  77. virtual void OutputStaticLibraryRule(std::ostream&, const char* name,
  78. const cmTarget &);
  79. virtual void OutputExecutableRule(std::ostream&, const char* name,
  80. const cmTarget &);
  81. virtual std::string GetOutputExtension(const char* sourceExtension);
  82. virtual void OutputBuildLibraryInDir(std::ostream& fout,
  83. const char* path,
  84. const char* library,
  85. const char* fullpath);
  86. ///! return true if the two paths are the same (checks short paths)
  87. virtual bool SamePath(const char* path1, const char* path2);
  88. virtual std::string ConvertToNativePath(const char* s);
  89. private:
  90. bool m_QuoteNextCommand; // if this is true, OutputMakeRule
  91. // will not quote the next commands
  92. // it is reset to false after each
  93. // call to OutputMakeRule
  94. };
  95. #endif