]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
Fix QT compilation for Windows/MinGW and update the compilation instructions accordingly.
authorizsh@fail0verflow.com <izsh@fail0verflow.com@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Wed, 24 Feb 2010 19:33:29 +0000 (19:33 +0000)
committerizsh@fail0verflow.com <izsh@fail0verflow.com@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Wed, 24 Feb 2010 19:33:29 +0000 (19:33 +0000)
COMPILING
client/Makefile

index 118305fa1e16b20adf47d5996cf53e24ad31be4b..21782e2fc1e142d81cd9a332721460b53203bee5 100644 (file)
--- a/COMPILING
+++ b/COMPILING
@@ -53,6 +53,13 @@ export DEVKITARM=/c/devkitPro/devkitARM
 
 6 - Install Strawberry Perl [6]
 
+7 - Setup a few variables
+
+In your shell from MSYS, make sure you set QTDIR to your QT installation:
+export QTDIR=/c/QT/qt
+And add its bin to your path as well:
+export PATH=$PATH:$QTDIR/bin
+
 Download links:
 
 [1] http://qt.nokia.com/downloads/sdk-windows-cpp
index 4eae4bc70295668e0134d98da4c43ab08ed97d10..b6d40c57c074738362cf5fde712147aea4520470 100644 (file)
@@ -14,19 +14,26 @@ LDLIBS = -L/opt/local/lib -L/usr/local/lib -lusb -lreadline -lpthread
 LDFLAGS = $(COMMON_FLAGS)
 CFLAGS = -std=gnu99 -I. -I../include -I../common -I/opt/local/include -Wall -Wno-unused-function $(COMMON_FLAGS) -g -O3
 
-CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall -O3
-QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null)
+platform = $(shell uname)
 
-ifeq ($(shell uname),Darwin)
-CXXFLAGS = -I/Library/Frameworks/QtGui.framework/Versions/Current/Headers -I/Library/Frameworks/QtCore.framework/Versions/Current/Headers
-QTLDLIBS = -framework QtGui -framework QtCore
+ifneq (,$(findstring MINGW,$(platform)))
+CXXFLAGS = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui
+QTLDLIBS = -L$(QTDIR)/lib -lQtCore4 -lQtGui4
 MOC = moc
+else ifeq ($(platform),Darwin)
+CXXFLAGS = -I/Library/Frameworks/QtGui.framework/Version/Current/Headers -I/Library/Frameworks/QtCore.framework/Versions/Current/Headers
+QTLDLIBS = -framework QtGui -framework QtCore
+MOC = moc 
+else
+CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall -O3
+QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null)
+MOC = $(shell pkg-config --variable=moc_location QtCore)
 endif
 
+
 ifneq ($(QTLDLIBS),)
 QTGUI = $(OBJDIR)/proxgui.o $(OBJDIR)/proxguiqt.o $(OBJDIR)/proxguiqt.moc.o
 CFLAGS += -DHAVE_GUI
-MOC ?= $(shell pkg-config --variable=moc_location QtCore)
 LINK.o = $(LINK.cpp)
 else
 QTGUI = guidummy.o
Impressum, Datenschutz