Skip to content
Snippets Groups Projects
Commit 524746d1 authored by Oliver Bock's avatar Oliver Bock
Browse files

Added GCC 4.4 support for MinGW build (using Debian Squeeze as host)

parent 8ad2fe81
Branches
No related tags found
No related merge requests found
......@@ -503,7 +503,7 @@ set_mingw()
{
# general config
PREFIX=$ROOT/install
TARGET_HOST=i586-mingw32msvc
export TARGET_HOST=i586-mingw32msvc
BUILD_HOST=i386-linux
PATH_MINGW="$PREFIX/bin:$PREFIX/$TARGET_HOST/bin:$PATH"
PATH="$PATH_MINGW"
......@@ -690,7 +690,7 @@ build_boinc_mingw()
cp $ROOT/3rdparty/boinc/lib/parse.h $ROOT/install/include/boinc >> $LOGFILE 2>&1 || failure
cp $ROOT/3rdparty/boinc/lib/util.h $ROOT/install/include/boinc >> $LOGFILE 2>&1 || failure
# invoke MinGW's (Debian Squeeze) ranlib as the archive lacks an index
/usr/i586-mingw32msvc/bin/ranlib $ROOT/install/lib/libboinc.a
${TARGET_HOST}-ranlib $ROOT/install/lib/libboinc.a
echo "Successfully built and installed BOINC!" | tee -a $LOGFILE
store_build_state $BS_BUILD_BOINC_MINGW || failure
......@@ -714,7 +714,20 @@ build_starsphere()
export ORC_INSTALL=$ROOT/install || failure
cd $ROOT/build/orc || failure
cp $ROOT/src/orc/Makefile . >> $LOGFILE 2>&1 || failure
if [ "$1" == "$TARGET_WIN32" ]; then
# backup MinGW compiler settings
CC_MINGW=$CC
CXX_MINGW=$CXX
# set the native compilers (ORC will be run on host, not on target)
export CC=`which gcc`
export CXX=`which g++`
fi
make $2 >> $LOGFILE 2>&1 || failure
if [ "$1" == "$TARGET_WIN32" ]; then
# restore MinGW compiler settings
export CC=$CC_MINGW
export CXX=$CXX_MINGW
fi
make install >> $LOGFILE 2>&1 || failure
echo "Successfully built and installed Starsphere [ORC]!" | tee -a $LOGFILE
......
......@@ -24,6 +24,7 @@ FRAMEWORK_INSTALL?=$(PWD)
# config values
CXX?=g++
TARGET_HOST?=i586-pc-mingw32
# variables
CPPFLAGS += $(shell $(FRAMEWORK_INSTALL)/bin/sdl-config --cflags)
......@@ -52,6 +53,7 @@ release: CPPFLAGS += -DNDEBUG -gstabs3 -O3 -Wall -Wno-switch-enum
# file based targets
libframework.a: $(OBJS)
ar rcs libframework.a $(OBJS)
$(TARGET_HOST)-ranlib libframework.a
AbstractGraphicsEngine.o: $(DEPS) $(FRAMEWORK_SRC)/AbstractGraphicsEngine.cpp $(FRAMEWORK_SRC)/AbstractGraphicsEngine.h
$(CXX) -g ${CPPFLAGS} -c $(FRAMEWORK_SRC)/AbstractGraphicsEngine.cpp
......
......@@ -24,6 +24,7 @@ STARSPHERE_INSTALL?=$(PWD)
# config values
CXX ?= g++
TARGET_HOST ?= i586-pc-mingw32
# variables
LIBS += -Wl,-Bstatic
......@@ -106,7 +107,7 @@ $(RESOURCESPEC).o: $(STARSPHERE_SRC)/$(RESOURCESPEC).orc
$(RESOURCESPEC)_mingw.o: $(STARSPHERE_SRC)/$(RESOURCESPEC).rc
cp $(STARSPHERE_SRC)/*.ico .
$(STARSPHERE_INSTALL)/bin/i586-pc-mingw32-windres -O coff -o $(RESOURCESPEC)_mingw.o $(STARSPHERE_SRC)/$(RESOURCESPEC).rc
$(TARGET_HOST)-windres -O coff -o $(RESOURCESPEC)_mingw.o $(STARSPHERE_SRC)/$(RESOURCESPEC).rc
# tools
install:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment