f.Puts("\n");
f.Puts("# HARD CODED TARGET_PLATFORM-SPECIFIC OPTIONS\n");
- f.Printf("LDFLAGS +=$(if $(%s), -Wl,--no-undefined,)\n", PlatformToMakefileTargetVariable(tux));
+ f.Printf("LDFLAGS +=$(if $(%s), -Wl$(comma)--no-undefined,)\n", PlatformToMakefileTargetVariable(tux));
f.Puts("\n");
// JF's
f.Printf("\nFORCE_64_BIT := %s", compiler.supportsBitDepth ? "-m64" : "");
f.Printf("\nFORCE_32_BIT := %s", compiler.supportsBitDepth ? "-m32" : "");
f.Puts("\n");
+ f.Puts("\nOFLAGS += $(LDFLAGS)");
+ f.Puts("\n");
delete f;
+
+ result = true;
}
}
delete name;
f.Puts("# FLAGS\n\n");
f.Puts("ECFLAGS =\n");
- f.Puts("ifndef DEBIAN_PACKAGE\n" "CFLAGS =\n" "endif\n");
+ f.Puts("ifndef DEBIAN_PACKAGE\n" "CFLAGS =\n" "LDFLAGS =\n" "endif\n");
+ f.Puts("PRJ_CFLAGS =\n");
f.Puts("CECFLAGS =\n");
f.Puts("OFLAGS =\n");
- f.Puts("LDFLAGS =\n");
f.Puts("LIBS =\n");
f.Puts("\n");
cflagsVariations, nodeCFlagsMapping,
ecflagsVariations, nodeECFlagsMapping, null);
- GenMakePrintCustomFlags(f, "CFLAGS", false, cflagsVariations);
+ GenMakePrintCustomFlags(f, "PRJ_CFLAGS", false, cflagsVariations);
GenMakePrintCustomFlags(f, "ECFLAGS", true, ecflagsVariations);
if(platforms || (config && config.platforms))
if((projectPlatformOptions && projectPlatformOptions.options.linkerOptions && projectPlatformOptions.options.linkerOptions.count) ||
(configPlatformOptions && configPlatformOptions.options.linkerOptions && configPlatformOptions.options.linkerOptions.count))
{
- f.Puts("CFLAGS +=");
+ f.Puts("PRJ_CFLAGS +=");
// tocheck: does any of that -Wl stuff from linkerOptions have any business being in CFLAGS?
if(projectPlatformOptions && projectPlatformOptions.options.linkerOptions && projectPlatformOptions.options.linkerOptions.count)
{
// tocheck: does any of that -Wl stuff from linkerOptions have any business being in CFLAGS?
if(options && options.linkerOptions && options.linkerOptions.count)
{
- f.Puts("CFLAGS +=");
+ f.Puts("PRJ_CFLAGS +=");
f.Puts(" \\\n\t -Wl");
for(s : options.linkerOptions)
f.Printf(",%s", s);
if(options && options.libraryDirs)
OutputListOption(f, "L", options.libraryDirs, lineEach, true);
f.Puts("\n");
- f.Puts("OFLAGS += $(LDFLAGS)\n");
f.Puts("endif\n");
f.Puts("\n");
f.Puts("\n");
// Main Module (Linking) for ECERE C modules
f.Puts("$(OBJ)$(MODULE).main.c: $(OBJ)$(MODULE).main.ec\n");
- f.Puts("\t$(ECP) $(CECFLAGS) $(ECFLAGS) $(CFLAGS)"
+ f.Puts("\t$(ECP) $(CECFLAGS) $(ECFLAGS) $(CFLAGS) $(PRJ_CFLAGS)"
" -c $(OBJ)$(MODULE).main.ec -o $(OBJ)$(MODULE).main.sym -symbols $(OBJ)\n");
- f.Puts("\t$(ECC) $(CECFLAGS) $(ECFLAGS) $(CFLAGS) $(FVISIBILITY)"
+ f.Puts("\t$(ECC) $(CECFLAGS) $(ECFLAGS) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY)"
" -c $(OBJ)$(MODULE).main.ec -o $(OBJ)$(MODULE).main.c -symbols $(OBJ)\n");
f.Puts("\n");
}
f.Puts("distclean:\n");
f.Puts("\t$(call rmrq,obj/)\n");
- f.Puts("\n");
delete f;
}
#endif
- f.Printf("\t$(CC) $(CFLAGS) $(FVISIBILITY) -c $(OBJ)$(MODULE).main.%s -o $(OBJ)$(MODULE).main$(O)\n", extension);
+ f.Printf("\t$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c $(OBJ)$(MODULE).main.%s -o $(OBJ)$(MODULE).main$(O)\n", extension);
f.Puts("\n");
}