4 MINGW_W64_BUILD_DATE
=20120227
8 TARGET
=x86_64-w64-mingw32
9 PROGRAM_PREFIX
=$(TARGET
)-
10 PREFIX
=$(LOCAL_DIR
)/cross-tools-w64
13 all: mingw-w64-install.tag binutils-install.tag gcc-install.tag \
14 mingw-w64-clean binutils-clean gcc-clean
17 clean: mingw-w64-clean binutils-clean gcc-clean
24 download
/mingw-w64-
$(MINGW_W64_VERSION
)-bin_x86_64-linux_
$(MINGW_W64_BUILD_DATE
).
tar.bz2
:
25 ####download/mingw-w64-bin_x86_64-linux_$(MINGW_W64_BUILD_DATE).tar.bz2:
26 wget
-nv
-P download http
://sourceforge.net
/projects
/mingw-w64
/files
/Toolchains
%20targetting
%20Win64
/Automated
%20Builds
/mingw-w64-
$(MINGW_W64_VERSION
)-bin_x86_64-linux_
$(MINGW_W64_BUILD_DATE
).
tar.bz2
28 mingw-w64-install.tag
: download
/mingw-w64-
$(MINGW_W64_VERSION
)-bin_x86_64-linux_
$(MINGW_W64_BUILD_DATE
).
tar.bz2
29 #####mingw-w64-install.tag: download/mingw-w64-bin_x86_64-linux_$(MINGW_W64_BUILD_DATE).tar.bz2
30 mkdir
-p
$(LOCAL_DIR
)/cross-tools-w64
31 tar -C
$(LOCAL_DIR
)/cross-tools-w64
-xjvf download
/mingw-w64-
$(MINGW_W64_VERSION
)-bin_x86_64-linux_
$(MINGW_W64_BUILD_DATE
).
tar.bz2
32 test -L
$(LOCAL_DIR
)/cross-tools-w64
/x86_64-w64-mingw32
/include/boost
&& rm $(LOCAL_DIR
)/cross-tools-w64
/x86_64-w64-mingw32
/include/boost
; true
33 ln
-s
/usr
/include/boost
/ $(LOCAL_DIR
)/cross-tools-w64
/x86_64-w64-mingw32
/include
36 .PHONY
: mingw-w64-clean
38 rm -rf mingw-w64-
*.tag
41 download
/binutils-
$(BINUTILS_VERSION
).
tar.bz2
:
42 download
/binutils-
$(BINUTILS_VERSION
).
tar.gz
:
43 wget
-nv
-P download http
://ftp.gnu.org
/gnu
/binutils
/binutils-
$(BINUTILS_VERSION
).
tar.bz2
45 binutils-unpack.tag
: download
/binutils-
$(BINUTILS_VERSION
).
tar.bz2
46 binutils-unpack.tag
: download
/binutils-
$(BINUTILS_VERSION
).
tar.gz
47 tar -xjf download
/binutils-
$(BINUTILS_VERSION
).
tar.bz2
50 binutils-configure.tag
: binutils-unpack.tag
51 cd
$(shell find .
-maxdepth
1 -type d
-name
"binutil*") && \
52 .
/configure
--target
=$(TARGET
) --program-prefix
=$(PROGRAM_PREFIX
) --prefix=$(PREFIX
) \
53 --with-gcc
--with-gnu-as
--with-gnu-ld \
54 --disable-nls
--disable-shared
57 binutils-make.tag
: binutils-configure.tag
58 cd
$(shell find .
-maxdepth
1 -type d
-name
"binutil*") && \
62 binutils-install.tag
: binutils-make.tag
63 cd
$(shell find .
-maxdepth
1 -type d
-name
"binutil*") && \
65 find
$(PREFIX
)/bin
/ -type f
-exec sh
-c
"file {} | grep executable > /dev/null && strip {}" \
;
66 #strip $(PREFIX)/bin/*
69 .PHONY
: binutils-clean
71 rm -rf
$(shell find .
-maxdepth
1 -type d
-name
"binutil*")
75 download
/gcc-
$(GCC_VERSION
).
tar.bz2
:
76 wget
-nv
-P download ftp
://ftp.gnu.org
/gnu
/gcc
/gcc-
$(GCC_VERSION
)/gcc-
$(GCC_VERSION
).
tar.bz2
78 gcc-unpack.tag
: download
/gcc-
$(GCC_VERSION
).
tar.bz2
79 tar -xjf download
/gcc-
$(GCC_VERSION
).
tar.bz2
82 gcc-configure.tag
: gcc-unpack.tag
86 ..
/$(shell find .
-maxdepth
1 -type d
-name
"gcc*")/configure \
87 --target
=$(TARGET
) --program-prefix
=$(PROGRAM_PREFIX
) --prefix=$(PREFIX
) \
88 --with-gcc
--with-gnu-ld
--with-gnu-as \
89 --with-gmp
=$(LOCAL_DIR
) --with-mpfr
=$(LOCAL_DIR
) --with-mpc
=$(LOCAL_DIR
) \
90 --enable-threads
--disable-nls
--enable-languages
=c
,c
++ \
91 --disable-multilib
--enable-win32-registry
--disable-shared
94 gcc-make.tag
: gcc-configure.tag
96 PATH
=$(PATH
):$(PREFIX
)/bin \
100 gcc-install.tag
: gcc-make.tag
102 PATH
=$(PATH
):$(PREFIX
)/bin \
108 rm -rf
$(shell find .
-maxdepth
1 -type d
-name
"gcc*")