-WINPTHREADS_SRCDIR := winpthreads$(WINPTHREADS_VERSION)
-SOURCE_TARGETS += $(WINPTHREADS_SRCDIR)
-$(WINPTHREADS_SRCDIR):
- wimapply --unix-data windeps.wim $(WINPTHREADS_SRCDIR) $(WINPTHREADS_SRCDIR)
- cp $(WINPTHREADS_SRCDIR)/COPYING COPYING.winpthreads
-MAKE_CLEAN_FILES += $(WINPTHREADS_SRCDIR) COPYING.winpthreads
-
-WINICONV_SRCDIR := win-iconv$(WINICONV_VERSION)
-SOURCE_TARGETS += $(WINICONV_SRCDIR)
-$(WINICONV_SRCDIR):
- wimapply --unix-data windeps.wim $(WINICONV_SRCDIR) $(WINICONV_SRCDIR)
+WINPTHREADS_DIST := mingw-w64-v$(WINPTHREADS_VERSION).tar.bz2
+WINPTHREADS_SRCDIR := winpthreads-$(WINPTHREADS_VERSION)
+SRCDIR_TARGETS += $(WINPTHREADS_SRCDIR)
+DIST_TARGETS += $(WINPTHREADS_DIST)
+$(WINPTHREADS_DIST):
+ wget $(WINPTHREADS_URL)
+$(WINPTHREADS_SRCDIR):$(WINPTHREADS_DIST) checksums_verified
+ tar xvf $<
+ cp -aT mingw-w64-v$(WINPTHREADS_VERSION)/mingw-w64-libraries/winpthreads $@
+ cp $@/COPYING COPYING.winpthreads
+MAKE_CLEAN_FILES += $(WINPTHREADS_SRCDIR) mingw-w64-v$(WINPTHREADS_VERSION) COPYING.winpthreads
+
+WINICONV_SRCDIR := win-iconv-$(WINICONV_VERSION)
+WINICONV_DIST := $(WINICONV_VERSION).tar.gz
+SRCDIR_TARGETS += $(WINICONV_SRCDIR)
+DIST_TARGETS += $(WINICONV_DIST)
+$(WINICONV_DIST):
+ wget $(WINICONV_URL)
+$(WINICONV_SRCDIR):$(WINICONV_DIST) checksums_verified
+ tar xvf $<