36e8c8ac04cd1382ce79f8dc967aa1263a856012
[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 ( Module& module ) = 0;
11 virtual void Process ( Module& module ) = 0;
12 protected:
13 std::string MingwModuleHandler::GetWorkingDirectory ();
14 std::string ReplaceExtension ( std::string filename,
15 std::string newExtension );
16 std::string GetModuleArchiveFilename ( Module& module );
17 std::string GetImportLibraryDependencies ( Module& module );
18 std::string GetSourceFilenames ( Module& module );
19 std::string GetObjectFilename ( std::string sourceFilename );
20 std::string GetObjectFilenames ( Module& module );
21 void GenerateObjectFileTargets ( Module& module );
22 void GenerateArchiveTarget ( Module& module );
23 FILE* fMakefile;
24 private:
25 std::string ConcatenatePaths ( std::string path1,
26 std::string path2 );
27 std::string GenerateGccDefineParametersFromVector ( std::vector<Define*> defines );
28 std::string GenerateGccDefineParameters ( Module& module );
29 std::string GenerateGccIncludeParametersFromVector ( std::string basePath,
30 std::vector<Include*> includes );
31 std::string GenerateGccIncludeParameters ( Module& module );
32 std::string GenerateGccParameters ( Module& module );
33 };
34
35
36 class MingwKernelModuleHandler : public MingwModuleHandler
37 {
38 public:
39 MingwKernelModuleHandler ( FILE* fMakefile );
40 virtual bool CanHandleModule ( Module& module );
41 virtual void Process ( Module& module );
42 private:
43 void GenerateKernelModuleTarget ( Module& module );
44 };
45
46
47 class MingwStaticLibraryModuleHandler : public MingwModuleHandler
48 {
49 public:
50 MingwStaticLibraryModuleHandler ( FILE* fMakefile );
51 virtual bool CanHandleModule ( Module& module );
52 virtual void Process ( Module& module );
53 private:
54 void GenerateStaticLibraryModuleTarget ( Module& module );
55 };
56
57 #endif /* MINGW_MODULEHANDLER_H */