Index: /applications/editors/josm/plugins/wmsplugin/Makefile
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/Makefile	(revision 20044)
+++ /applications/editors/josm/plugins/wmsplugin/Makefile	(revision 20045)
@@ -1,12 +1,27 @@
 #!/usr/bin/make
 
-MOC=moc
-#MOC=/usr/share/qt4/bin/moc
-CFLAGS =
-LDFLAGS =
-LDLIBS = `pkg-config --libs --cflags QtCore QtGui QtWebKit`
+ifneq ($(windir),)
+MINGWPATH = C:\\PROGRA~1\\mingw\\bin\\
+QTPATH    = C:\\PROGRA~1\\qt\\
+
+CPP       = ${MINGWPATH}c++.exe
+MOC       = ${QTPATH}bin\\moc.exe
+RM        = del
+CFLAGS    = -W -O2 -I${QTPATH}include
+LDFLAGS   = -L${QTPATH}lib
+LDLIBS    = -lQtCore4 -lQtWebKit4 -lQtGui4 -lQtNetwork4
+else
+MOC       = moc
+#MOC       = /usr/share/qt4/bin/moc
+CPP       = gcc
+
+PACKAGES  = QtCore QtGui QtWebKit QtNetwork
+CFLAGS    = -W -O2 `pkg-config --cflags ${PACKAGES}`
+LDFLAGS   = `pkg-config --libs-only-L ${PACKAGES}`
+LDLIBS    = `pkg-config --libs-only-l ${PACKAGES}`
+endif
 
 webkit-image: webkit-image.cpp webkit-image.h
-	g++ -W -o $@ -O2 $(CFLAGS) $(LDFLAGS) webkit-image.cpp $(LDLIBS)
+	$(CPP) -o $@ $(CFLAGS) $(LDFLAGS) webkit-image.cpp $(LDLIBS)
 
 webkit-image.h: webkit-image.cpp
@@ -14,3 +29,3 @@
 
 clean:
-	rm -f *.o webkit-image webkit-image.h
+	${RM} *.o webkit-image webkit-image.h
Index: /applications/editors/josm/plugins/wmsplugin/webkit-image.cpp
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/webkit-image.cpp	(revision 20044)
+++ /applications/editors/josm/plugins/wmsplugin/webkit-image.cpp	(revision 20045)
@@ -1,10 +1,2 @@
-/* compile with
-moc webkit-image.cpp >webkit-image.h
-g++ webkit-image.cpp -o webkit-image -lQtCore -lQtWebKit -lQtGui -s -O2
-or under Windows:
-g++ webkit-image.cpp -o webkit-image -lQtCore4 -lQtWebKit4 -lQtGui4 -s O2
-adding the correct directories with -L or -I:
--I C:\Progra~1\Qt\include -L C:\Progra~1\Qt\lib
-*/
 #include <QtGui/QApplication>
 #include <QtGui/QPainter>
@@ -17,6 +9,6 @@
 #include <QtCore/QProcess>
 #if QT_VERSION >= 0x040500
-#include <QDesktopServices>
-#include <QNetworkDiskCache>
+#include <QtGui/QDesktopServices>
+#include <QtNetwork/QNetworkDiskCache>
 #endif
 
