}
#ifndef MAKEFILE_GENERATOR
+ ProjectNode GetObjectFileNode(const char * filePath)
+ {
+ ProjectNode node = null;
+ char ext[MAX_EXTENSION];
+ GetExtension(filePath, ext);
+ if(ext[0])
+ {
+ IntermediateFileType type = IntermediateFileType::FromExtension(ext);
+ if(type)
+ {
+ char fileName[MAX_FILENAME];
+ GetLastDirectory(filePath, fileName);
+ if(fileName[0])
+ {
+ DotMain dotMain = DotMain::FromFileName(fileName);
+ node = FindNodeByObjectFileName(fileName, type, dotMain, null);
+ }
+ }
+ }
+ return node;
+ }
+
+ bool GetAbsoluteFromRelativePath(const char * relativePath, char * absolutePath)
+ {
+ ProjectNode node = topNode.FindWithPath(relativePath, false);
+ if(!node)
+ node = GetObjectFileNode(relativePath);
+ if(node)
+ {
+ strcpy(absolutePath, node.project.topNode.path);
+ PathCat(absolutePath, relativePath);
+ MakeSlashPath(absolutePath);
+ }
+ return node != null;
+ }
+
void MarkChanges(ProjectNode node)
{
for(cfg : topNode.configurations)
; // ignore this new gnu make error but what is it about?
else if(strstr(line, compiler.makeCommand) == line && line[lenMakeCommand] == ':')
{
- const char * module = strstr(line, "No rule to make target `");
+ const char * moduleBackTick = strstr(line, "No rule to make target `");
+ const char * module = moduleBackTick ? moduleBackTick : strstr(line, "No rule to make target '");
if(module)
{
char * end;
- module = strchr(module, '`') + 1;
+ module = strchr(module, moduleBackTick ? '`' : '\'') + 1;
end = strchr(module, '\'');
if(end)
{
message = $"Linker Message: ";
colon = line;
}
+ else if(SearchString(colon, 0, "warning:", false, false))
+ {
+ message = $"Linker Warning: ";
+ colon = line;
+ }
else
{
numErrors++;
if(resNode.files && resNode.files.count && !noResources)
resNode.GenMakefileAddResources(f, resNode.path, config);
f.Puts("else\n");
+ f.Puts("ifdef WINDOWS_HOST\n");
f.Puts("\t$(AR) rcs $(TARGET) @$(OBJ)objects.lst $(LIBS)\n");
+ f.Puts("else\n");
+ f.Puts("\t$(AR) rcs $(TARGET) $(OBJECTS) $(LIBS)\n");
+ f.Puts("endif\n");
f.Puts("endif\n");
f.Puts("ifdef SHARED_LIBRARY_TARGET\n");
f.Puts("ifdef LINUX_TARGET\n");