summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-02-28 20:03:06 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-02-28 20:03:06 +0000
commitd73a6d4257cf2c28b4e38a540a79f978f27094b5 (patch)
tree3fa1d145777e98571891c9d3e8b6c77ff968beeb
parentd26c1c706f1f386ef7813a0499ea3eda3ec43e10 (diff)
[FIX] Cross compilation added (linux -> windows through mingw-cross)
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@89 6ecfd1a5-f3ed-3746-8530-beee90d26b22
-rw-r--r--Changelog7
-rwxr-xr-xcross-mingw32-pokegen.sh8
-rw-r--r--general/general.pro12
-rwxr-xr-xpokegen.pro2
-rw-r--r--pokemod/pokemod.pro23
-rw-r--r--pokemodr/pokemodr.pro26
6 files changed, 54 insertions, 24 deletions
diff --git a/Changelog b/Changelog
index 1c64e43c..3e36cd1d 100644
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,11 @@
-----------------
+Rev: 89
+Date: 28 February 2008
+User: MathStuf
+-----------------
+[FIX] Cross compilation added (linux -> windows through mingw-cross)
+
+-----------------
Rev: 88
Date: 27 February 2008
User: MathStuf
diff --git a/cross-mingw32-pokegen.sh b/cross-mingw32-pokegen.sh
new file mode 100755
index 00000000..baa5bae4
--- /dev/null
+++ b/cross-mingw32-pokegen.sh
@@ -0,0 +1,8 @@
+# This script sets up variables for cross-compilation of KDE 4 programs to MinGW.
+# It assumes a KDE 4+ development environment installation.
+export CC=i386-mingw32-gcc
+export CXX=i386-mingw32-g++
+export RC=i386-mingw32-windres
+export KDEPREFIX=~/.wine/c/kde4
+export PKG_CONFIG_PATH=/usr/local/i386-mingw32/lib/pkgconfig:$KDEPREFIX/lib/pkgconfig:/target/lib/pkgconfig
+export QMAKESPEC=win32-cross-g++
diff --git a/general/general.pro b/general/general.pro
index 5f862387..f00679b1 100644
--- a/general/general.pro
+++ b/general/general.pro
@@ -1,7 +1,11 @@
OBJECTS_DIR = .obj
-DESTDIR = ../../lib
MOC_DIR = .moc
TEMPLATE = lib
+win32 {
+ DESTDIR = ../../bin
+}else {
+ DESTDIR = ../../lib
+}
LIBS += -lphonon -lkdeui -lkdecore
# Following is reformatted from the KTIGCC .pro file
@@ -44,8 +48,8 @@ win32 {
}
}
-CONFIG += qt warn_on dll exceptions \
- debug
+CONFIG += qt warn_on dll exceptions debug
+CONFIG -= release
SOURCES += Audio.cpp \
BugCatcher.cpp \
@@ -64,5 +68,3 @@ HEADERS += Audio.h \
Ini.h \
Matrix.h \
Point.h
-CONFIG -= release
-
diff --git a/pokegen.pro b/pokegen.pro
index cf8d8794..461c6320 100755
--- a/pokegen.pro
+++ b/pokegen.pro
@@ -1,6 +1,6 @@
VERSION = 0.0.1
TEMPLATE = subdirs
-CONFIG += ordered qt warn_on
+CONFIG += ordered qt warn_on debug
distsrc.target = distsrc
distsrc.commands = "tar -c . | bzip2 --best -c > ../releases/pokegen-$${VERSION}.tar.bz2"
diff --git a/pokemod/pokemod.pro b/pokemod/pokemod.pro
index 2dc1e897..7c291e8b 100644
--- a/pokemod/pokemod.pro
+++ b/pokemod/pokemod.pro
@@ -1,14 +1,23 @@
-OBJECTS_DIR = .obj
-DESTDIR = ../../lib
TEMPLATE = lib
-LIBS += -L../../lib -lgeneral
+OBJECTS_DIR = .obj
+win32 {
+ DESTDIR = ../../bin
+ LIBS += -L$${DESTDIR} -lgeneral
+}else {
+ DESTDIR = ../../lib
+ LIBS += -L$${DESTDIR} -lgeneral
+}
-CONFIG += qt warn_on dll exceptions \
- debug
+CONFIG += qt warn_on dll exceptions debug
+CONFIG -= release
INCLUDEPATH += ../general
-TARGETDEPS += ../../lib/libgeneral.so
+win32 {
+ TARGETDEPS += $${DESTDIR}/general.dll
+}else {
+ TARGETDEPS += $${DESTDIR}/libgeneral.so
+}
SOURCES += Ability.cpp \
AbilityEffect.cpp \
@@ -76,5 +85,3 @@ HEADERS += AbilityEffect.h \
Tile.h \
Time.h \
Type.h
-CONFIG -= release
-
diff --git a/pokemodr/pokemodr.pro b/pokemodr/pokemodr.pro
index 6fd87f9b..e2fbb228 100644
--- a/pokemodr/pokemodr.pro
+++ b/pokemodr/pokemodr.pro
@@ -1,9 +1,14 @@
OBJECTS_DIR = .obj
-DESTDIR = ../../bin
UI_DIR = .ui
MOC_DIR = .moc
TEMPLATE = app
-LIBS += -lkdecore -lkdeui -lkio -L../../lib -lgeneral -lpokemod
+DESTDIR = ../../bin
+win32 {
+ LIBDIR = ../../bin
+}else {
+ LIBDIR = ../../lib
+}
+LIBS += -lkdecore -lkdeui -lkio -L$${LIBDIR} -lgeneral -lpokemod
# Following is reformatted from the KTIGCC .pro file
win32 {
@@ -45,10 +50,16 @@ win32 {
}
}
-CONFIG += qt gui warn_on exceptions \
- debug
+CONFIG += qt gui warn_on exceptions debug
+CONFIG -= release
+
+RESOURCES += images/overlays.qrc
-TARGETDEPS += ../../lib/libpokemod.so ../../lib/libgeneral.so
+win32 {
+ TARGETDEPS += $${LIBDIR}/pokemod.dll $${LIBDIR}/general.dll
+}else {
+ TARGETDEPS += $${LIBDIR}/libpokemod.so $${LIBDIR}/libgeneral.so
+}
INCLUDEPATH += ../pokemod ../general
@@ -153,8 +164,3 @@ FORMS += gui/ability.ui \
gui/tile.ui \
gui/time.ui \
gui/type.ui
-
-RESOURCES += images/overlays.qrc
-
-CONFIG -= release
-