equal
deleted
inserted
replaced
39 HGPULL = 0 |
39 HGPULL = 0 |
40 DIST = |
40 DIST = |
41 CPUS = 8 |
41 CPUS = 8 |
42 BLKDEV=/dev/null |
42 BLKDEV=/dev/null |
43 |
43 |
|
44 |
|
45 CROSS_COMPILE=i686-w64-mingw32 |
|
46 CROSS_COMPILE_LIBS_DIR=/usr/lib/gcc/$(CROSS_COMPILE)/6.1-win32 |
|
47 CC=$(CROSS_COMPILE)-gcc |
|
48 CXX=$(CROSS_COMPILE)-g++ |
|
49 |
|
50 define get_runtime_libs |
|
51 cp $(CROSS_COMPILE_LIBS_DIR)/libgcc_s_sjlj-1.dll $(1) |
|
52 cp $(CROSS_COMPILE_LIBS_DIR)/libstdc++-6.dll $(1) |
|
53 endef |
|
54 |
44 src := $(shell dirname $(lastword $(MAKEFILE_LIST))) |
55 src := $(shell dirname $(lastword $(MAKEFILE_LIST))) |
45 distfiles = $(src)/distfiles |
56 distfiles = $(src)/distfiles |
46 sfmirror = downloads |
57 sfmirror = downloads |
47 tmp := $(shell mktemp -d) |
58 tmp := $(shell mktemp -d) |
48 |
59 |
214 matiecdir = build/matiec |
225 matiecdir = build/matiec |
215 matiec: |build |
226 matiec: |build |
216 $(call get_src_hg,$(tmp)/matiec) |
227 $(call get_src_hg,$(tmp)/matiec) |
217 cd $(tmp)/matiec ;\ |
228 cd $(tmp)/matiec ;\ |
218 autoreconf;\ |
229 autoreconf;\ |
219 ./configure --host=i586-mingw32msvc;\ |
230 automake --add-missing;\ |
|
231 ./configure --host=$(CROSS_COMPILE);\ |
220 make -j$(CPUS); |
232 make -j$(CPUS); |
221 rm -rf $(matiecdir) |
233 rm -rf $(matiecdir) |
222 mkdir -p $(matiecdir) |
234 mkdir -p $(matiecdir) |
223 mv $(tmp)/matiec/*.exe $(matiecdir) |
235 mv $(tmp)/matiec/*.exe $(matiecdir) |
|
236 |
|
237 # install necessary shared libraries from local cross-compiler |
|
238 $(call get_runtime_libs,$(matiecdir)) |
|
239 |
224 mv $(tmp)/matiec/lib $(matiecdir) |
240 mv $(tmp)/matiec/lib $(matiecdir) |
225 touch $@ |
241 touch $@ |
226 |
242 |
227 examples: |build |
243 examples: |build |
228 rm -rf examples |
244 rm -rf examples |
252 canfestival: mingw |
268 canfestival: mingw |
253 rm -rf $(CFbuild) |
269 rm -rf $(CFbuild) |
254 $(call get_src_hg,$(CFbuild)) |
270 $(call get_src_hg,$(CFbuild)) |
255 cd $(CFbuild); \ |
271 cd $(CFbuild); \ |
256 ./configure --can=tcp_win32 \ |
272 ./configure --can=tcp_win32 \ |
257 --cc=i586-mingw32msvc-gcc \ |
273 --cc=$(CC) \ |
258 --cxx=i586-mingw32msvc-g++ \ |
274 --cxx=$(CXX) \ |
259 --target=win32 \ |
275 --target=win32 \ |
260 --wx=0 |
276 --wx=0 |
261 $(MAKE) -C $(CFbuild) |
277 $(MAKE) -C $(CFbuild) |
262 cd $(CFbuild); find . -name "*.o" -exec rm {} ';' #remove object files only |
278 cd $(CFbuild); find . -name "*.o" -exec rm {} ';' #remove object files only |
263 touch $@ |
279 touch $@ |