(For splitting OBJECTS, was taking into account expanded $(OBJ) for Windows command line limit, now assuming it expands to at most 36 characters)
Cleaned up code to no longer pass round CompilerConfig objects where they should not
msgid "Functions"
msgstr "Functions"
-#: ./../ide/src/IDESettings.ec:626
+#: ./../ide/src/IDESettings.ec:624
msgid "GNU Compiler Collection (GCC) / GNU Make"
msgstr "GNU Compiler Collection (GCC) / GNU Make"
msgid "Methods"
msgstr "Methods"
-#: ./../ide/src/IDESettings.ec:629
+#: ./../ide/src/IDESettings.ec:627
msgid "Microsoft Visual Studio 2005 (8.0) Compiler"
msgstr "Microsoft Visual Studio 2005 (8.0) Compiler"
-#: ./../ide/src/IDESettings.ec:630
+#: ./../ide/src/IDESettings.ec:628
msgid "Microsoft Visual Studio 2008 (9.0) Compiler"
msgstr "Microsoft Visual Studio 2008 (9.0) Compiler"
-#: ./../ide/src/IDESettings.ec:632
+#: ./../ide/src/IDESettings.ec:630
msgid "Microsoft Visual Studio 2010 (10.0) Compiler"
msgstr "Microsoft Visual Studio 2010 (10.0) Compiler"
msgid "Parent namespace: <a href=\"api://%08x\" style=\"text-decoration: none;\">%s</a><br>\n"
msgstr "Parent namespace: <a href=\"api://%08x\" style=\"text-decoration: none;\">%s</a><br>\n"
-#: ./../ide/src/IDESettings.ec:628
+#: ./../ide/src/IDESettings.ec:626
msgid "Portable C Compiler / GNU Make"
msgstr "Portable C Compiler / GNU Make"
msgid "Tahoma"
msgstr "Tahoma"
-#: ./../ide/src/IDESettings.ec:627
+#: ./../ide/src/IDESettings.ec:625
msgid "Tiny C Compiler / GNU Make"
msgstr "Tiny C Compiler / GNU Make"
msgid "Error: Unable to open project file (%s) due to unknown error.\n"
msgstr "Error: Unable to open project file (%s) due to unknown error.\n"
-#: ./../ide/src/IDESettings.ec:626
+#: ./../ide/src/IDESettings.ec:624
msgid "GNU Compiler Collection (GCC) / GNU Make"
msgstr "GNU Compiler Collection (GCC) / GNU Make"
-#: ./../ide/src/IDESettings.ec:629
+#: ./../ide/src/IDESettings.ec:627
msgid "Microsoft Visual Studio 2005 (8.0) Compiler"
msgstr "Microsoft Visual Studio 2005 (8.0) Compiler"
-#: ./../ide/src/IDESettings.ec:630
+#: ./../ide/src/IDESettings.ec:628
msgid "Microsoft Visual Studio 2008 (9.0) Compiler"
msgstr "Microsoft Visual Studio 2008 (9.0) Compiler"
-#: ./../ide/src/IDESettings.ec:632
+#: ./../ide/src/IDESettings.ec:630
msgid "Microsoft Visual Studio 2010 (10.0) Compiler"
msgstr "Microsoft Visual Studio 2010 (10.0) Compiler"
msgid "Notice: Project configuration (%s) will be used.\n"
msgstr "Notice: Project configuration (%s) will be used.\n"
-#: ./../ide/src/IDESettings.ec:628
+#: ./../ide/src/IDESettings.ec:626
msgid "Portable C Compiler / GNU Make"
msgstr "Portable C Compiler / GNU Make"
msgid "Syntax:\n"
msgstr "Syntax:\n"
-#: ./../ide/src/IDESettings.ec:627
+#: ./../ide/src/IDESettings.ec:625
msgid "Tiny C Compiler / GNU Make"
msgstr "Tiny C Compiler / GNU Make"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Basepath: ../\n"
-#: ./src/project/Project.ec:1356
+#: ./src/project/Project.ec:1362
msgid " %s: No such file or directory\n"
msgstr " %s: No such file or directory\n"
msgid " file is not part of any project.\n"
msgstr " file is not part of any project.\n"
-#: ./src/project/ProjectView.ec:1759
+#: ./src/project/ProjectView.ec:1768
msgid " was "
msgstr " was "
msgid "Add Files to Folder..."
msgstr "Add Files to Folder..."
-#: ./src/project/ProjectView.ec:1704
+#: ./src/project/ProjectView.ec:1713
msgid "Add Files to Project"
msgstr "Add Files to Project"
msgid "Add Resources to Folder..."
msgstr "Add Resources to Folder..."
-#: ./src/project/ProjectView.ec:1704
+#: ./src/project/ProjectView.ec:1713
msgid "Add Resources to Project"
msgstr "Add Resources to Project"
msgid "All files"
msgstr "All files"
-#: ./src/project/ProjectView.ec:1994
+#: ./src/project/ProjectView.ec:2003
msgid "Are you sure you want to remove the \"%s\" project\nfrom this workspace?"
msgstr "Are you sure you want to remove the \"%s\" project\nfrom this workspace?"
-#: ./src/project/ProjectView.ec:1971
+#: ./src/project/ProjectView.ec:1980
msgid "Are you sure you want to remove the folder \"%s\"\nand all of its contents from the project?"
msgstr "Are you sure you want to remove the folder \"%s\"\nand all of its contents from the project?"
msgid "Attach %s"
msgstr "Attach %s"
-#: ./src/project/ProjectView.ec:1305
+#: ./src/project/ProjectView.ec:1314
msgid "Attempting to debug non-debug configuration\nProceed anyways?"
msgstr "Attempting to debug non-debug configuration\nProceed anyways?"
msgid "Builder"
msgstr "Builder"
-#: ./src/project/Project.ec:1433
+#: ./src/project/Project.ec:1439
msgid "Building library...\n"
msgstr "Building library...\n"
-#: ./src/project/ProjectView.ec:639
+#: ./src/project/ProjectView.ec:648
msgid "Building project %s using the %s configuration...\n"
msgstr "Building project %s using the %s configuration...\n"
msgid "Clean project"
msgstr "Clean project"
-#: ./src/project/ProjectView.ec:882
+#: ./src/project/ProjectView.ec:891
msgid "Cleaning project %s using the %s configuration...\n"
msgstr "Cleaning project %s using the %s configuration...\n"
msgid "Compilers Detection"
msgstr "Compilers Detection"
-#: ./src/project/ProjectView.ec:1035
+#: ./src/project/ProjectView.ec:1044
msgid "Compiling single file %s in project %s using the %s configuration...\n"
msgstr "Compiling single file %s in project %s using the %s configuration...\n"
-#: ./src/project/ProjectView.ec:1037
+#: ./src/project/ProjectView.ec:1046
msgid "Compiling single file %s in project %s...\n"
msgstr "Compiling single file %s in project %s...\n"
-#: ./src/project/Project.ec:1404
+#: ./src/project/Project.ec:1410
msgid "Compiling...\n"
msgstr "Compiling...\n"
msgid "Copy"
msgstr "Copy"
-#: ./src/project/ProjectView.ec:1740
+#: ./src/project/ProjectView.ec:1749
msgid "Couldn't create file."
msgstr "Couldn't create file."
msgid "Debugger required for symbol evaluation in \"%s\""
msgstr "Debugger required for symbol evaluation in \"%s\""
-#: ./src/project/ProjectView.ec:1303
+#: ./src/project/ProjectView.ec:1312
msgid "Debugging compressed applications is not supported\n"
msgstr "Debugging compressed applications is not supported\n"
msgid "Delete %s"
msgstr "Delete %s"
-#: ./src/project/ProjectView.ec:1972
+#: ./src/project/ProjectView.ec:1981
msgid "Delete Folder"
msgstr "Delete Folder"
-#: ./src/project/Project.ec:1754
+#: ./src/project/Project.ec:1760
msgid "Deleting target and object files..."
msgstr "Deleting target and object files..."
msgid "Error creating directory"
msgstr "Error creating directory"
-#: ./src/project/Project.ec:1702
+#: ./src/project/Project.ec:1708
msgid "Error executing make (%s) command\n"
msgstr "Error executing make (%s) command\n"
msgid "Expression"
msgstr "Expression"
-#: ./src/project/Project.ec:1557
+#: ./src/project/Project.ec:1563
msgid "Fatal Error: child process terminated unexpectedly\n"
msgstr "Fatal Error: child process terminated unexpectedly\n"
msgid "File"
msgstr "File"
-#: ./src/project/ProjectView.ec:1228
+#: ./src/project/ProjectView.ec:1237
#: ./src/ide.ec:2410
msgid "File %s is excluded from current build configuration.\n"
msgstr "File %s is excluded from current build configuration.\n"
msgid "File doesn't exist."
msgstr "File doesn't exist."
-#: ./src/project/ProjectView.ec:1729
+#: ./src/project/ProjectView.ec:1738
#: ./src/ide.ec:2034
msgid "File doesn't exist. Create?"
msgstr "File doesn't exist. Create?"
msgid "GIF Image"
msgstr "GIF Image"
-#: ./src/IDESettings.ec:626
+#: ./src/IDESettings.ec:624
msgid "GNU Compiler Collection (GCC) / GNU Make"
msgstr "GNU Compiler Collection (GCC) / GNU Make"
msgid "Generating Makefile & Dependencies..."
msgstr "Generating Makefile & Dependencies..."
-#: ./src/project/Project.ec:1409
+#: ./src/project/Project.ec:1415
msgid "Generating symbols...\n"
msgstr "Generating symbols...\n"
msgid "Linker"
msgstr "Linker"
-#: ./src/project/Project.ec:1469
+#: ./src/project/Project.ec:1475
msgid "Linker Error"
msgstr "Linker Error"
msgid "Linker Options"
msgstr "Linker Options"
-#: ./src/project/Project.ec:1422
+#: ./src/project/Project.ec:1428
msgid "Linking...\n"
msgstr "Linking...\n"
msgid "Methods"
msgstr "Methods"
-#: ./src/IDESettings.ec:629
+#: ./src/IDESettings.ec:627
msgid "Microsoft Visual Studio 2005 (8.0) Compiler"
msgstr "Microsoft Visual Studio 2005 (8.0) Compiler"
-#: ./src/IDESettings.ec:630
+#: ./src/IDESettings.ec:628
msgid "Microsoft Visual Studio 2008 (9.0) Compiler"
msgstr "Microsoft Visual Studio 2008 (9.0) Compiler"
-#: ./src/IDESettings.ec:632
+#: ./src/IDESettings.ec:630
msgid "Microsoft Visual Studio 2010 (10.0) Compiler"
msgstr "Microsoft Visual Studio 2010 (10.0) Compiler"
msgid "Name"
msgstr "Name"
-#: ./src/project/ProjectView.ec:1777
+#: ./src/project/ProjectView.ec:1786
msgid "Name Conflict"
msgstr "Name Conflict"
msgid "Pointer"
msgstr "Pointer"
-#: ./src/IDESettings.ec:628
+#: ./src/IDESettings.ec:626
msgid "Portable C Compiler / GNU Make"
msgstr "Portable C Compiler / GNU Make"
msgid "Project Already Exists"
msgstr "Project Already Exists"
-#: ./src/project/ProjectView.ec:782
+#: ./src/project/ProjectView.ec:791
msgid "Project Build"
msgstr "Project Build"
-#: ./src/project/ProjectView.ec:878
+#: ./src/project/ProjectView.ec:887
msgid "Project Clean"
msgstr "Project Clean"
msgid "Project Files (*.epj)"
msgstr "Project Files (*.epj)"
-#: ./src/project/ProjectView.ec:809
+#: ./src/project/ProjectView.ec:818
msgid "Project Link"
msgstr "Project Link"
msgid "Project Name"
msgstr "Project Name"
-#: ./src/project/ProjectView.ec:917
+#: ./src/project/ProjectView.ec:926
msgid "Project Real Clean"
msgstr "Project Real Clean"
-#: ./src/project/ProjectView.ec:842
+#: ./src/project/ProjectView.ec:851
msgid "Project Rebuild"
msgstr "Project Rebuild"
msgid "Rebuild project"
msgstr "Rebuild project"
-#: ./src/project/ProjectView.ec:846
+#: ./src/project/ProjectView.ec:855
msgid "Rebuilding project %s using the %s configuration...\n"
msgstr "Rebuilding project %s using the %s configuration...\n"
msgid "Relink project"
msgstr "Relink project"
-#: ./src/project/ProjectView.ec:813
+#: ./src/project/ProjectView.ec:822
msgid "Relinking project %s using the %s configuration...\n"
msgstr "Relinking project %s using the %s configuration...\n"
msgid "Remove"
msgstr "Remove"
-#: ./src/project/ProjectView.ec:1995
+#: ./src/project/ProjectView.ec:2004
msgid "Remove Project"
msgstr "Remove Project"
msgid "Remove project from workspace"
msgstr "Remove project from workspace"
-#: ./src/project/ProjectView.ec:921
+#: ./src/project/ProjectView.ec:930
msgid "Removing intermediate objects directory for project %s using the %s configuration...\n"
msgstr "Removing intermediate objects directory for project %s using the %s configuration...\n"
msgid "Resume"
msgstr "Resume"
-#: ./src/project/ProjectView.ec:1301
+#: ./src/project/ProjectView.ec:1310
#: ./src/ide.ec:250
#: ./src/ide.ec:898
msgid "Run"
msgid "Shared Library"
msgstr "Shared Library"
-#: ./src/project/ProjectView.ec:1301
+#: ./src/project/ProjectView.ec:1310
msgid "Shared and static libraries cannot be run like executables."
msgstr "Shared and static libraries cannot be run like executables."
msgid "Start"
msgstr "Start"
-#: ./src/project/ProjectView.ec:1303
-#: ./src/project/ProjectView.ec:1305
+#: ./src/project/ProjectView.ec:1312
+#: ./src/project/ProjectView.ec:1314
msgid "Starting Debug"
msgstr "Starting Debug"
msgid "Target Type"
msgstr "Target Type"
-#: ./src/project/Project.ec:1758
+#: ./src/project/Project.ec:1764
msgid "Target and object files deleted\n"
msgstr "Target and object files deleted\n"
msgid "The document %s was modified by another application.\nWould you like to reload it and lose your changes?"
msgstr "The document %s was modified by another application.\nWould you like to reload it and lose your changes?"
-#: ./src/project/ProjectView.ec:1758
+#: ./src/project/ProjectView.ec:1767
msgid "The following file"
msgstr "The following file"
msgid "Tile Vertically"
msgstr "Tile Vertically"
-#: ./src/IDESettings.ec:627
+#: ./src/IDESettings.ec:625
msgid "Tiny C Compiler / GNU Make"
msgstr "Tiny C Compiler / GNU Make"
msgid "Unknown prompt"
msgstr "Unknown prompt"
-#: ./src/project/ProjectView.ec:1062
+#: ./src/project/ProjectView.ec:1071
#: ./src/designer/CodeEditor.ec:2417
msgid "Untitled %d"
msgstr "Untitled %d"
msgid "Would you like to save changes made to the workspace options?"
msgstr "Would you like to save changes made to the workspace options?"
-#: ./src/project/Project.ec:1435
+#: ./src/project/Project.ec:1441
msgid "Writing symbol loader...\n"
msgstr "Writing symbol loader...\n"
msgid "You must specify a search location."
msgstr "You must specify a search location."
-#: ./src/project/Project.ec:1287
-#: ./src/project/Project.ec:1549
+#: ./src/project/Project.ec:1293
+#: ./src/project/Project.ec:1555
msgid "\nBuild cancelled by user.\n"
msgstr "\nBuild cancelled by user.\n"
msgid "eC/C/C++ Source Files (*.ec, *.c, *.cpp, *.cc, *.cxx)"
msgstr "eC/C/C++ Source Files (*.ec, *.c, *.cpp, *.cc, *.cxx)"
-#: ./src/project/Project.ec:1564
+#: ./src/project/Project.ec:1570
msgid "error"
msgstr "error"
-#: ./src/project/Project.ec:1564
+#: ./src/project/Project.ec:1570
msgid "errors"
msgstr "errors"
msgid "inside %s, %s\n"
msgstr "inside %s, %s\n"
-#: ./src/project/Project.ec:1566
+#: ./src/project/Project.ec:1572
msgid "no error, "
msgstr "no error, "
-#: ./src/project/Project.ec:1571
+#: ./src/project/Project.ec:1577
msgid "no warning\n"
msgstr "no warning\n"
-#: ./src/project/ProjectView.ec:1761
+#: ./src/project/ProjectView.ec:1770
msgid "not added because of identical file name conflict within the project.\n\n"
msgstr "not added because of identical file name conflict within the project.\n\n"
msgid "s"
msgstr "s"
-#: ./src/project/ProjectView.ec:1760
+#: ./src/project/ProjectView.ec:1769
msgid "s were "
msgstr "s were "
msgid "unknown source\n"
msgstr "unknown source\n"
-#: ./src/project/Project.ec:1569
+#: ./src/project/Project.ec:1575
msgid "warning"
msgstr "warning"
-#: ./src/project/Project.ec:1569
+#: ./src/project/Project.ec:1575
msgid "warnings"
msgstr "warnings"
}
- char * GetObjDirExpression(CompilerConfig compiler, ProjectConfig config)
+ char * GetObjDirExpression(ProjectConfig config)
{
// TODO: Support platform options
char * expression = localObjectsDirectory;
DirExpression GetObjDir(CompilerConfig compiler, ProjectConfig config)
{
- char * expression = GetObjDirExpression(compiler, config);
+ char * expression = GetObjDirExpression(config);
DirExpression objDir { type = intermediateObjectsDir };
objDir.Evaluate(expression, this, compiler, config);
return objDir;
}
- char * GetTargetDirExpression(CompilerConfig compiler, ProjectConfig config)
+ char * GetTargetDirExpression(ProjectConfig config)
{
// TODO: Support platform options
char * expression = localTargetDirectory;
DirExpression GetTargetDir(CompilerConfig compiler, ProjectConfig config)
{
- char * expression = GetTargetDirExpression(compiler, config);
+ char * expression = GetTargetDirExpression(config);
DirExpression targetDir { type = DirExpressionType::targetDir /*intermediateObjectsDir*/};
targetDir.Evaluate(expression, this, compiler, config);
return targetDir;
PathCatSlash(cfDir, ideSettings.compilerConfigsDir);
result = true;
}
+ else
+ {
+ // Default to <ProjectDir>/configs if unset
+ PathCatSlash(cfDir, "configs");
+ result = true;
+ }
if(cfDir && cfDir[0] && cfDir[strlen(cfDir)-1] != '/')
strcat(cfDir, "/");
return result;
f.Printf("# TOOLCHAIN\n\n");
//f.Printf("SHELL := %s\n", "ar"/*compiler.arCommand*/); // is this really needed?
- f.Printf("CPP := $(CCACHE_COMPILE) $(DISTCC_COMPILE) %s\n", compiler.cppCommand);
+ f.Printf("CPP := %s\n", compiler.cppCommand);
f.Printf("CC := $(CCACHE_COMPILE) $(DISTCC_COMPILE) %s\n", compiler.ccCommand);
f.Printf("CXX := $(CCACHE_COMPILE) $(DISTCC_COMPILE) %s\n", compiler.cxxCommand);
f.Printf("ECP := %s\n", compiler.ecpCommand);
f.Printf("\nPLATFORM = %s\n", (char *)compiler.targetPlatform);
}
+ if(gccCompiler)
+ {
+ f.Printf("\nCFLAGS += -fmessage-length=0\n");
+ }
+
if(compiler.includeDirs && compiler.includeDirs.count)
{
f.Printf("\nCFLAGS +=");
return result;
}
- bool GenerateMakefile(char * altMakefilePath, bool noResources, char * includemkPath,
- CompilerConfig compiler, ProjectConfig config)
+ bool GenerateMakefile(char * altMakefilePath, bool noResources, char * includemkPath, ProjectConfig config)
{
bool result = false;
char filePath[MAX_LOCATION];
PathCatSlash(filePath, makeFile);
}
-#if defined(__WIN32__) && !defined(MAKEFILE_GENERATOR)
- if(compiler.type.isVC)
- {
- GenerateVSSolutionFile(this, compiler);
- GenerateVCProjectFile(this, compiler);
- }
- else
-#endif
f = FileOpen(altMakefilePath ? altMakefilePath : filePath, write);
/*SetPath(false, compiler, config);
char targetDirExpNoSpaces[MAX_LOCATION];
char fixedModuleName[MAX_FILENAME];
char fixedConfigName[MAX_FILENAME];
- char fixedCompilerName[MAX_FILENAME];
int c, len;
// Non-zero if we're building eC code
// We'll have to be careful with this when merging configs where eC files can be excluded in some configs and included in others
int numCObjects = 0;
bool containsCXX = false; // True if the project contains a C++ file
bool sameObjTargetDirs;
- DirExpression objDirExp = GetObjDir(compiler, config);
+ String objDirExp = GetObjDirExpression(config);
TargetTypes targetType = GetTargetType(config);
- bool crossCompiling = compiler.targetPlatform != runtimePlatform;
- bool gccCompiler = compiler.ccCommand && (strstr(compiler.ccCommand, "gcc") != null || strstr(compiler.ccCommand, "g++") != null);
- bool tccCompiler = compiler.ccCommand && strstr(compiler.ccCommand, "tcc") != null;
- bool defaultPreprocessor = compiler.cppCommand && (strstr(compiler.cppCommand, "gcc") != null || compiler.cppCommand && strstr(compiler.cppCommand, "cpp") != null);
char cfDir[MAX_LOCATION];
int objectsParts, eCsourcesParts;
Array<String> listItems { };
Map<String, NameCollisionInfo> namesInfo { };
bool forceBitDepth = false;
- ReplaceSpaces(objDirNoSpaces, objDirExp.dir);
- strcpy(targetDir, GetTargetDirExpression(compiler, config));
+ ReplaceSpaces(objDirNoSpaces, objDirExp);
+ strcpy(targetDir, GetTargetDirExpression(config));
ReplaceSpaces(targetDirExpNoSpaces, targetDir);
- strcpy(objDirExpNoSpaces, GetObjDirExpression(compiler, config));
+ strcpy(objDirExpNoSpaces, GetObjDirExpression(config));
ChangeCh(objDirExpNoSpaces, '\\', '/'); // TODO: this is a hack, paths should never include win32 path seperators - fix this in ProjectSettings and ProjectLoad instead
ReplaceSpaces(objDirExpNoSpaces, objDirExpNoSpaces);
ReplaceSpaces(resDirNoSpaces, resNode.path ? resNode.path : "");
- //ReplaceSpaces(fixedPrjName, name);
ReplaceSpaces(fixedModuleName, moduleName);
ReplaceSpaces(fixedConfigName, GetConfigName(config));
- ReplaceSpaces(fixedCompilerName, compiler.name);
- //CamelCase(fixedModuleName); // case is important for static linking
CamelCase(fixedConfigName);
- CamelCase(fixedCompilerName);
sameObjTargetDirs = !fstrcmp(objDirExpNoSpaces, targetDirExpNoSpaces);
f.Printf("# INCLUDES\n\n");
f.Printf("include %s\n", includemkPath ? includemkPath : "$(_CF_DIR)crossplatform.mk");
- f.Printf("include $(_CF_DIR)$(PLATFORM)-$(COMPILER).cf\n", (char*)runtimePlatform, fixedCompilerName);
+ f.Printf("include $(_CF_DIR)$(PLATFORM)-$(COMPILER).cf\n");
f.Printf("\n");
f.Printf("# VARIABLES\n\n");
}
f.Printf("\n");
- varStringLenDiffs["$(OBJ)"] = strlen(objDirNoSpaces) - 6;
+ // Use something fixed here, to not cause Makefile differences across compilers...
+ varStringLenDiffs["$(OBJ)"] = 30; // strlen("obj/memoryGuard.android.gcc-4.6.2") - 6;
+ // varStringLenDiffs["$(OBJ)"] = strlen(objDirNoSpaces) - 6;
topNode.GenMakefileGetNameCollisionInfo(namesInfo, config);
}
f.Printf("CFLAGS +=");
- if(gccCompiler)
+ //if(gccCompiler)
{
- f.Printf(" -fmessage-length=0 $(OPTIMIZE)");
- //if(compiler.targetPlatform.is32Bits)
+ f.Printf(" $(OPTIMIZE)");
forceBitDepth = (options && options.buildBitDepth) || numCObjects;
if(forceBitDepth)
f.Printf((!options || !options.buildBitDepth || options.buildBitDepth == bits32) ? " -m32" : " -m64");
- //else if(compiler.targetPlatform.is64Bits)
- // f.Printf(" -m64");
f.Printf(" $(FPIC)");
- //f.Printf(" -fpack-struct");
}
switch(GetWarnings(config))
{
OutputListOption(f, "I", options.includeDirs, lineEach, true);
f.Printf("\n\n");
- f.Printf("CECFLAGS +=%s%s%s%s", defaultPreprocessor ? "" : " -cpp ", defaultPreprocessor ? "" : compiler.cppCommand,
- crossCompiling ? " -t " : "", crossCompiling ? (char*)compiler.targetPlatform : "");
+ f.Printf("CECFLAGS += -cpp $(call escspace,$(CPP)) -t $(PLATFORM)");
f.Printf("\n\n");
f.Printf("ECFLAGS +=");
f.Printf("# SYMBOL RULES\n\n");
{
Map<Platform, bool> excludedPlatforms { };
- topNode.GenMakefilePrintSymbolRules(f, this, compiler, config, excludedPlatforms);
+ topNode.GenMakefilePrintSymbolRules(f, this, config, excludedPlatforms);
delete excludedPlatforms;
}
f.Printf("# C OBJECT RULES\n\n");
{
Map<Platform, bool> excludedPlatforms { };
- topNode.GenMakefilePrintCObjectRules(f, this, compiler, config, excludedPlatforms);
+ topNode.GenMakefilePrintCObjectRules(f, this, config, excludedPlatforms);
delete excludedPlatforms;
}
// see we-have-file-specific-options in ProjectNode.ec
{
Map<Platform, bool> excludedPlatforms { };
- topNode.GenMakefilePrintObjectRules(f, this, namesInfo, compiler, config, excludedPlatforms);
+ topNode.GenMakefilePrintObjectRules(f, this, namesInfo, config, excludedPlatforms);
delete excludedPlatforms;
}
if(numCObjects)
- GenMakefilePrintMainObjectRule(f, compiler, config);
+ GenMakefilePrintMainObjectRule(f, config);
f.Printf("clean: objdir%s\n", sameObjTargetDirs ? "" : " targetdir");
f.Printf("\t$(call rmq,%s$(TARGET))\n", numCObjects ? "$(OBJ)$(MODULE).main.c $(OBJ)$(MODULE).main.ec $(OBJ)$(MODULE).main$(I) $(OBJ)$(MODULE).main$(S) " : "");
f.Printf("\n");
delete f;
- delete objDirExp;
+
listItems.Free();
delete listItems;
varStringLenDiffs.Free();
return result;
}
- void GenMakefilePrintMainObjectRule(File f, CompilerConfig compiler, ProjectConfig config)
+ void GenMakefilePrintMainObjectRule(File f, ProjectConfig config)
{
char extension[MAX_EXTENSION] = "c";
char modulePath[MAX_LOCATION];
DualPipe dep;
char command[2048];
char objDirNoSpaces[MAX_LOCATION];
- DirExpression objDirExp = GetObjDir(compiler, config);
+ String objDirExp = GetObjDirExpression(config);
- ReplaceSpaces(objDirNoSpaces, objDirExp.dir);
+ ReplaceSpaces(objDirNoSpaces, objDirExp);
ReplaceSpaces(fixedModuleName, moduleName);
//sprintf(fixedModuleName, "%s.main", fixedPrjName);
#endif
f.Printf("\t$(CC) $(CFLAGS) $(FVISIBILITY) -c $(OBJ)$(MODULE).main.%s -o $(OBJ)$(MODULE).main$(O)\n\n", extension);
-
- delete objDirExp;
}
void MatchProjectAndConfigPlatformOptions(ProjectConfig config, Platform platform,
return count;
}
- void GenMakefilePrintSymbolRules(File f, Project project, CompilerConfig compiler,
+ void GenMakefilePrintSymbolRules(File f, Project project,
ProjectConfig prjConfig, Map<Platform, bool> parentExcludedPlatforms)
{
int ifCount = 0;
for(child : files)
{
if(child.type != resources && (child.type == folder || !child.GetIsExcluded(prjConfig)))
- child.GenMakefilePrintSymbolRules(f, project, compiler, prjConfig, excludedPlatforms);
+ child.GenMakefilePrintSymbolRules(f, project, prjConfig, excludedPlatforms);
}
}
CloseRulesPlatformExclusionIfs(f, ifCount);
delete platforms;
}
- void GenMakefilePrintPrepecsRules(File f, Project project, CompilerConfig compiler,
+ void GenMakefilePrintPrepecsRules(File f, Project project,
ProjectConfig prjConfig, Map<Platform, bool> parentExcludedPlatforms)
{
int ifCount = 0;
for(child : files)
{
if(child.type != resources && (child.type == folder || !child.GetIsExcluded(prjConfig)))
- child.GenMakefilePrintPrepecsRules(f, project, compiler, prjConfig, excludedPlatforms);
+ child.GenMakefilePrintPrepecsRules(f, project, prjConfig, excludedPlatforms);
}
}
CloseRulesPlatformExclusionIfs(f, ifCount);
delete platforms;
}
- void GenMakefilePrintCObjectRules(File f, Project project, CompilerConfig compiler,
+ void GenMakefilePrintCObjectRules(File f, Project project,
ProjectConfig prjConfig, Map<Platform, bool> parentExcludedPlatforms)
{
int ifCount = 0;
for(child : files)
{
if(child.type != resources && (child.type == folder || !child.GetIsExcluded(prjConfig)))
- child.GenMakefilePrintCObjectRules(f, project, compiler, prjConfig, excludedPlatforms);
+ child.GenMakefilePrintCObjectRules(f, project, prjConfig, excludedPlatforms);
}
}
CloseRulesPlatformExclusionIfs(f, ifCount);
void GenMakefilePrintObjectRules(File f, Project project,
Map<String, NameCollisionInfo> namesInfo,
- CompilerConfig compiler, ProjectConfig prjConfig,
+ ProjectConfig prjConfig,
Map<Platform, bool> parentExcludedPlatforms)
{
int ifCount = 0;
// *** Dependency command ***
if(!strcmpi(extension, "ec"))
- sprintf(command, "%s -MT $(OBJ)%s.o -MM $(OBJ)%s.c", compiler.ccCommand, moduleName, moduleName);
+ sprintf(command, "%s -MT $(OBJ)%s.o -MM $(OBJ)%s.c", "$(CPP)", moduleName, moduleName);
else
- sprintf(command, "%s -MT $(OBJ)%s.o -MM %s%s.%s", (!strcmpi(extension, "cc") || !strcmpi(extension, "cxx") || !strcmpi(extension, "cpp")) ? compiler.cxxCommand : compiler.ccCommand,
+ sprintf(command, "%s -MT $(OBJ)%s.o -MM %s%s.%s", (!strcmpi(extension, "cc") || !strcmpi(extension, "cxx") || !strcmpi(extension, "cpp")) ? "$(CXX)" : "$(CC)",
moduleName, modulePath, moduleName, extension);
if(!strcmpi(extension, "ec"))
for(child : files)
{
if(child.type != resources && (child.type == folder || !child.GetIsExcluded(prjConfig)))
- child.GenMakefilePrintObjectRules(f, project, namesInfo, compiler, prjConfig, excludedPlatforms);
+ child.GenMakefilePrintObjectRules(f, project, namesInfo, prjConfig, excludedPlatforms);
}
}
CloseRulesPlatformExclusionIfs(f, ifCount);
project.GenerateCrossPlatformCf();
project.GenerateCompilerMk(compiler);
- project.GenerateMakefile(null, false, null, compiler, config);
+
+#if defined(__WIN32__) // I'm guessing we'll want to support generating VS files on Linux as well...
+ if(compiler.type.isVC)
+ {
+ GenerateVSSolutionFile(project, compiler);
+ GenerateVCProjectFile(project, compiler);
+ }
+ else
+#endif
+ project.GenerateMakefile(null, false, null, config);
ide.statusBar.text = null;
app.UpdateDisplay();