Hi everyone,
I am trying to get C::B running with a custom Makefile on both, Windows and Linux.
I created a simple project with just one cpp file and the following Makefile:
DEFINES =
LIBS = OGRE OIS
CXX = g++
CXXFLAGS = $(shell pkg-config --cflags $(LIBS)) $(DEFINES)
LD = g++
LDFLAGS = $(shell pkg-config --libs $(LIBS))
Release:
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o bin/Debug/ogreapp src/main.cpp
Debug:
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o bin/Release/ogreapp src/main.cpp
clean.Release:
rm -f bin/Release/ogreapp
clean.Debug:
rm -f bin/Debug/ogreapp
The interesting thing happens when compiling the project. On Linux the compiler gets called like this:
g++ -DOGRE_GUI_GLX -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/local/include -I/usr/local/include/OGRE -I/usr//include/OIS -I/usr//include -L/usr/local/lib -L/usr//lib -lOgreMain -lOIS -o bin/Debug/ogreapp src/main.cpp
On Windows the call looks a little different:
g++ -o bin/Release/ogreapp src/main.cpp
Okay, this is basically what one expect from the Makefile given (except that the libs are missing). However, I do like what he does on my Linux machine. But why does C::B does behave different on both platforms with the same setup? Not to mention the configuration flags for OGRE (where does he get them?), why does he know and add the include pathes for the OGRE headers on Linux? In fact, I do like this behaviour, since pathes are highly dependent on the user setup on Windows. Therefore I would like to not have them in the Makefile. But since I do not know, how C::B knows about them on Linux, I cannot reproduce that on Windows.
I kindly ask for any hint that could explain the different pointed out above. If you need extra information and will be more then happy to provide it, if possible.
Regards,
Oliver