5 W32API_DIR_VERSION
=3.17
6 W32API_VERSION
=$(W32API_DIR_VERSION
)-2
9 TARGET
=i586-mingw32msvc
10 PROGRAM_PREFIX
=i586-mingw32msvc-
11 PREFIX
=$(LOCAL_DIR
)/cross-tools
14 all: binutils-install.tag binutils-clean \
15 mingw-runtime-install.tag \
17 gcc-install.tag gcc-clean
20 clean: binutils-clean mingw-runtime-clean w32api-clean gcc-clean
21 rm -rf download
/* *.tag
24 real-clean
: binutils-realclean mingw-runtime-realclean w32api-realclean gcc-realclean
28 download
/binutils-
$(BINUTILS_VERSION
).
tar.bz2
:
29 wget
-nv
-P download http
://ftp.gnu.org
/gnu
/binutils
/binutils-
$(BINUTILS_VERSION
).
tar.bz2
31 binutils-unpack.tag
: download
/binutils-
$(BINUTILS_VERSION
).
tar.bz2
32 tar -xjf download
/binutils-
$(BINUTILS_VERSION
).
tar.bz2
35 binutils-configure.tag
: binutils-unpack.tag
36 cd
$(shell find .
-maxdepth
1 -type d
-name
"binutil*") && \
37 .
/configure
--target
=$(TARGET
) --program-prefix
=$(PROGRAM_PREFIX
) --prefix=$(PREFIX
) \
38 --with-gcc
--with-gnu-as
--with-gnu-ld \
39 --disable-nls
--disable-shared
42 binutils-make.tag
: binutils-configure.tag
43 cd
$(shell find .
-maxdepth
1 -type d
-name
"binutil*") && \
47 binutils-install.tag
: binutils-make.tag
48 cd
$(shell find .
-maxdepth
1 -type d
-name
"binutil*") && \
50 find
$(PREFIX
)/bin
/ -type f
-exec sh
-c
"file {} | grep executable > /dev/null && strip {}" \
;
51 #strip $(PREFIX)/bin/*
55 .PHONY
: binutils-clean
57 rm -rf
$(shell find .
-maxdepth
1 -type d
-name
"binutil*")
59 .PHONY
: binutils-realclean
60 binutils-realclean
: binutils-clean
64 download
/mingwrt-
$(MINGWRT_VERSION
)-mingw32-dev.
tar.gz
:
65 wget
-nv
-P download http
://sourceforge.net
/projects
/mingw
/files
/MinGW
/Base
/mingwrt
/mingwrt-
$(MINGWRT_VERSION
)/mingwrt-
$(MINGWRT_VERSION
)-mingw32-dev.
tar.gz
67 mingw-runtime-install.tag
: download
/mingwrt-
$(MINGWRT_VERSION
)-mingw32-dev.
tar.gz
68 mkdir
-p
$(PREFIX
)/$(TARGET
)/include
69 mkdir
-p
$(PREFIX
)/$(TARGET
)/lib
70 tar -C
$(PREFIX
)/$(TARGET
) -xzf download
/mingwrt-
$(MINGWRT_VERSION
)-mingw32-dev.
tar.gz
73 .PHONY
: mingw-runtime-clean
75 rm -f mingw-runtime-install.tag
77 .PHONY
: mingw-runtime-realclean
78 mingw-runtime-realclean
: mingw-runtime-clean
79 rm -f mingw-runtime-download.tag
81 download
/w32api-
$(W32API_VERSION
)-mingw32-dev.
tar.lzma
:
82 wget
-nv
-P download http
://sourceforge.net
/projects
/mingw
/files
/MinGW
/Base
/w32api
/w32api-
$(W32API_DIR_VERSION
)/w32api-
$(W32API_VERSION
)-mingw32-dev.
tar.lzma
84 w32api-install.tag
: download
/w32api-
$(W32API_VERSION
)-mingw32-dev.
tar.lzma
85 mkdir
-p
$(PREFIX
)/$(TARGET
)/include
86 mkdir
-p
$(PREFIX
)/$(TARGET
)/lib
87 tar -C
$(PREFIX
)/$(TARGET
) --lzma
-xf download
/w32api-
$(W32API_VERSION
)-mingw32-dev.
tar.lzma
92 rm -f w32api-install.tag
94 .PHONY
: w32api-realclean
95 w32api-realclean
: w32api-clean
96 rm -f w32api-download.tag
98 download
/gcc-
$(GCC_VERSION
).
tar.bz2
:
99 wget
-nv
-P download ftp
://ftp.gnu.org
/gnu
/gcc
/gcc-
$(GCC_VERSION
)/gcc-
$(GCC_VERSION
).
tar.bz2
101 gcc-unpack.tag
: download
/gcc-
$(GCC_VERSION
).
tar.bz2
102 tar -xjf download
/gcc-
$(GCC_VERSION
).
tar.bz2
105 gcc-configure.tag
: gcc-unpack.tag
109 ..
/gcc-
$(GCC_VERSION
)/configure \
110 --target
=$(TARGET
) --program-prefix
=$(PROGRAM_PREFIX
) --prefix=$(PREFIX
) \
111 --enable-languages
=c
,c
++ \
112 --with-gcc
--with-gnu-ld
--with-gnu-as \
113 --with-gmp
=$(LOCAL_DIR
) --with-mpfr
=$(LOCAL_DIR
) --with-mpc
=$(LOCAL_DIR
) \
114 --enable-threads
--disable-nls \
115 --disable-multilib
--enable-win32-registry
--disable-shared
118 gcc-make.tag
: gcc-configure.tag
120 PATH
=$(PATH
):$(PREFIX
)/bin \
124 gcc-install.tag
: gcc-make.tag
126 PATH
=$(PATH
):$(PREFIX
)/bin \
132 rm -rf
$(shell find .
-maxdepth
1 -type d
-name
"gcc*")
134 rm -f gcc-unpack.tag gcc-configure.tag gcc-make.tag
136 .PHONY
: gcc-realclean