Bugfix: For Linux/OSX, remove GBC header when not needed
If a Linux/OSX user has deselected the custom color replacement,
then we need to remove the GBC code from the header.
@@ -104,6 +104,17 @@ const makeBuild = ({
fs.writeFile(`${buildRoot}/include/game.h`, result, 'utf8');
});
+ // Modify Linux / OSX makefile as needed
+ if (process.platform != "win32" && data.CustomColorsEnabled == false)
+ {
+ fs.readFile(`${buildRoot}/makefile`, 'utf8', function (err, filedata) {
+
+ const result = filedata.replace("-Wl-yp0x143=0x80", "");
+
+ fs.writeFile(`${buildRoot}/makefile`, result, 'utf8');
+ });
+ }
+
const makeBat = await buildMakeBat(buildRoot, data.CustomColorsEnabled, { CART_TYPE: env.CART_TYPE });
await fs.writeFile(`${buildRoot}/make.bat`, makeBat);
