696bc35c31ac287cecf6ea9d34f093db368e2ba6
[reactos.git] / reactos / tools / rbuild / backend / mingw / mingw.h
1 #ifndef MINGW_H
2 #define MINGW_H
3
4 #include "../backend.h"
5
6 #ifdef WIN32
7 #define NUL "NUL"
8 #else
9 #define NUL "/dev/null"
10 #endif
11
12 class Directory;
13 class MingwModuleHandler;
14
15 class MingwBackend : public Backend
16 {
17 public:
18 MingwBackend ( Project& project, bool verbose );
19 virtual ~MingwBackend ();
20 virtual void Process ();
21 std::string AddDirectoryTarget ( const std::string& directory, bool out );
22 bool usePipe;
23 private:
24 void CreateMakefile ();
25 void CloseMakefile () const;
26 void GenerateHeader () const;
27 void GenerateProjectCFlagsMacro ( const char* assignmentOperation,
28 IfableData& data ) const;
29 void GenerateGlobalCFlagsAndProperties ( const char* op,
30 IfableData& data ) const;
31 std::string GenerateProjectLFLAGS () const;
32 void GenerateDirectories ();
33 void GenerateGlobalVariables () const;
34 bool IncludeInAllTarget ( const Module& module ) const;
35 void GenerateAllTarget ( const std::vector<MingwModuleHandler*>& handlers ) const;
36 std::string GetBuildToolDependencies () const;
37 void GenerateInitTarget () const;
38 void GenerateXmlBuildFilesMacro() const;
39 void CheckAutomaticDependencies ();
40 bool IncludeDirectoryTarget ( const std::string& directory ) const;
41 void DetectPipeSupport ();
42 void DetectPCHSupport ();
43 void ProcessModules ();
44 FILE* fMakefile;
45 bool use_pch;
46 Directory *int_directories, *out_directories;
47 };
48
49 std::string FixupTargetFilename ( const std::string& targetFilename );
50
51 #endif /* MINGW_H */