blob: 4604facf25c484c0f860c8092935e906f49dc48d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef MAKEFILECREATOR_H
#define MAKEFILECREATOR_H
#ifdef _WIN32
#pragma once
#endif
#include "utlvector.h"
#include "utlsymbol.h"
#include "utldict.h"
#include "utlmap.h"
#include "vcprojconvert.h"
#include "filesystem.h"
class CMakefileCreator
{
public:
CMakefileCreator();
~CMakefileCreator();
void CreateMakefiles( CVCProjConvert & proj );
private:
void CleanupFileName( char *name );
void OutputDirs( FileHandle_t f );
void OutputBuildTarget( FileHandle_t f );
void OutputObjLists( CVCProjConvert::CConfiguration & config, FileHandle_t f );
void OutputIncludes( CVCProjConvert::CConfiguration & config, FileHandle_t f );
void OutputMainBuilder( FileHandle_t f );
void CreateBaseDirs( CVCProjConvert::CConfiguration & config );
void CreateMakefileName( const char *projectName, CVCProjConvert::CConfiguration & config );
void CreateDirectoryFriendlyName( const char *dirName, char *friendlyDirName, int friendlyDirNameSize );
void CreateObjDirectoryFriendlyName ( char *name );
void FileWrite( FileHandle_t f, PRINTF_FORMAT_STRING const char *fmt, ... );
CUtlDict<CUtlSymbol, int> m_BaseDirs;
CUtlMap<int, int> m_FileToBaseDirMapping;
struct OutputDirMapping_t
{
CUtlSymbol m_SrcDir;
CUtlSymbol m_ObjDir;
CUtlSymbol m_ObjName;
CUtlSymbol m_ObjOutputDir;
int m_iBaseDirIndex;
};
CUtlVector<struct OutputDirMapping_t> m_BuildDirectories;
CUtlSymbol m_MakefileName;
CUtlSymbol m_ProjName;
CUtlSymbol m_BaseDir;
};
#endif // MAKEFILECREATOR_H
|