PR to split GNUmakefile and add Clang support

News and discussion of the PC port of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 374
Joined: Sun Jun 20, 2010 6:00 pm

PR to split GNUmakefile and add Clang support

Post by mcarans »

I've made a PR to add the Clang flag if compiler is Clang and split GNUmakefile into 3 files. It's a simple change that puts common flags and common files in flags.make and files.make and includes them in GNUmakefile. Anything OS specific is in GNUmakefile. I've also fixed the HOST_ARCH variable which was not set correctly (see viewtopic.php?t=21896).

I have tested with Clang on Linux and a standard gcc build on Windows using latest nightly development environment.

Please let me know what you think.

https://github.com/OoliteProject/oolite/pull/521
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6924
Joined: Wed Feb 28, 2007 7:54 am

Re: PR to split GNUmakefile and add Clang support

Post by another_commander »

I wanted to give this a test drive but was distracted with the HDR multi monitor stuff so it fell a bit behind. I will try to do it as soon as I get a chance. Provided that it does not change any of the existing functionality and Windows installers can still be built, I would be OK with it. Just need to find a chance to test properly.
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 374
Joined: Sun Jun 20, 2010 6:00 pm

Re: PR to split GNUmakefile and add Clang support

Post by mcarans »

another_commander wrote: Fri Jul 25, 2025 5:15 am
I wanted to give this a test drive but was distracted with the HDR multi monitor stuff so it fell a bit behind. I will try to do it as soon as I get a chance. Provided that it does not change any of the existing functionality and Windows installers can still be built, I would be OK with it. Just need to find a chance to test properly.
Great. Thanks for improving Oolite over the years.

Is anyone running Oolite 32 bit these days? If not, a great simplification to the build would be to drop 32 bit support thus removing the need for 32 and 64 bit versions of files and the corresponding usage of one or other in the makefiles by way of HOST_ARCH.
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 374
Joined: Sun Jun 20, 2010 6:00 pm

Re: PR to split GNUmakefile and add Clang support

Post by mcarans »

another_commander wrote: Fri Jul 25, 2025 5:15 am
I wanted to give this a test drive but was distracted with the HDR multi monitor stuff so it fell a bit behind. I will try to do it as soon as I get a chance. Provided that it does not change any of the existing functionality and Windows installers can still be built, I would be OK with it. Just need to find a chance to test properly.
I have removed 32 bit stuff in Makefile and GNUmakefile based on feedback from you and others here: viewtopic.php?t=21910. I tested building package, installing it and running on Linux and Windows. Both worked fine.

https://github.com/OoliteProject/oolite/pull/521
Post Reply