Windows (MinGW) Make System: Core oF is always recompiled

I’m trying to modify the existing oF make system so that it builds on windows using the MinGW version that comes bundled with Code::Blocks 12.11 + MSYS (1.0.17).

My modifications are on this win-fix branch (and brief explanations of the changes are in this pull request). It’s almost there - builds fine and uses multiple processes to do so - but it always recompiles core oF every time I call make.

I’m still a bit new when it comes to make, so maybe someone could point me in the right direction here. I’m logging the debug information from the make command and trying to slog through the resulting mess. The debugging information is correctly identifying that .h files are older than .o files. The only thing that seems out of place is:

Prerequisite `../../../libs/glew/include/GL\glew.h' of target ... does not exist

It’s the only prerequisite that mixes backslashes and forward slashes, so this is my best guess as to what’s causing the oF core rebuild. But as far as I understand things, the include statement, -I../../../libs/glew/include/GL, lets make know where to look for headers, and then it’s pattern rules take over searching for headers. So did an inappropriate rule get applied…?

1 Like

@arturo do you have any ideas on this one? I’m a bit stumped as well.

1 Like

have you tried changing ofConstants.h line 106-107 from

    #include "GL\glew.h"
    #include "GL\wglew.h"


    #include "GL/glew.h"
    #include "GL/wglew.h"

Doh! What an easy fix, thanks! Build now only builds the files that were changed :slight_smile:

In terms of submitting this as a PR to the openFrameworks repo eventually, I assume the switch to forward slash is acceptable? This stackoverflow suggests that forward slash is the way to go for include directives since backslash is only conditionally supported by compilers.

1 Like

sure, i also think it’s more correct to use / anyway for include paths