use ROS_TEMPORARY and ROS_INTERMEDIATE to allow builder to override locations for...
[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
20 std::string GetObjectFilename ( const std::string& sourceFilename ) const;
21 std::string GetObjectFilenames ( const Module& module ) const;
22 void GenerateObjectFileTargets ( const Module& module ) const;
23 void GenerateArchiveTarget ( const Module& module ) const;
24 FILE* fMakefile;
25 private:
26 std::string ConcatenatePaths ( const std::string& path1,
27 const std::string& path2 ) const;
28 std::string GenerateGccDefineParametersFromVector ( const std::vector<Define*>& defines ) const;
29 std::string GenerateGccDefineParameters ( const Module& module ) const;
30 std::string GenerateGccIncludeParametersFromVector ( const std::vector<Include*>& includes ) const;
31 std::string GenerateGccIncludeParameters ( const Module& module ) const;
32 std::string GenerateGccParameters ( const Module& module ) const;
33 };
34
35
36 class MingwKernelModuleHandler : public MingwModuleHandler
37 {
38 public:
39 MingwKernelModuleHandler ( FILE* fMakefile );
40 virtual bool CanHandleModule ( const Module& module ) const;
41 virtual void Process ( const Module& module );
42 private:
43 void GenerateKernelModuleTarget ( const Module& module );
44 };
45
46
47 class MingwStaticLibraryModuleHandler : public MingwModuleHandler
48 {
49 public:
50 MingwStaticLibraryModuleHandler ( FILE* fMakefile );
51 virtual bool CanHandleModule ( const Module& module ) const;
52 virtual void Process ( const Module& module );
53 private:
54 void GenerateStaticLibraryModuleTarget ( const Module& module );
55 };
56
57 #endif /* MINGW_MODULEHANDLER_H */