105 rm -rf build |
105 rm -rf build |
106 mkdir -p build |
106 mkdir -p build |
107 |
107 |
108 # native toolchain, pre-built |
108 # native toolchain, pre-built |
109 mingwdir=build/mingw |
109 mingwdir=build/mingw |
|
110 |
|
111 define get_mingw |
|
112 $(call get_src_sf,mingw/MinGW/Base/$(1),$(2)) tar -C $(mingwdir) --lzma -xf $$dld |
|
113 endef |
|
114 define get_msys |
|
115 $(call get_src_sf,mingw/MSYS/Base/$(1),$(2)) tar -C $(mingwdir) --lzma -xf $$dld |
|
116 endef |
110 mingw: |build |
117 mingw: |build |
111 rm -rf $(mingwdir) |
118 rm -rf $(mingwdir) |
112 mkdir -p $(mingwdir) |
119 mkdir -p $(mingwdir) |
113 # windows.h |
120 # windows.h |
114 $(call get_src_sf,mingw/MinGW/Base/w32api/w32api-3.17,w32api-3.17-2-mingw32-dev.tar.lzma)\ |
121 $(call get_mingw,w32api/w32api-3.17,w32api-3.17-2-mingw32-dev.tar.lzma) |
115 tar -C $(mingwdir) --lzma -xf $$dld |
|
116 # mingw runtime |
122 # mingw runtime |
117 $(call get_src_sf,mingw/MinGW/Base/mingwrt/mingwrt-3.20,mingwrt-3.20-mingw32-dll.tar.gz)\ |
123 $(call get_mingw,mingwrt/mingwrt-3.20,mingwrt-3.20-2-mingw32-dll.tar.lzma) |
118 tar -C $(mingwdir) -xzf $$dld |
|
119 # mingw headers and lib |
124 # mingw headers and lib |
120 $(call get_src_sf,mingw/MinGW/Base/mingwrt/mingwrt-3.20,mingwrt-3.20-mingw32-dev.tar.gz)\ |
125 $(call get_mingw,mingwrt/mingwrt-3.20,mingwrt-3.20-2-mingw32-dev.tar.lzma) |
121 tar -C $(mingwdir) -xzf $$dld |
|
122 # binutils |
126 # binutils |
123 $(call get_src_sf,mingw/MinGW/Base/binutils/binutils-2.21.53,binutils-2.21.53-1-mingw32-bin.tar.lzma)\ |
127 $(call get_mingw,binutils/binutils-2.21.53,binutils-2.21.53-1-mingw32-bin.tar.lzma) |
124 tar -C $(mingwdir) --lzma -xf $$dld |
|
125 # C compiler |
128 # C compiler |
126 $(call get_src_sf,mingw/MinGW/Base/gcc/Version4/gcc-4.6.1-2,gcc-core-4.6.1-2-mingw32-bin.tar.lzma)\ |
129 $(call get_mingw,gcc/Version4/gcc-4.6.1-2,gcc-core-4.6.1-2-mingw32-bin.tar.lzma) |
127 tar -C $(mingwdir) --lzma -xf $$dld |
|
128 # dependencies |
130 # dependencies |
129 $(call get_src_sf,mingw/MinGW/Base/gmp/gmp-5.0.1-1,libgmp-5.0.1-1-mingw32-dll-10.tar.lzma)\ |
131 $(call get_mingw,gmp/gmp-5.0.1-1,libgmp-5.0.1-1-mingw32-dll-10.tar.lzma) |
130 tar -C $(mingwdir) --lzma -xf $$dld |
132 $(call get_mingw,mpc/mpc-0.8.1-1,libmpc-0.8.1-1-mingw32-dll-2.tar.lzma) |
131 $(call get_src_sf,mingw/MinGW/Base/mpc/mpc-0.8.1-1,libmpc-0.8.1-1-mingw32-dll-2.tar.lzma)\ |
133 $(call get_mingw,mpfr/mpfr-2.4.1-1,libmpfr-2.4.1-1-mingw32-dll-1.tar.lzma) |
132 tar -C $(mingwdir) --lzma -xf $$dld |
134 $(call get_mingw,gettext/gettext-0.17-1,libintl-0.17-1-mingw32-dll-8.tar.lzma) |
133 $(call get_src_sf,mingw/MinGW/Base/mpfr/mpfr-2.4.1-1,libmpfr-2.4.1-1-mingw32-dll-1.tar.lzma)\ |
135 $(call get_mingw,gettext/gettext-0.17-1,libgettextpo-0.17-1-mingw32-dll-0.tar.lzma) |
134 tar -C $(mingwdir) --lzma -xf $$dld |
136 $(call get_mingw,libiconv/libiconv-1.13.1-1,libiconv-1.13.1-1-mingw32-dll-2.tar.lzma) |
135 $(call get_src_sf,mingw/MinGW/Base/gettext/gettext-0.17-1,libintl-0.17-1-mingw32-dll-8.tar.lzma)\ |
137 # make, bash, and dependencies |
136 tar -C $(mingwdir) --lzma -xf $$dld |
138 $(call get_msys,bash/bash-3.1.17-3,bash-3.1.17-3-msys-1.0.13-bin.tar.lzma) |
137 $(call get_src_sf,mingw/MinGW/Base/gettext/gettext-0.17-1,libgettextpo-0.17-1-mingw32-dll-0.tar.lzma)\ |
139 $(call get_msys,coreutils/coreutils-5.97-3,coreutils-5.97-3-msys-1.0.13-bin.tar.lzma) |
138 tar -C $(mingwdir) --lzma -xf $$dld |
140 $(call get_msys,libiconv/libiconv-1.13.1-2,libiconv-1.13.1-2-msys-1.0.13-bin.tar.lzma) |
139 $(call get_src_sf,mingw/MinGW/Base/libiconv/libiconv-1.13.1-1,libiconv-1.13.1-1-mingw32-dll-2.tar.lzma)\ |
141 $(call get_msys,libiconv/libiconv-1.13.1-2,libiconv-1.13.1-2-msys-1.0.13-dll-2.tar.lzma) |
140 tar -C $(mingwdir) --lzma -xf $$dld |
142 $(call get_msys,gettext/gettext-0.17-2,libintl-0.17-2-msys-dll-8.tar.lzma) |
141 |
143 $(call get_msys,regex/regex-1.20090805-2,libregex-1.20090805-2-msys-1.0.13-dll-1.tar.lzma) |
|
144 $(call get_msys,termcap/termcap-0.20050421_1-2,libtermcap-0.20050421_1-2-msys-1.0.13-dll-0.tar.lzma) |
|
145 $(call get_msys,make/make-3.81-3,make-3.81-3-msys-1.0.13-bin.tar.lzma) |
|
146 $(call get_msys,msys-core/msys-1.0.13-2,msysCORE-1.0.13-2-msys-1.0.13-bin.tar.lzma) |
|
147 $(call get_msys,termcap/termcap-0.20050421_1-2,libtermcap-0.20050421_1-2-msys-1.0.13-dll-0.tar.lzma) |
142 touch $@ |
148 touch $@ |
143 |
149 |
144 msiexec = WINEPREFIX=$(tmp) msiexec |
150 msiexec = WINEPREFIX=$(tmp) msiexec |
145 wine = WINEPREFIX=$(tmp) wine |
151 wine = WINEPREFIX=$(tmp) wine |
146 pydir = build/python |
152 pydir = build/python |