Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed rebuild-netcdf to work with .tar.gz instead of git repo

  • Loading branch information...
commit 7324db5331f462ef94c7ec985d12a235666f1727 1 parent a7c4af2
@jystic authored
Showing with 23 additions and 9 deletions.
  1. +23 −9 rebuild-netcdf
View
32 rebuild-netcdf
@@ -1,20 +1,19 @@
#!/bin/sh
-if [ ! -f "liblib/Makefile.am" ]; then
- echo "This script must be run from the netcdf root directory"
- exit 1
-fi
-
set -e
+NETCDF=netcdf-4.2.1.1
NETCDF_WIN="$( cd "$( dirname "$0" )" && pwd )"
-
+BINARIES=$NETCDF_WIN/bin
# Reset to known state
-echo "# Resetting NetCDF repository to clean state"
-git clean -fd
-git reset --hard
+echo "# Resetting NetCDF sources to clean state"
+
+cd $NETCDF_WIN
+rm -rf $NETCDF
+tar -zxvf $NETCDF.tar.gz
+cd $NETCDF
# Generate stdcall wrappers
@@ -46,3 +45,18 @@ echo
echo "# Building NetCDF"
make
+
+# Harvest Binaries
+
+echo
+echo "# Harvesting Binaries"
+
+rm -rf $BINARIES
+mkdir $BINARIES
+
+cp include/netcdf.h $BINARIES/netcdf.h
+cp liblib/netcdfdll.def $BINARIES/netcdf.def
+cp liblib/.libs/libnetcdf-7.dll $BINARIES/netcdf.dll
+dlltool --input-def=$BINARIES/netcdf.def \
+ --dllname=netcdf.dll \
+ --output-lib=$BINARIES/netcdf.lib
Please sign in to comment.
Something went wrong with that request. Please try again.