a1a7096add2da024904968287233e49007f10c7a
[reactos.git] / reactos / tools / rbuild / backend / mingw / modulehandler.h
1 #ifndef MINGW_MODULEHANDLER_H
2 #define MINGW_MODULEHANDLER_H
3
4 #include "../backend.h"
5
6 class MingwModuleHandler
7 {
8 public:
9 MingwModuleHandler ( FILE* fMakefile );
10 virtual bool CanHandleModule ( const Module& module ) const = 0;
11 virtual void Process ( const Module& module ) = 0;
12 protected:
13 std::string MingwModuleHandler::GetWorkingDirectory () const;
14 std::string ReplaceExtension ( const std::string& filename,
15 const std::string& newExtension ) const;
16 std::string GetModuleArchiveFilename ( const Module& module ) const;
17 std::string GetImportLibraryDependencies ( const Module& module ) const;
18 std::string GetSourceFilenames ( const Module& module ) const;
19 std::string GetObjectFilename ( const std::string& sourceFilename ) const;
20 std::string GetObjectFilenames ( const Module& module ) const;
21 void GenerateObjectFileTargets ( const Module& module ) const;
22 void GenerateArchiveTarget ( const Module& module ) const;
23 FILE* fMakefile;
24 private:
25 std::string ConcatenatePaths ( const std::string& path1,
26 const std::string& path2 ) const;
27 std::string GenerateGccDefineParametersFromVector ( const std::vector<Define*>& defines ) const;
28 std::string GenerateGccDefineParameters ( const Module& module ) const;
29 std::string GenerateGccIncludeParametersFromVector ( const std::vector<Include*>& includes ) const;
30 std::string GenerateGccIncludeParameters ( const Module& module ) const;
31 std::string GenerateGccParameters ( const Module& module ) const;
32 };
33
34
35 class MingwKernelModuleHandler : public MingwModuleHandler
36 {
37 public:
38 MingwKernelModuleHandler ( FILE* fMakefile );
39 virtual bool CanHandleModule ( const Module& module ) const;
40 virtual void Process ( const Module& module );
41 private:
42 void GenerateKernelModuleTarget ( const Module& module );
43 };
44
45
46 class MingwStaticLibraryModuleHandler : public MingwModuleHandler
47 {
48 public:
49 MingwStaticLibraryModuleHandler ( FILE* fMakefile );
50 virtual bool CanHandleModule ( const Module& module ) const;
51 virtual void Process ( const Module& module );
52 private:
53 void GenerateStaticLibraryModuleTarget ( const Module& module );
54 };
55
56 #endif /* MINGW_MODULEHANDLER_H */