Ah I see. I added that to the script, and I ran a diff afterward, both with the generated libraries and the outputs given from using nm -s, but there was no difference. I'll keep it in there if it's different on other machines though.
I also added parallelization to the make commands, so it'll build everything a bit faster. I've been looking into running each dependency's build commands in parallel (1 job for glfw, 1 for libsndfile, etc.) but I'm not quite sure how to do that yet while preserving the output. I've attached the updated script, let me know what you think.
Should I keep the usage of the cmake toolchain files, or should I aim to get rid of them and make the build script itself the only file?
Finally for completeness, even though I know it's not necessary for building orx itself, I have this when building freetype:
Library configuration:
external zlib: yes (pkg-config)
bzip2: no
libpng: yes (libpng-config)
harfbuzz: no
Sorry for the delay, I completely missed your last post.
Regarding CMake, it's really up to you. Which way do you feel would be the most maintainable?
Regarding FreeType, I haven't compiled it in a very long time and I don't remember which deps I've used last time. I'm pretty sure libpng and harfbuzz wouldn't be needed for what we use it.
I'll try to check it over the week.
It's ok. I had quite a bit of a delay myself due to life stuff that happened/still is happening.
Well, having toolchain files is easier at the moment, although a single file for cross compiling would be ideal, just to minimize the number of files.
Life events are pretty much over now, and I'm slowly getting back into the swing of this.
I've updated the build script again, so that it works without the 2 additional scripts.
So far, orx builds for 32 and 64 bit versions of mingw when using an edited version of the generated windows codeblocks project. I'm currently trying to figure out a way to get premake4 to autogen gmake projects with the correct libraries and compiler options. I'm currently editing orx/code/build/premake4.lua for this, but I'm not all that familiar with modifying premake or writing lua scripts, so any help in that area would be appreciated.
I'm no expert in writing lua/premake files either however, if you could tell me what the final changes to the edited code::blocks project were, I could maybe help you figure out how to alter the premake files.
I managed to figure out how to get premake to work with it actually. The biggest problem was figuring out how to get a non standard compiler name to be generated in the compiler, since premake doesn't have very good cross compilation functionality yet, I handled it with a flag.
I've attached the updated scripts, there's the dependencies one, then one for orx and finally the modified premake lua. Also, just to note this for future reference so I don't forget once everything's said and done, malloc.c requires redefining __forceinline specifically for mingw-w64, the reason being that it's original definition uses extern, which doesn't work with static, but changing it at the source causes other problems where the compiler thinks functions are getting defined multiple times on the same line of the same file. Apparently, this is a known workaround, see here. It's a little weird, but it works.
Hi krypto42, sorry for the late reply, I recently came back from vacation and only picked up orx yesterday.
I'll have a look at what you posted over next weekend.
Comments
I also added parallelization to the make commands, so it'll build everything a bit faster. I've been looking into running each dependency's build commands in parallel (1 job for glfw, 1 for libsndfile, etc.) but I'm not quite sure how to do that yet while preserving the output. I've attached the updated script, let me know what you think.
Should I keep the usage of the cmake toolchain files, or should I aim to get rid of them and make the build script itself the only file?
Finally for completeness, even though I know it's not necessary for building orx itself, I have this when building freetype: However, building fails due to something wrong with linking libpng. In any case, which ones are necessary for building freetype? https://forum.orx-project.org/uploads/legacy/fbfiles/files/build_deps.zip
Regarding CMake, it's really up to you. Which way do you feel would be the most maintainable?
Regarding FreeType, I haven't compiled it in a very long time and I don't remember which deps I've used last time. I'm pretty sure libpng and harfbuzz wouldn't be needed for what we use it.
I'll try to check it over the week.
Well, having toolchain files is easier at the moment, although a single file for cross compiling would be ideal, just to minimize the number of files.
Good luck with your life events in any case!
Life events are pretty much over now, and I'm slowly getting back into the swing of this.
I've updated the build script again, so that it works without the 2 additional scripts.
So far, orx builds for 32 and 64 bit versions of mingw when using an edited version of the generated windows codeblocks project. I'm currently trying to figure out a way to get premake4 to autogen gmake projects with the correct libraries and compiler options. I'm currently editing orx/code/build/premake4.lua for this, but I'm not all that familiar with modifying premake or writing lua scripts, so any help in that area would be appreciated.
I'm no expert in writing lua/premake files either however, if you could tell me what the final changes to the edited code::blocks project were, I could maybe help you figure out how to alter the premake files.
I've attached the updated scripts, there's the dependencies one, then one for orx and finally the modified premake lua. Also, just to note this for future reference so I don't forget once everything's said and done, malloc.c requires redefining __forceinline specifically for mingw-w64, the reason being that it's original definition uses extern, which doesn't work with static, but changing it at the source causes other problems where the compiler thinks functions are getting defined multiple times on the same line of the same file. Apparently, this is a known workaround, see here. It's a little weird, but it works.
The problem I'm seeing now though is that if the build script is run multiple times and you save the results and run a diff, the files differ. I'm wondering if it has something to do with premake generating make files :huh: https://forum.orx-project.org/uploads/legacy/fbfiles/files/build_scripts.zip
I'll have a look at what you posted over next weekend.