Mercurial > mxe-octave
annotate src/hdf5.mk @ 3710:1220a9158bc1
make building 64-bit Windows binaries independent from enabling 64-bit indexing in Octave
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 07 Sep 2014 06:42:40 -0400 |
parents | c611a634efec |
children | cde7e614b3e2 |
rev | line source |
---|---|
2929
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
1 # This file is part of MXE. |
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
2 # See index.html for further information. |
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
3 |
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
4 PKG := hdf5 |
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
5 $(PKG)_IGNORE := |
3480
13be64f9f16d
move version info from index.html to src/*.mk files
John W. Eaton <jwe@octave.org>
parents:
3293
diff
changeset
|
6 $(PKG)_VERSION := 1.8.10 |
2929
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
7 $(PKG)_CHECKSUM := 867a91b75ee0bbd1f1b13aecd52e883be1507a2c |
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
8 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) |
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
9 $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 |
3706 | 10 $(PKG)_URL := http://www.hdfgroup.org/ftp/HDF5/releases/$(PKG)-$($(PKG)_VERSION)/src/$($(PKG)_FILE) |
3048
5ef49fb3299d
treat gcc and binutils as build tools
John W. Eaton <jwe@octave.org>
parents:
3013
diff
changeset
|
11 $(PKG)_DEPS := |
2997 | 12 ifeq ($(MXE_SYSTEM),mingw) |
13 ifneq ($(MXE_NATIVE_BUILD),yes) | |
14 $(PKG)_CROSS_CONFIG_OPTIONS := \ | |
15 --disable-largefile \ | |
16 LIBS=-lws2_32 \ | |
17 hdf5_cv_gettimeofday_tz=no \ | |
18 hdf5_cv_vsnprintf_works=yes \ | |
19 hdf5_cv_ldouble_to_integer_works=yes \ | |
20 hdf5_cv_ulong_to_float_accurate=yes \ | |
21 hdf5_cv_fp_to_ullong_accurate=yes \ | |
22 hdf5_cv_fp_to_ullong_right_maximum=no \ | |
23 hdf5_cv_ldouble_to_uint_accurate=yes \ | |
24 hdf5_cv_ullong_to_ldouble_precision=yes \ | |
25 hdf5_cv_fp_to_integer_overflow_works=yes \ | |
26 hdf5_cv_ldouble_to_long_special=no \ | |
27 hdf5_cv_long_to_ldouble_special=no \ | |
28 hdf5_cv_ldouble_to_llong_accurate=yes \ | |
29 hdf5_cv_llong_to_ldouble_correct=yes | |
3704
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
30 ifeq ($(TARGET),x86_64-w64-mingw32) |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
31 $(PKG)_CROSS_CONFIG_OPTIONS += \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
32 hdf5_cv_printf_ll=ll \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
33 hdf5_cv_system_scope_threads=no \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
34 hdf5_cv_ldouble_to_integer_accurate=yes \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
35 hdf5_cv_ulong_to_fp_bottom_bit_accurate=yes \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
36 ac_cv_sizeof_long=4 \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
37 ac_cv_sizeof_long_double=16 \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
38 ac_cv_sizeof_long_long=8 \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
39 ac_cv_sizeof_off_t=8 \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
40 ac_cv_sys_file_offset_bits=64 |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
41 else |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
42 $(PKG)_CROSS_CONFIG_OPTIONS += \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
43 hdf5_cv_printf_ll=l \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
44 hdf5_cv_system_scope_threads=yes \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
45 hdf5_cv_ulong_to_fp_bottom_bit_accurate=no |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
46 endif |
2997 | 47 endif |
48 endif | |
2929
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
49 |
3222
5072829ce458
hdf5.mk: set configure environment for native builds
John W. Eaton <jwe@octave.org>
parents:
3095
diff
changeset
|
50 ifeq ($(MXE_NATIVE_BUILD),yes) |
5072829ce458
hdf5.mk: set configure environment for native builds
John W. Eaton <jwe@octave.org>
parents:
3095
diff
changeset
|
51 $(PKG)_CONFIGURE_ENV := LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) |
5072829ce458
hdf5.mk: set configure environment for native builds
John W. Eaton <jwe@octave.org>
parents:
3095
diff
changeset
|
52 endif |
5072829ce458
hdf5.mk: set configure environment for native builds
John W. Eaton <jwe@octave.org>
parents:
3095
diff
changeset
|
53 |
2929
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
54 define $(PKG)_UPDATE |
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
55 echo 'Warning: Updates are temporarily disabled for package hdf5.' >&2; |
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
56 echo $(hdf5_VERSION) |
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
57 endef |
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
58 |
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
59 define $(PKG)_BUILD |
3704
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
60 case '$(TARGET)' in \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
61 x86_64-w64-mingw32) \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
62 cp '$(1)/src/H5Tinit.c.mingw64' '$(1)/src/H5Tinit.c.mingw' \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
63 ;; \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
64 i686-w64-mingw32) \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
65 cp '$(1)/src/H5Tinit.c.mingw32' '$(1)/src/H5Tinit.c.mingw' \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
66 ;; \ |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
67 esac |
6ac813175f6f
fix hdf5 builds for 64-bit Windows
John W. Eaton <jwe@octave.org>
parents:
3557
diff
changeset
|
68 |
2929
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
69 # build GCC and support libraries |
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
70 cd '$(1)' && autoreconf |
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
71 mkdir '$(1)/.build' |
3222
5072829ce458
hdf5.mk: set configure environment for native builds
John W. Eaton <jwe@octave.org>
parents:
3095
diff
changeset
|
72 cd '$(1)/.build' && $($(PKG)_CONFIGURE_ENV) '$(1)/configure' \ |
2997 | 73 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \ |
3013
bcc26ffe9a0f
use variable for --host and --build configure arguments
John W. Eaton <jwe@octave.org>
parents:
3012
diff
changeset
|
74 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ |
2929
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
75 $(ENABLE_SHARED_OR_STATIC) \ |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2997
diff
changeset
|
76 --prefix='$(HOST_PREFIX)' \ |
2929
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
77 --disable-direct-vfd \ |
3095
f2bbfa69647e
[MSVC] enable HDF5 compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
78 $($(PKG)_CROSS_CONFIG_OPTIONS) && $(CONFIGURE_POST_HOOK) |
2929
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
79 |
2997 | 80 case '$(MXE_SYSTEM)' in \ |
81 *mingw*) \ | |
82 echo "#define H5_HAVE_WIN32_API 1" >> $(1)/.build/src/H5pubconf.h; \ | |
83 echo "#define H5_HAVE_MINGW 1" >> $(1)/.build/src/H5pubconf.h; \ | |
84 echo "#define HAVE_WINDOWS_PATH 1" >> $(1)/.build/src/H5pubconf.h; \ | |
85 ;; \ | |
3095
f2bbfa69647e
[MSVC] enable HDF5 compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
86 *msvc*) \ |
f2bbfa69647e
[MSVC] enable HDF5 compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
87 sed -i -e 's/^\(#define H5_SIZEOF_SSIZE_T\) .*/\1 0/' \ |
f2bbfa69647e
[MSVC] enable HDF5 compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
88 '$(1)/.build/src/H5pubconf.h'; \ |
f2bbfa69647e
[MSVC] enable HDF5 compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
89 echo "#define H5_HAVE_WIN32_API 1" >> $(1)/.build/src/H5pubconf.h; \ |
f2bbfa69647e
[MSVC] enable HDF5 compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
90 echo "#define H5_HAVE_VISUAL_STUDIO 1" >> $(1)/.build/src/H5pubconf.h; \ |
f2bbfa69647e
[MSVC] enable HDF5 compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
91 echo "#define HAVE_WINDOWS_PATH 1" >> $(1)/.build/src/H5pubconf.h; \ |
f2bbfa69647e
[MSVC] enable HDF5 compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
92 ;; \ |
2997 | 93 esac |
2929
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
94 |
3557
b1a7cff2d2a9
Add octave forge of-netcdf package (and support files)
John Donoghue <john.donoghue@ieee.org>
parents:
3480
diff
changeset
|
95 # libtool is somehow created to effectively disallow shared builds |
b1a7cff2d2a9
Add octave forge of-netcdf package (and support files)
John Donoghue <john.donoghue@ieee.org>
parents:
3480
diff
changeset
|
96 $(SED) -i 's,allow_undefined_flag="unsupported",allow_undefined_flag="",g' '$(1)/.build/libtool' |
b1a7cff2d2a9
Add octave forge of-netcdf package (and support files)
John Donoghue <john.donoghue@ieee.org>
parents:
3480
diff
changeset
|
97 |
b1a7cff2d2a9
Add octave forge of-netcdf package (and support files)
John Donoghue <john.donoghue@ieee.org>
parents:
3480
diff
changeset
|
98 $(MAKE) -C '$(1)/.build' -j '$(JOBS)' |
b1a7cff2d2a9
Add octave forge of-netcdf package (and support files)
John Donoghue <john.donoghue@ieee.org>
parents:
3480
diff
changeset
|
99 $(MAKE) -C '$(1)/.build' -j 1 install DESTDIR='$(3)' |
2929
4b72e7cf4f30
shared libraries and cross build for hdf5
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
100 endef |