#ifndef MAKEFILE_GENERATOR
CompilerConfig compiler = null;
if(ide && ide.workspace)
- compiler = ideSettings.GetCompilerConfig(ide.workspace.compiler);
+ compiler = ideSettings.GetCompilerConfig(ide.workspace.activeCompiler);
return compiler;
#else
incref defaultCompiler;
if(projectView)
{
- CompilerConfig compiler = ideSettings.GetCompilerConfig(projectView.workspace.compiler);
+ CompilerConfig compiler = ideSettings.GetCompilerConfig(projectView.workspace.activeCompiler);
projectView.AddNode(topNode, null);
topNode.row.Move(prev);
bool Save(const char * fileName)
{
File f;
- /*char output[MAX_LOCATION];
- ChangeExtension(fileName, "json", output);
- f = FileOpen(output, write);*/
f = FileOpen(fileName, write);
if(f)
{
message = $"Linker ";
numWarnings++;
}
- else if(!strstr(line, "error:"))
+ else if(strstr(line, "error:"))
{
message = $"Linker Error: ";
numErrors++;
bool eC_Debug = mode.eC_ToolsDebug;
bool singleProjectOnlyNode = onlyNodes && onlyNodes.count == 1 && onlyNodes[0].type == project;
- int numJobs = compiler.numJobs;
+ int numJobs = ide.toolBar.forceSingleJob.checked == true ? 1 : compiler.numJobs;
char command[MAX_F_STRING*4];
char * compilerName = CopyString(compiler.name);
Map<String, NameCollisionInfo> cfgNameCollisions;
targetPlatform,
bitDepth ? " ARCH=" : "", bitDepth == 32 ? "32" : bitDepth == 64 ? "64" : "",
/*(bitDepth == 64 && compiler.targetPlatform == win32) ? " GCC_PREFIX=x86_64-w64-mingw32-" : (bitDepth == 32 && compiler.targetPlatform == win32) ? " GCC_PREFIX=i686-w64-mingw32-" : */"",
-
- compilerName, topNode.path, justPrint ? " -n" : "", makeFilePath);
+ compilerName,
+ objFileExt ? " O=." : "", objFileExt ? objFileExt : "",
+ topNode.path, justPrint ? " -n" : "", makeFilePath);
if(justPrint || raw)
ide.outputView.buildBox.Logf("%s\n", command);
Execute(command);
sprintf(target, "%s %s", target, args);
GetWorkingDir(oldDirectory, MAX_LOCATION);
- if(strlen(ide.workspace.debugDir))
+ if(ide.workspace.debugDir && strlen(ide.workspace.debugDir))
{
char temp[MAX_LOCATION];
strcpy(temp, topNode.path);
f.Puts("ifdef WINDOWS_TARGET\n");
f.Puts("WINDRES := $(GCC_PREFIX)windres\n");
f.Puts(" ifdef ARCH\n");
- f.Puts(" ifeq \"$(ARCH)\" \"x32\"\n");
+ f.Puts(" ifeq ($(ARCH),x32)\n");
f.Puts("WINDRES_FLAGS := -F pe-i386\n");
f.Puts(" else\n");
- f.Puts(" ifeq \"$(ARCH)\" \"x64\"\n");
+ f.Puts(" ifeq ($(ARCH),x64)\n");
f.Puts("WINDRES_FLAGS := -F pe-x86-64\n");
f.Puts(" endif\n");
f.Puts(" endif\n");
// Important: We cannot use this ifdef anymore, EXECUTABLE_TARGET is not yet defined. It's embedded in the crossplatform.mk EXECUTABLE
//f.Puts("ifdef EXECUTABLE_TARGET\n");
+ f.Puts("ifneq ($(COMPILER),pnacl)\n");
f.Printf("CONSOLE = %s\n", GetConsole(config) ? "-mconsole" : "-mwindows");
+ f.Puts("endif\n");
//f.Puts("endif\n");
f.Puts("\n");
if(ifCount)
f.Puts("else\n");
ifCount++;
- f.Printf("ifeq \"$(TARGET_TYPE)\" \"%s\"\n", TargetTypeToMakefileVariable(type));
+ f.Printf("ifeq ($(TARGET_TYPE),%s)\n", TargetTypeToMakefileVariable(type));
GetMakefileTargetFileName(type, target, config);
strcpy(temp, targetDir);
f.Puts("\t$(UPX) $(UPXFLAGS) $(TARGET)\n");
f.Puts("endif\n");
f.Puts("else\n");
- //f.Puts("ifneq \"$(TARGET_ARCH)\" \"x86_64\"\n");
+ //f.Puts("ifneq ($(TARGET_ARCH),x86_64)\n");
f.Puts("\t$(UPX) $(UPXFLAGS) $(TARGET)\n");
//f.Puts("endif\n");
f.Puts("endif\n");