-.PHONY: all clean realclean distclean emptyoutput install uninstall outputdirs bootstrap deps ecere ecerecom ecerevanilla ear compiler prepbinaries epj2make ide documentor eda prepcodeguard codeguard
+.PHONY: all clean realclean distclean emptyoutput install uninstall troubleshoot outputdirs bootstrap deps ecere ecerecom ecerevanilla ear compiler prepbinaries epj2make ide documentor eda prepcodeguard codeguard
.SILENT:
include include.mk
$(call rmdirq,"$(DESTDIR)/")
endif
@$(call echo,The Ecere SDK has been uninstalled.)
+
+troubleshoot:
+ @$(call echo,Printing values of some variables.)
+ @$(call echo,CCACHE=$(CCACHE))
+ @$(call echo,CCACHE_COMPILE=$(CCACHE_COMPILE))
+ @$(call echo,CCACHE_PREFIX=$(CCACHE_PREFIX))
+ @$(call echo,DISTCC=$(DISTCC))
+ @$(call echo,CC=$(CC))
+ @$(call echo,CPP=$(CPP))
+ @$(call echo,ECP=$(ECP))
+ @$(call echo,ECC=$(ECC))
+ @$(call echo,ECS=$(ECS))
+ @$(call echo,EAR=$(EAR))
+ @$(call echo,AS=$(AS))
+ @$(call echo,LD=$(LD))
+ @$(call echo,AR=$(AR))
+ @$(call echo,STRIP=$(STRIP))
+ @$(call echo,UPX=$(UPX))
include ../../../include.mk
-# TOOLCHAIN
-
-CPP := cpp
-CC := gcc
-ECP := ecp
-ECC := ecc
-ECS := ecs
-EAR := ear
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
-
# FLAGS
CFLAGS = -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
include ../../../include.mk
-# TOOLCHAIN
-
-CPP := cpp
-CC := gcc
-ECP := ecp
-ECC := ecc
-ECS := ecs
-EAR := ear
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
-
# FLAGS
CFLAGS = -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
include ../../../include.mk
-# TOOLCHAIN
-
-CPP := cpp
-CC := gcc
-ECP := ecp
-ECC := ecc
-ECS := ecs
-EAR := ear
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
-
# FLAGS
CFLAGS = -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
include ../../../include.mk
-# TOOLCHAIN
-
-CPP := cpp
-CC := gcc
-ECP := ecp
-ECC := ecc
-ECS := ecs
-EAR := ear
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
-
# FLAGS
CFLAGS = -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
include ../../../include.mk
-# TOOLCHAIN
-
-CPP := cpp
-CC := gcc
-ECP := ecp
-ECC := ecc
-ECS := ecs
-EAR := ear
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
-
# FLAGS
CFLAGS = -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
export LD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
export DYLD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
-CPP := cpp
-CC := gcc
ECP := $(call psep,../bootstrap/obj/bin.$(PLATFORM)/ecp)
ECC := $(call psep,../bootstrap/obj/bin.$(PLATFORM)/ecc)
ECS := $(call psep,../bootstrap/obj/bin.$(PLATFORM)/ecs)
-EAR := ear
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
# FLAGS
export LD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
export DYLD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
-CPP := cpp
-CC := gcc
ECP := $(call psep,../bootstrap/obj/bin.$(PLATFORM)/ecp)
ECC := $(call psep,../bootstrap/obj/bin.$(PLATFORM)/ecc)
ECS := $(call psep,../bootstrap/obj/bin.$(PLATFORM)/ecs)
-EAR := ear
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
# FLAGS
export LD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
export DYLD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
-CPP := cpp
-CC := gcc
ECP := $(call psep,../bootstrap/obj/bin.$(PLATFORM)/ecp)
ECC := $(call psep,../bootstrap/obj/bin.$(PLATFORM)/ecc)
ECS := $(call psep,../bootstrap/obj/bin.$(PLATFORM)/ecs)
-EAR := ear
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
# FLAGS
export DYLD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
endif
-CPP := cpp
-CC := gcc
ECP := $(call psep,../bootstrap/obj/bin.$(PLATFORM)/ecp)
ECC := $(call psep,../bootstrap/obj/bin.$(PLATFORM)/ecc)
ECS := $(call psep,../bootstrap/obj/bin.$(PLATFORM)/ecs)
-EAR := ear
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
# FLAGS
include ../../include.mk
-# TOOLCHAIN
-
-CPP := cpp
-CC := gcc
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
-
# FLAGS
# Warning: Compiling with -O2 gives 0 font height with MinGW!!
include ../../include.mk
-# TOOLCHAIN
-
-CPP := cpp
-CC := gcc
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
-
# FLAGS
CFLAGS = -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w
include ../../include.mk
-# TOOLCHAIN
-
-CPP := cpp
-CC := gcc
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
-
# FLAGS
CFLAGS = -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
include ../../include.mk
-# TOOLCHAIN
-
-CPP := cpp
-CC := gcc
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
-
# FLAGS
CFLAGS = -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w
include ../../include.mk
-# TOOLCHAIN
-
-CPP := cpp
-CC := gcc
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
-
# FLAGS
CFLAGS = -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w
# TOOLCHAIN
export LD_LIBRARY_PATH = ../obj/$(PLATFORM)/lib/
export DYLD_LIBRARY_PATH = ../obj/$(PLATFORM)/lib/
-CPP := cpp
-CC := gcc
ECP := $(call psep,../obj/$(PLATFORM)/bin/ecp)
ECC := $(call psep,../obj/$(PLATFORM)/bin/ecc)
ECS := $(call psep,../obj/$(PLATFORM)/bin/ecs)
EAR := $(call psep,../obj/$(PLATFORM)/bin/ear)
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
# FLAGS
# TOOLCHAIN
export LD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
export DYLD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
-CPP := cpp
-CC := gcc
ECP := $(call psep,../../compiler/bootstrap/obj/bin.$(PLATFORM)/ecp)
ECC := $(call psep,../../compiler/bootstrap/obj/bin.$(PLATFORM)/ecc)
ECS := $(call psep,../../compiler/bootstrap/obj/bin.$(PLATFORM)/ecs)
EAR := $(call psep,../../obj/$(PLATFORM)/bin/ear)
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
# FLAGS
# TOOLCHAIN
export LD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
export DYLD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
-CPP := cpp
-CC := gcc
ECP := $(call psep,../../compiler/bootstrap/obj/bin.$(PLATFORM)/ecp)
ECC := $(call psep,../../compiler/bootstrap/obj/bin.$(PLATFORM)/ecc)
ECS := $(call psep,../../compiler/bootstrap/obj/bin.$(PLATFORM)/ecs)
EAR := $(call psep,../../obj/$(PLATFORM)/bin/ear)
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
# FLAGS
# TOOLCHAIN
export LD_LIBRARY_PATH=../obj/$(PLATFORM)/lib
export DYLD_LIBRARY_PATH=../obj/$(PLATFORM)/lib
-CPP := cpp
-CC := gcc
ECP := $(call psep,../compiler/bootstrap/obj/bin.$(PLATFORM)/ecp$(E))
ECC := $(call psep,../compiler/bootstrap/obj/bin.$(PLATFORM)/ecc$(E))
ECS := $(call psep,../compiler/bootstrap/obj/bin.$(PLATFORM)/ecs$(E))
EAR := $(call psep,../obj/$(PLATFORM)/bin/ear)
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
# FLAGS
# TOOLCHAIN
-CPP := cpp
-CC := gcc
ECP := $(call psep,../compiler/bootstrap/obj/bin.$(PLATFORM)/ecp$(E))
ECC := $(call psep,../compiler/bootstrap/obj/bin.$(PLATFORM)/ecc$(E))
ECS := $(call psep,../compiler/bootstrap/obj/bin.$(PLATFORM)/ecs$(E))
EAR := $(call psep,../obj/$(PLATFORM)/bin/ear)
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
# FLAGS
# TOOLCHAIN
-CPP := cpp
-CC := gcc
ECP := $(call psep,../compiler/bootstrap/obj/bin.$(PLATFORM)/ecp$(E))
ECC := $(call psep,../compiler/bootstrap/obj/bin.$(PLATFORM)/ecc$(E))
ECS := $(call psep,../compiler/bootstrap/obj/bin.$(PLATFORM)/ecs$(E))
EAR := $(call psep,../obj/$(PLATFORM)/bin/ear)
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
# FLAGS
# TOOLCHAIN
export LD_LIBRARY_PATH = ../../../obj/$(PLATFORM)/lib/
export DYLD_LIBRARY_PATH = ../../../obj/$(PLATFORM)/lib/
-CPP := cpp
-CC := gcc
ECP := $(call psep,../../../obj/$(PLATFORM)/bin/ecp)
ECC := $(call psep,../../../obj/$(PLATFORM)/bin/ecc)
ECS := $(call psep,../../../obj/$(PLATFORM)/bin/ecs)
EAR := $(call psep,../../../obj/$(PLATFORM)/bin/ear)
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
# FLAGS
# TOOLCHAIN
export LD_LIBRARY_PATH = ../../../obj/$(PLATFORM)/lib/
export DYLD_LIBRARY_PATH = ../../../obj/$(PLATFORM)/lib/
-CPP := cpp
-CC := gcc
ECP := $(call psep,../../../obj/$(PLATFORM)/bin/ecp)
ECC := $(call psep,../../../obj/$(PLATFORM)/bin/ecc)
ECS := $(call psep,../../../obj/$(PLATFORM)/bin/ecs)
EAR := $(call psep,../../../obj/$(PLATFORM)/bin/ear)
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
# FLAGS
# TOOLCHAIN
export LD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
export DYLD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
-CPP := cpp
-CC := gcc
ECP := $(call psep,../../obj/$(PLATFORM)/bin/ecp)
ECC := $(call psep,../../obj/$(PLATFORM)/bin/ecc)
ECS := $(call psep,../../obj/$(PLATFORM)/bin/ecs)
EAR := $(call psep,../../obj/$(PLATFORM)/bin/ear)
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
# FLAGS
# TOOLCHAIN
export LD_LIBRARY_PATH = ../obj/$(PLATFORM)/lib/
export DYLD_LIBRARY_PATH = ../obj/$(PLATFORM)/lib/
-CPP := cpp
-CC := gcc
ECP := $(call psep,../obj/$(PLATFORM)/bin/ecp)
ECC := $(call psep,../obj/$(PLATFORM)/bin/ecc)
ECS := $(call psep,../obj/$(PLATFORM)/bin/ecs)
EAR := $(call psep,../obj/$(PLATFORM)/bin/ear)
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
# FLAGS
# TOOLCHAIN
export LD_LIBRARY_PATH = ../obj/$(PLATFORM)/lib/
export DYLD_LIBRARY_PATH = ../obj/$(PLATFORM)/lib/
-CPP := cpp
-CC := gcc
ECP := $(call psep,../obj/$(PLATFORM)/bin/ecp)
ECC := $(call psep,../obj/$(PLATFORM)/bin/ecc)
ECS := $(call psep,../obj/$(PLATFORM)/bin/ecs)
EAR := $(call psep,../obj/$(PLATFORM)/bin/ear)
-LD := gcc
-AR := ar
-STRIP := strip
-UPX := upx
# FLAGS
get { return execPrefixCommand; }
isset { return execPrefixCommand && execPrefixCommand[0]; }
}
+ bool ccacheEnabled;
+ bool distccEnabled;
+ property char * distccHosts
+ {
+ set { delete distccHosts; if(value && value[0]) distccHosts = CopyString(value); }
+ get { return distccHosts; }
+ isset { return distccHosts && distccHosts[0]; }
+ }
Array<String> includeDirs { };
Array<String> libraryDirs { };
Array<String> executableDirs { };
char * cppCommand;
char * ccCommand;
char * execPrefixCommand;
+ char * distccHosts;
/*union
{
struct { Array<String> includes, libraries, executables; };
delete ccCommand;
delete makeCommand;
delete execPrefixCommand;
+ delete distccHosts;
if(includeDirs) { includeDirs.Free(); delete includeDirs; }
if(libraryDirs) { libraryDirs.Free(); delete libraryDirs; }
if(executableDirs) { executableDirs.Free(); delete executableDirs; }
earCommand,
cppCommand,
ccCommand,
- execPrefixCommand
+ execPrefixCommand,
+ ccacheEnabled,
+ distccEnabled,
+ distccHosts
};
for(s : includeDirs) copy.includeDirs.Add(CopyString(s));
for(s : libraryDirs) copy.libraryDirs.Add(CopyString(s));
}
};
+ Button ccacheEnabled
+ {
+ this, text = "Use ccache", hotKey = altC, position = { 8, 68 };
+ isCheckbox = true;
+
+ bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+ {
+ CompilerConfig compiler = loadedCompiler;
+ if(compiler)
+ {
+ compiler.ccacheEnabled = button.checked;
+ modifiedDocument = true;
+ compilersTab.modifiedDocument = true;
+ }
+ return true;
+ }
+ };
+
+ Button distccEnabled
+ {
+ this, text = "Use distcc", hotKey = altD, position = { 8, 96 };
+ isCheckbox = true;
+
+ bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+ {
+ CompilerConfig compiler = loadedCompiler;
+ if(compiler)
+ {
+ distccHosts.disabled = !button.checked;
+ compiler.distccEnabled = button.checked;
+ modifiedDocument = true;
+ compilersTab.modifiedDocument = true;
+ }
+ return true;
+ }
+ };
+
+ Label distccHostsLabel { this, position = { 8, 124 }, labeledWindow = distccHosts };
+ EditBox distccHosts
+ {
+ this, text = "distcc hosts", hotKey = altH;
+ position = { 88, 120 }, size = { 300 };
+
+ bool NotifyModified(EditBox editBox)
+ {
+ if(loadedCompiler)
+ {
+ CompilerConfig compiler = loadedCompiler;
+ compiler.distccHosts = editBox.contents;
+ modifiedDocument = true;
+ compilersTab.modifiedDocument = true;
+ }
+ return true;
+ }
+ }
+
CompilerOptionsTab()
{
Platform p;
targetPlatform.currentRow = targetPlatform.FindRow(compiler.targetPlatform);
numJobs = compiler.numJobs;
numJobsBox.Refresh();
+ ccacheEnabled.checked = compiler.ccacheEnabled;
+ distccEnabled.checked = compiler.distccEnabled;
+ distccHosts.disabled = !compiler.distccEnabled;
+ distccHosts.contents = compiler.distccHosts;
labelTargetPlatform.disabled = disabled;
targetPlatform.disabled = disabled;
if(prj == workspace.projects.firstIterator.data) continue;
targetDirExp = prj.targetDir;
-
+
/*if(prj.config.targetType == sharedLibrary && prj.config.debug)
cfg = prj.config;
else
if(!found)
newExePaths.Add(CopySystemPath(oldPaths[c]));
}
-
+
len = 0;
for(path : newExePaths)
len += strlen(path) + 1;
libPathExists[oldPaths[c]] = true;
}
}
-
+
len = 0;
for(path : newLibPaths)
len += strlen(path) + 1;
delete newLibPaths;
delete libPathExists;
#endif
+
+ if(compiler.distccEnabled && compiler.distccHosts)
+ SetEnvironment("DISTCC_HOSTS", compiler.distccHosts);
+
delete compiler;
}
char ecsCommand[MAX_LOCATION];
char earCommand[MAX_LOCATION];
- sprintf(cppCommand, "%s ", compiler.cppCommand);
- sprintf(ccCommand, "%s ", compiler.ccCommand);
+ char * cc = compiler.ccCommand;
+ char * cpp = compiler.cppCommand;
+ sprintf(cppCommand, "%s%s%s%s ",
+ compiler.ccacheEnabled ? "ccache " : "",
+ compiler.ccacheEnabled && !compiler.distccEnabled ? " " : "",
+ compiler.distccEnabled ? "distcc " : "",
+ compiler.cppCommand);
+ sprintf(ccCommand, "%s%s%s%s ",
+ compiler.ccacheEnabled ? "ccache " : "",
+ compiler.ccacheEnabled && !compiler.distccEnabled ? " " : "",
+ compiler.distccEnabled ? "distcc " : "",
+ compiler.ccCommand);
sprintf(ecpCommand, "%s ", compiler.ecpCommand);
sprintf(eccCommand, "%s ", compiler.eccCommand);
sprintf(ecsCommand, "%s ", compiler.ecsCommand);
}
else
{
- sprintf(command, "%s -j%d %s -C \"%s\" -f \"%s\"", compiler.makeCommand, numJobs, makeTarget, topNode.path, makeFilePath);
+ sprintf(command, "%s -j%d %s%s%s -C \"%s\" -f \"%s\"", compiler.makeCommand, numJobs,
+ compiler.ccacheEnabled ? "CCACHE=y " : "",
+ compiler.distccEnabled ? "DISTCC=y " : "",
+ makeTarget, topNode.path, makeFilePath);
if((f = DualPipeOpen(PipeOpenMode { output = true, error = true, input = true }, command)))
{
result = ProcessBuildPipeOutput(f, objDirExp, isARun, onlyNode);
f.Printf("\n");
f.Printf("OBJ = %s%s\n\n", objDirExpNoSpaces, objDirExpNoSpaces[0] ? "/" : "");
-
+
f.Printf("RES = %s%s\n\n", resDirNoSpaces, resDirNoSpaces[0] ? "/" : "");
if(targetType == executable)
f.Printf("TARGET = %s\n\n", targetNoSpaces);
varStringLenDiffs["$(OBJ)"] = strlen(objDirNoSpaces) - 6;
-
+
topNode.GenMakefileGetNameCollisionInfo(namesInfo);
numCObjects = topNode.GenMakefilePrintNode(f, this, objects, namesInfo, listItems);
if(numCObjects)
listItems.Add(CopyString("$(OBJ)$(MODULE).main$(O)"));
objectsParts = OutputFileList(f, "OBJECTS", listItems, varStringLenDiffs);
-
+
topNode.GenMakefilePrintNode(f, this, cObjects, namesInfo, listItems);
cobjectsParts = OutputFileList(f, "COBJECTS", listItems, varStringLenDiffs);
-
+
topNode.GenMakefilePrintNode(f, this, symbols, null, listItems);
symbolsParts = OutputFileList(f, "SYMBOLS", listItems, varStringLenDiffs);
-
+
topNode.GenMakefilePrintNode(f, this, imports, null, listItems);
importsParts = OutputFileList(f, "IMPORTS", listItems, varStringLenDiffs);
-
+
topNode.GenMakefilePrintNode(f, this, sources, null, listItems);
OutputFileList(f, "SOURCES", listItems, varStringLenDiffs);
-
+
if(!noResources)
resNode.GenMakefilePrintNode(f, this, resources, null, listItems);
OutputFileList(f, "RESOURCES", listItems, varStringLenDiffs);
}
}
- f.Printf("# TOOLCHAIN\n\n");
-
- //f.Printf("SHELL := %s\n", "ar"/*compiler.arCommand*/); // is this really needed?
- f.Printf("CPP := %s\n", compiler.cppCommand);
- f.Printf("CC := %s\n", compiler.ccCommand);
- f.Printf("ECP := %s\n", compiler.ecpCommand);
- f.Printf("ECC := %s\n", compiler.eccCommand);
- f.Printf("ECS := %s%s%s\n", compiler.ecsCommand,
- crossCompiling ? " -t " : "", crossCompiling ? (char*)compiler.targetPlatform : "");
- f.Printf("EAR := %s\n", compiler.earCommand);
- f.Printf("LD := %s\n", compiler.ccCommand);
- f.Printf("AR := %s\n", "ar"/*compiler.arCommand*/);
- f.Printf("STRIP := %s\n", "strip"/*compiler.stripCommand*/);
- f.Printf("UPX := %s\n", "upx"/*compiler.upxCommand*/);
f.Printf("\n");
+ if(strcmpi(compiler.cppCommand, "cpp") ||
+ strcmpi(compiler.ccCommand, "gcc") ||
+ strcmpi(compiler.ecpCommand, "ecp") ||
+ strcmpi(compiler.eccCommand, "ecc") ||
+ strcmpi(compiler.ecsCommand, "ecs") || crossCompiling ||
+ strcmpi(compiler.earCommand, "ear"))
+ {
+ f.Printf("# TOOLCHAIN\n\n");
+
+ //f.Printf("SHELL := %s\n", "ar"/*compiler.arCommand*/); // is this really needed?
+ if(strcmpi(compiler.cppCommand, "cpp"))
+ f.Printf("CPP := $(CCACHE_COMPILE) $(DISTCC_COMPILE) %s\n", compiler.cppCommand);
+ if(strcmpi(compiler.ccCommand, "gcc"))
+ f.Printf("CC := $(CCACHE_COMPILE) $(DISTCC_COMPILE) %s\n", compiler.ccCommand);
+ if(strcmpi(compiler.ecpCommand, "ecp"))
+ f.Printf("ECP := %s\n", compiler.ecpCommand);
+ if(strcmpi(compiler.eccCommand, "ecc"))
+ f.Printf("ECC := %s\n", compiler.eccCommand);
+ if(strcmpi(compiler.ecsCommand, "ecs") || crossCompiling)
+ {
+ f.Printf("ECS := %s%s%s\n", compiler.ecsCommand,
+ crossCompiling ? " -t " : "", crossCompiling ? (char*)compiler.targetPlatform : "");
+ }
+ if(strcmpi(compiler.earCommand, "ear"))
+ f.Printf("EAR := %s\n", compiler.earCommand);
+ f.Printf("\n");
+ }
+
f.Printf("# FLAGS\n\n");
-
+
f.Printf("CFLAGS =");
if(gccCompiler)
{
f.Printf(" -defaultns %s", s);
}
f.Printf("\n\n");
-
+
if(targetType != staticLibrary)
{
f.Printf("OFLAGS = -m32"); // TARGET_TYPE is fixed in a Makefile, we don't want this. $(if TARGET_TYPE_STATIC_LIBRARY,,-m32)");
{
int ifCount = 0;
Platform platform;
-
+
//f.Printf("# PLATFORM-SPECIFIC POST-BUILD COMMANDS\n");
for(platform = (Platform)1; platform < Platform::enumSize; platform++)
{
endif
endif
+# SUPER TOOLS
+ifdef CCACHE
+ CCACHE_COMPILE := ccache
+ifdef DISTCC
+ DISTCC_COMPILE := distcc
+endif
+else
+ifdef DISTCC
+ DISTCC_COMPILE := distcc
+endif
+endif
+
+# TOOLCHAIN
+export CC = $(CCACHE_COMPILE) $(DISTCC_COMPILE) gcc
+export CPP = $(CCACHE_COMPILE) $(DISTCC_COMPILE) cpp
+export ECP = ecp
+export ECC = ecc
+export ECS = ecs
+export EAR = ear
+export AS = as
+export LD = ld
+export AR = ar
+export STRIP = strip
+UPX := upx
+
# SHELL COMMANDS
ifdef WINDOWS
echo = $(if $(1),echo $(1))