return result;
}
- bool GenerateCompilerCf(CompilerConfig compiler)
+ bool GenerateCompilerCf(CompilerConfig compiler, bool eC)
{
bool result = false;
char path[MAX_LOCATION];
f.Printf("CPP := $(CCACHE_COMPILE)$(DISTCC_COMPILE)$(GCC_PREFIX)%s$(_SYSROOT)\n", compiler.cppCommand);
f.Printf("CC := $(CCACHE_COMPILE)$(DISTCC_COMPILE)$(GCC_PREFIX)%s$(_SYSROOT)\n", compiler.ccCommand);
f.Printf("CXX := $(CCACHE_COMPILE)$(DISTCC_COMPILE)$(GCC_PREFIX)%s$(_SYSROOT)\n", compiler.cxxCommand);
- f.Printf("ECP := $(if $(ECP_DEBUG),ide -debug-start \"$(ECERE_SDK_SRC)/compiler/ecp/ecp.epj\" -debug-work-dir \"${CURDIR}\" -@,%s)\n", compiler.ecpCommand);
- f.Printf("ECC := $(if $(ECC_DEBUG),ide -debug-start \"$(ECERE_SDK_SRC)/compiler/ecc/ecc.epj\" -debug-work-dir \"${CURDIR}\" -@,%s)$(if $(CROSS_TARGET), -t $(TARGET_PLATFORM),)\n", compiler.eccCommand);
- f.Printf("ECS := $(if $(ECS_DEBUG),ide -debug-start \"$(ECERE_SDK_SRC)/compiler/ecs/ecs.epj\" -debug-work-dir \"${CURDIR}\" -@,%s)$(if $(CROSS_TARGET), -t $(TARGET_PLATFORM),)$(if $(OUTPUT_POT), -outputpot,)$(if $(DISABLED_POOLING), -disabled-pooling,)\n", compiler.ecsCommand);
+ if(eC)
+ {
+ f.Printf("ECP := $(if $(ECP_DEBUG),ide -debug-start \"$(ECERE_SDK_SRC)/compiler/ecp/ecp.epj\" -debug-work-dir \"${CURDIR}\" -@,%s)\n", compiler.ecpCommand);
+ f.Printf("ECC := $(if $(ECC_DEBUG),ide -debug-start \"$(ECERE_SDK_SRC)/compiler/ecc/ecc.epj\" -debug-work-dir \"${CURDIR}\" -@,%s)$(if $(CROSS_TARGET), -t $(TARGET_PLATFORM),)\n", compiler.eccCommand);
+ f.Printf("ECS := $(if $(ECS_DEBUG),ide -debug-start \"$(ECERE_SDK_SRC)/compiler/ecs/ecs.epj\" -debug-work-dir \"${CURDIR}\" -@,%s)$(if $(CROSS_TARGET), -t $(TARGET_PLATFORM),)$(if $(OUTPUT_POT), -outputpot,)$(if $(DISABLED_POOLING), -disabled-pooling,)\n", compiler.ecsCommand);
+ }
+ else
+ {
+ f.Printf("ECP := %s\n", compiler.ecpCommand);
+ f.Printf("ECC := %s$(if $(CROSS_TARGET), -t $(TARGET_PLATFORM),)\n", compiler.eccCommand);
+ f.Printf("ECS := %s$(if $(CROSS_TARGET), -t $(TARGET_PLATFORM),)$(if $(OUTPUT_POT), -outputpot,)$(if $(DISABLED_POOLING), -disabled-pooling,)\n", compiler.ecsCommand);
+ }
f.Printf("EAR := %s\n", compiler.earCommand);
f.Puts("AS := $(GCC_PREFIX)as\n");
f.Puts("objdir:\n");
if(!relObjDir)
f.Puts("\t$(if $(wildcard $(OBJ)),,$(call mkdirq,$(OBJ)))\n");
-
+ if(numCObjects)
+ {
f.Puts("\t$(if $(ECERE_SDK_SRC),$(if $(wildcard $(call escspace,$(ECERE_SDK_SRC)/crossplatform.mk)),,@$(call echo,Ecere SDK Source Warning: The value of ECERE_SDK_SRC is pointing to an incorrect ($(ECERE_SDK_SRC)) location.)),)\n");
f.Puts("\t$(if $(ECERE_SDK_SRC),,$(if $(ECP_DEBUG)$(ECC_DEBUG)$(ECS_DEBUG),@$(call echo,ECC Debug Warning: Please define ECERE_SDK_SRC before using ECP_DEBUG, ECC_DEBUG or ECS_DEBUG),))\n");
+ }
//f.Puts("# PRE-BUILD COMMANDS\n");
if(options && options.prebuildCommands)
{
return result;
}
- bool ContainsFilesWithExtension(char * extension)
+ bool ContainsFilesWithExtension(char * extension, ProjectConfig prjConfig)
{
if(type == file)
{
}
else if(files)
{
- bool needed = false;
for(child : files)
- if(child.ContainsFilesWithExtension(extension))
- return true;
+ {
+ if(child.type != resources && (child.type == folder || !prjConfig || !child.GetIsExcluded(prjConfig)))
+ {
+ if(child.ContainsFilesWithExtension(extension, prjConfig))
+ return true;
+ }
+ }
}
return false;
}
}
if(files)
{
- bool needed = false;
- if(ContainsFilesWithExtension("ec"))
- {
- for(child : files)
- {
- if(child.type != resources && (child.type == folder || !child.GetIsExcluded(prjConfig)))
- {
- needed = true;
- break;
- }
- }
- }
- if(needed)
+ if(ContainsFilesWithExtension("ec", prjConfig))
{
for(child : files)
{
}
if(files)
{
- bool needed = false;
- if(ContainsFilesWithExtension("ec"))
- {
- for(child : files)
- {
- if(child.type != resources && (child.type == folder || !child.GetIsExcluded(prjConfig)))
- {
- needed = true;
- break;
- }
- }
- }
- if(needed)
+ if(ContainsFilesWithExtension("ec", prjConfig))
{
for(child : files)
{
}
if(files)
{
- bool needed = false;
- if(ContainsFilesWithExtension("ec"))
- {
- for(child : files)
- {
- if(child.type != resources && (child.type == folder || !child.GetIsExcluded(prjConfig)))
- {
- needed = true;
- break;
- }
- }
- }
- if(needed)
+ if(ContainsFilesWithExtension("ec", prjConfig))
{
for(child : files)
{
output.concat("\"");
}
}
- else if(type == project && ContainsFilesWithExtension("ec"))
+ else if(type == project && ContainsFilesWithExtension("ec", prjConfig))
{
Project prj = property::project;
mi = ide.projectInstallItem;
MenuItem { pop, $"Install" , t , NotifySelect = ProjectInstall , bitmap = mi.bitmap }.disabled = na;
}
- if(showDebuggingMenuItems && node.ContainsFilesWithExtension("ec"))
+ if(showDebuggingMenuItems && node.ContainsFilesWithExtension("ec", node.project.config))
{
MenuDivider { pop };
MenuItem { pop, $"Debug Generate Symbols", l, NotifySelect = FileDebugGenerateSymbols }.disabled = na;
bool ProjectPrepareCompiler(Project project, CompilerConfig compiler, bool silent)
{
- if((!project.GenerateCrossPlatformMk(app.includeFile) || !project.GenerateCompilerCf(compiler)) && !silent)
+ if((!project.GenerateCrossPlatformMk(app.includeFile) ||
+ !project.GenerateCompilerCf(compiler, project.topNode.ContainsFilesWithExtension("ec", project.config))) && !silent)
ide.outputView.buildBox.Logf($"Error generating compiler configuration (Is the project/config directory writable?)\n");
return true;
}