diff options
author | Tony Theodore <tonyt@logyst.com> | 2014-02-26 17:02:48 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2014-02-26 17:02:48 (GMT) |
commit | 6cdb1fce4ce06572f875d65083729110918045de (patch) | |
tree | f9a4354cfabdf5dbaf62e360c7ef09b5fbe11a8a /src/hdf5.mk | |
parent | aa9aa4813f7076d6889421f876d10dc0d67383a6 (diff) | |
download | mxe-6cdb1fce4ce06572f875d65083729110918045de.zip mxe-6cdb1fce4ce06572f875d65083729110918045de.tar.gz mxe-6cdb1fce4ce06572f875d65083729110918045de.tar.bz2 |
package hdf5: enable shared builds and detection of pthreads and zlib
Diffstat (limited to 'src/hdf5.mk')
-rw-r--r-- | src/hdf5.mk | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/hdf5.mk b/src/hdf5.mk index c72d291..ea765b9 100644 --- a/src/hdf5.mk +++ b/src/hdf5.mk @@ -20,15 +20,21 @@ endef define $(PKG)_BUILD # automake 1.13 needs this directory to exist [ -d '$(1)/m4' ] || mkdir '$(1)/m4' - cd '$(1)' && autoreconf --force --install && ./configure \ - --host='$(TARGET)' \ - --build="`config.guess`" \ - --disable-shared \ + cd '$(1)' && autoreconf --force --install + cd '$(1)' && ./configure \ + $(MXE_CONFIGURE_OPTS) \ --enable-cxx \ --disable-direct-vfd \ - --prefix='$(PREFIX)/$(TARGET)' \ - CPPFLAGS="-DH5_HAVE_WIN32_API -DH5_HAVE_MINGW -DH5_BUILT_AS_STATIC_LIB" \ - AR='$(TARGET)-ar' + --with-pthread='$(PREFIX)' \ + --with-zlib='$(PREFIX)' \ + AR='$(TARGET)-ar' \ + CPPFLAGS='-DH5_HAVE_WIN32_API \ + -DH5_HAVE_MINGW \ + -DHAVE_WINDOWS_PATH \ + -DH5_BUILT_AS_$(if $(BUILD_STATIC),STATIC,DYNAMIC)_LIB' + + # libtool is somehow created to effectively disallow shared builds + $(SED) -i 's,allow_undefined_flag="unsupported",allow_undefined_flag="",g' '$(1)/libtool' # These programs need to be executed on host to create # H5lib_settings.c and H5Tinit.c @@ -40,18 +46,14 @@ define $(PKG)_BUILD echo 'H5detect.exe > $(TARGET)\H5Tinit.c'; \ echo 'H5make_libsettings.exe > $(TARGET)\H5lib_settings.c';) \ > '$(PREFIX)/$(TARGET)/bin/hdf5-create-settings.bat' - # workaround until easy way of adding targets is found - # cp '$(1)/mxe-generated-sources/$(TARGET)/'*.c '$(1)/src/' + # generated sources are mostly tied to CPU + # and don't vary with static/shared cp '$(1)/mxe-generated-sources/$(word 1,$(subst ., ,$(TARGET)))/'*.c '$(1)/src/' - $(MAKE) -C '$(1)'/src -j '$(JOBS)' - $(MAKE) -C '$(1)'/src -j 1 install - $(MAKE) -C '$(1)'/c++/src -j '$(JOBS)' - $(MAKE) -C '$(1)'/c++/src -j 1 install - $(MAKE) -C '$(1)'/hl/src -j '$(JOBS)' - $(MAKE) -C '$(1)'/hl/src -j 1 install - $(MAKE) -C '$(1)'/hl/c++/src -j '$(JOBS)' - $(MAKE) -C '$(1)'/hl/c++/src -j 1 install + for d in src c++/src hl/src hl/c++/src; do \ + $(MAKE) -C '$(1)'/$$d -j '$(JOBS)' && \ + $(MAKE) -C '$(1)'/$$d -j 1 install; \ + done # install prefixed wrapper scripts $(INSTALL) -m755 '$(1)'/tools/misc/h5cc '$(PREFIX)/bin/$(TARGET)-h5cc' @@ -63,5 +65,3 @@ define $(PKG)_BUILD '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-hdf5.exe' \ -lhdf5_hl -lhdf5 -lz endef - -$(PKG)_BUILD_SHARED= |