aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJulien Templier2011-01-20 07:29:45 +0000
committerJulien Templier2011-01-20 07:29:45 +0000
commitdd3894a44248e2c5b2c646b4cc1d1353442b7fbb (patch)
tree94c2f3ef5798f6f627962d2b98790d9ebb92d548 /tools
parentbd3f9ad1e21a791dafee1943099492d6b49d32be (diff)
downloadscummvm-rg350-dd3894a44248e2c5b2c646b4cc1d1353442b7fbb.tar.gz
scummvm-rg350-dd3894a44248e2c5b2c646b4cc1d1353442b7fbb.tar.bz2
scummvm-rg350-dd3894a44248e2c5b2c646b4cc1d1353442b7fbb.zip
TOOLS: Allow compilation and linking from inside the Code::Blocks IDE with create_project-created workspaces
- Fix include directory search order - Add custom tool command for asm files - Change linker search directory to SCUMMVM_LIBS/lib/mingw (libraries from the precompiled mingw package will need to be renamed to match the names from the MSVC precompiled package and be of the form lib<name>.a) svn-id: r55345
Diffstat (limited to 'tools')
-rw-r--r--tools/create_project/codeblocks.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/create_project/codeblocks.cpp b/tools/create_project/codeblocks.cpp
index 74e6cfb19f..aefba3a1ba 100644
--- a/tools/create_project/codeblocks.cpp
+++ b/tools/create_project/codeblocks.cpp
@@ -96,10 +96,10 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s
writeWarnings(name, project);
writeDefines(setup.defines, project);
- project << "\t\t\t\t\t<Add directory=\"..\\..\" />\n"
+ project << "\t\t\t\t\t<Add directory=\"$(SCUMMVM_LIBS)include\" />\n"
"\t\t\t\t\t<Add directory=\"..\\..\\engines\" />\n"
"\t\t\t\t\t<Add directory=\"..\\..\\common\" />\n"
- "\t\t\t\t\t<Add directory=\"$(SCUMMVM_LIBS)\\include\" />\n"
+ "\t\t\t\t\t<Add directory=\"..\\..\" />\n"
"\t\t\t\t</Compiler>\n";
//////////////////////////////////////////////////////////////////////////
@@ -107,7 +107,7 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s
project << "\t\t\t\t<Linker>\n";
for (StringList::const_iterator i = setup.libraries.begin(); i != setup.libraries.end(); ++i)
- project << "\t\t\t\t\t<Add library=\"" << *i << ".a\" />\n";
+ project << "\t\t\t\t\t<Add library=\"" << *i << "\" />\n";
for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) {
if (i->first == "scummvm")
@@ -116,7 +116,7 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s
project << "\t\t\t\t\t<Add library=\"scummvm\\engines\\" << i->first << "\\lib" << i->first << ".a\" />\n";
}
- project << "\t\t\t\t\t<Add directory=\"$(SCUMMVM_LIBS)\\lib\" />\n"
+ project << "\t\t\t\t\t<Add directory=\"$(SCUMMVM_LIBS)lib\\mingw\" />\n"
"\t\t\t\t</Linker>\n";
//////////////////////////////////////////////////////////////////////////
@@ -208,7 +208,10 @@ void CodeBlocksProvider::writeFileListToProject(const FileNode &dir, std::ofstre
projectFile << "\t\t<Unit filename=\"" << convertPathToWin(filePrefix + node->name) << "\">\n"
"\t\t\t<Option compilerVar=\"WINDRES\" />\n"
"\t\t</Unit>\n";
-
+ } else if (ext == "asm") {
+ projectFile << "\t\t<Unit filename=\"" << convertPathToWin(filePrefix + node->name) << "\">\n"
+ "\t\t\t<Option compiler=\"gcc\" use=\"1\" buildCommand=\"$(SCUMMVM_LIBS)bin/nasm.exe -f win32 -g $file -o $object\" />"
+ "\t\t</Unit>\n";
} else {
projectFile << "\t\t<Unit filename=\"" << convertPathToWin(filePrefix + node->name) << "\" />\n";
}