cmLocalCodeWarriorGenerator.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmLocalCodeWarriorGenerator_h
  14. #define cmLocalCodeWarriorGenerator_h
  15. #include "cmLocalGenerator.h"
  16. class cmMakeDepend;
  17. class cmTarget;
  18. class cmSourceFile;
  19. // please remove me.... Yuck
  20. #include "cmSourceGroup.h"
  21. /** \class cmLocalCodeWarriorGenerator
  22. * \brief Write a LocalUnix makefiles.
  23. *
  24. * cmLocalCodeWarriorGenerator produces a LocalUnix makefile from its
  25. * member m_Makefile.
  26. */
  27. class cmLocalCodeWarriorGenerator : public cmLocalGenerator
  28. {
  29. public:
  30. ///! Set cache only and recurse to false by default.
  31. cmLocalCodeWarriorGenerator();
  32. virtual ~cmLocalCodeWarriorGenerator();
  33. /**
  34. * Generate the makefile for this directory. fromTheTop indicates if this
  35. * is being invoked as part of a global Generate or specific to this
  36. * directory. The difference is that when done from the Top we might skip
  37. * some steps to save time, such as dependency generation for the
  38. * makefiles. This is done by a direct invocation from make.
  39. */
  40. virtual void Generate(bool fromTheTop);
  41. enum BuildType {STATIC_LIBRARY, DLL, EXECUTABLE, WIN32_EXECUTABLE, UTILITY};
  42. /**
  43. * Specify the type of the build: static, dll, or executable.
  44. */
  45. void SetBuildType(BuildType,const char *name);
  46. void WriteTargets(std::ostream& fout);
  47. void WriteGroups(std::ostream& fout);
  48. private:
  49. void WriteTarget(std::ostream& fout, const char *name, cmTarget const *l);
  50. void WriteGroup(std::ostream& fout, const char *name, cmTarget const *l);
  51. void WriteSettingList(std::ostream& fout, const char *name,
  52. cmTarget const *l);
  53. void WriteFileList(std::ostream& fout, const char *name, cmTarget const *l);
  54. void WriteLinkOrder(std::ostream& fout, const char *name, cmTarget const *l);
  55. void AddFileMapping(std::ostream& fout, const char *ftype,
  56. const char *ext, const char *comp,
  57. const char *edit, bool precomp,
  58. bool launch, bool res, bool ignored);
  59. };
  60. #endif