Build system almost done
This commit is contained in:
@@ -19,12 +19,13 @@ CLDProject CCProject::Compile()
|
||||
unsigned int hash = GenerateProjectHash();
|
||||
for (auto &file: files)
|
||||
{
|
||||
CUtlString szOutputFile = CUtlString("%s/cc/%u/%s.o",FPC_TEMPORAL_DIRNAME, hash, file.GetString());
|
||||
CUtlString szOutputFile = CUtlString("%s/cc/%u_%s/%s/%s.o",FPC_TEMPORAL_DIRNAME, hash, m_szName.GetString(), IFileSystem2::OwnDirectory(), file.GetString());
|
||||
CUtlString szOutputDir = szOutputFile;
|
||||
szOutputDir = dirname(szOutputDir);
|
||||
IFileSystem2::MakeDirectory(szOutputDir);
|
||||
|
||||
CUtlVector<CUtlString> args = {
|
||||
"-g",
|
||||
"-c",
|
||||
"-o",
|
||||
szOutputFile,
|
||||
@@ -52,10 +53,10 @@ CLDProject CCProject::Compile()
|
||||
IRunner::Run("clang", args);
|
||||
proj.objects.AppendTail((CObject){szOutputFile});
|
||||
|
||||
ClangFile_t file = {};
|
||||
file.m_szName = m_szName;
|
||||
file.m_szArguments = args;
|
||||
g_clangFiles.AppendTail(file);
|
||||
ClangFile_t cfile = {};
|
||||
cfile.m_szName = m_szName;
|
||||
cfile.m_szArguments = args;
|
||||
g_clangFiles.AppendTail(cfile);
|
||||
}
|
||||
return proj;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user