>From 9ba6ae641b8127ef8a90d61ea25c00146a288291 Mon Sep 17 00:00:00 2001 From: Martin Lambers Date: Wed, 7 Jan 2015 19:47:22 +0100 Subject: [PATCH 5/9] gdal: unify 32 bit and 64 bit build, based on 64 bit support for netcdf and hdf4 --- src/gdal.mk | 45 +++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/src/gdal.mk b/src/gdal.mk index f95d5e1..941cb15 100644 --- a/src/gdal.mk +++ b/src/gdal.mk @@ -19,7 +19,7 @@ define $(PKG)_UPDATE head -1 endef -define $(PKG)_CONFIGURE +define $(PKG)_BUILD cd '$(1)' && autoreconf -fi # The option '--without-threads' means native win32 threading without pthread. cd '$(1)' && ./configure \ @@ -44,7 +44,9 @@ define $(PKG)_CONFIGURE --with-expat='$(PREFIX)/$(TARGET)' \ --with-sqlite3='$(PREFIX)/$(TARGET)' \ --with-gta='$(PREFIX)/$(TARGET)' \ + --with-hdf4='$(PREFIX)/$(TARGET)' \ --with-hdf5='$(PREFIX)/$(TARGET)' \ + --with-netcdf='$(PREFIX)/$(TARGET)' \ --with-libjson-c='$(PREFIX)/$(TARGET)' \ --without-odbc \ --without-xerces \ @@ -72,35 +74,18 @@ define $(PKG)_CONFIGURE --without-perl \ --without-php \ --without-ruby \ - --without-python -endef - -define $(PKG)_MAKE - $(MAKE) -C '$(1)' -j '$(JOBS)' lib-target - $(MAKE) -C '$(1)' -j '$(JOBS)' install-lib - $(MAKE) -C '$(1)/port' -j '$(JOBS)' install - $(MAKE) -C '$(1)/gcore' -j '$(JOBS)' install - $(MAKE) -C '$(1)/frmts' -j '$(JOBS)' install - $(MAKE) -C '$(1)/alg' -j '$(JOBS)' install - $(MAKE) -C '$(1)/ogr' -j '$(JOBS)' install OGR_ENABLED= - $(MAKE) -C '$(1)/apps' -j '$(JOBS)' install BIN_LIST= - ln -sf '$(PREFIX)/$(TARGET)/bin/gdal-config' '$(PREFIX)/bin/$(TARGET)-gdal-config' -endef - -define $(PKG)_BUILD_x86_64-w64-mingw32 - $($(PKG)_CONFIGURE) \ - LIBS="-ljpeg -lsecur32 `'$(TARGET)-pkg-config' --libs openssl libtiff-4`" - $($(PKG)_MAKE) -endef - -define $(PKG)_BUILD_i686-w64-mingw32 - $($(PKG)_CONFIGURE) \ - --with-netcdf='$(PREFIX)/$(TARGET)' \ + --without-python \ + CPPFLAGS="-DH4_BUILT_AS_STATIC_LIB=1" \ LIBS="-ljpeg -lsecur32 -lportablexdr `'$(TARGET)-pkg-config' --libs openssl libtiff-4`" - $($(PKG)_MAKE) + $(MAKE) -C '$(1)' -j '$(JOBS)' lib-target + $(MAKE) -C '$(1)' -j '$(JOBS)' install-lib + $(MAKE) -C '$(1)/port' -j '$(JOBS)' install + $(MAKE) -C '$(1)/gcore' -j '$(JOBS)' install + $(MAKE) -C '$(1)/frmts' -j '$(JOBS)' install + $(MAKE) -C '$(1)/alg' -j '$(JOBS)' install + $(MAKE) -C '$(1)/ogr' -j '$(JOBS)' install OGR_ENABLED= + $(MAKE) -C '$(1)/apps' -j '$(JOBS)' install BIN_LIST= + ln -sf '$(PREFIX)/$(TARGET)/bin/gdal-config' '$(PREFIX)/bin/$(TARGET)-gdal-config' endef -# Can't use $(PKG)_BUILD_SHARED here as $(PKG)_BUILD_i686-w64-mingw32 has a -# higher precedence. -$(PKG)_BUILD_i686-w64-mingw32.shared = -$(PKG)_BUILD_x86_64-w64-mingw32.shared = +$(PKG)_BUILD_SHARED = -- 2.1.4