2010-06-03 21:24:43 +08:00
|
|
|
## This is a automake file, part of Unidata's netCDF package.
|
2018-12-07 05:34:40 +08:00
|
|
|
# Copyright 2018, see the COPYRIGHT file for more information.
|
2010-06-03 21:24:43 +08:00
|
|
|
|
|
|
|
# This Makefile assembles the correct libnetcdf based on various
|
2010-06-22 21:25:14 +08:00
|
|
|
# configure flags. It is assumed that all the relevant convenience
|
2010-12-16 05:45:05 +08:00
|
|
|
# libraries have been built (e.g. libsrc, libsrc4, libncdap3, libcdmr,
|
2010-06-03 21:24:43 +08:00
|
|
|
# libncdap4, fortran).
|
|
|
|
|
2011-03-22 02:38:10 +08:00
|
|
|
# Put together AM_CPPFLAGS and AM_LDFLAGS.
|
|
|
|
include $(top_srcdir)/lib_flags.am
|
2010-06-03 21:24:43 +08:00
|
|
|
|
2010-06-07 19:12:14 +08:00
|
|
|
# This is our output, the netcdf library the user will install.
|
2010-06-03 21:24:43 +08:00
|
|
|
lib_LTLIBRARIES = libnetcdf.la
|
2010-06-07 19:12:14 +08:00
|
|
|
|
2015-06-05 05:19:51 +08:00
|
|
|
##
|
2011-02-17 20:58:08 +08:00
|
|
|
# These linker flags specify libtool version info.
|
2015-06-05 05:19:51 +08:00
|
|
|
# See http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
|
|
|
|
# for information regarding incrementing `-version-info`.
|
|
|
|
##
|
|
|
|
|
2022-05-20 12:00:40 +08:00
|
|
|
libnetcdf_la_LDFLAGS = -version-info @netCDF_SO_VERSION@ ${NOUNDEFINED}
|
2015-06-05 05:19:51 +08:00
|
|
|
|
2011-03-22 02:38:10 +08:00
|
|
|
libnetcdf_la_CPPFLAGS = ${AM_CPPFLAGS}
|
2022-01-29 07:46:23 +08:00
|
|
|
libnetcdf_la_LIBADD =
|
2015-06-05 05:19:51 +08:00
|
|
|
CLEANFILES =
|
2010-06-03 21:24:43 +08:00
|
|
|
|
2010-06-22 21:25:14 +08:00
|
|
|
# The v2 API...
|
|
|
|
if BUILD_V2
|
|
|
|
libnetcdf_la_LIBADD += ${top_builddir}/libdispatch/libnetcdf2.la
|
|
|
|
endif # BUILD_V2
|
2010-06-03 21:24:43 +08:00
|
|
|
|
2011-08-23 23:07:24 +08:00
|
|
|
# The output library will always include netcdf3 and dispatch
|
2011-09-21 04:39:04 +08:00
|
|
|
# libraries
|
2010-06-22 21:25:14 +08:00
|
|
|
libnetcdf_la_LIBADD += ${top_builddir}/libdispatch/libdispatch.la \
|
2013-03-16 04:31:07 +08:00
|
|
|
${top_builddir}/libsrc/libnetcdf3.la
|
2010-06-03 21:24:43 +08:00
|
|
|
|
2018-09-18 00:47:40 +08:00
|
|
|
# + PnetCDF
|
2013-03-16 04:31:07 +08:00
|
|
|
if USE_PNETCDF
|
2015-08-15 10:38:30 +08:00
|
|
|
AM_CPPFLAGS += -I${top_srcdir}/libsrcp
|
|
|
|
libnetcdf_la_LIBADD += ${top_builddir}/libsrcp/libnetcdfp.la
|
2013-03-16 04:31:07 +08:00
|
|
|
endif # USE_PNETCDF
|
|
|
|
|
2018-05-09 01:58:01 +08:00
|
|
|
# + hdf5
|
2018-11-29 06:50:38 +08:00
|
|
|
if USE_HDF5
|
2018-05-09 01:58:01 +08:00
|
|
|
AM_CPPFLAGS += -I${top_srcdir}/libhdf5
|
|
|
|
libnetcdf_la_LIBADD += ${top_builddir}/libhdf5/libnchdf5.la
|
2020-08-18 09:15:47 +08:00
|
|
|
endif # USE_HDF5
|
2018-05-09 01:58:01 +08:00
|
|
|
|
2018-02-08 21:20:58 +08:00
|
|
|
# + hdf4
|
|
|
|
if USE_HDF4
|
|
|
|
AM_CPPFLAGS += -I${top_srcdir}/libhdf4
|
|
|
|
libnetcdf_la_LIBADD += ${top_builddir}/libhdf4/libnchdf4.la
|
2018-05-09 01:58:01 +08:00
|
|
|
endif # USE_HDF4
|
2018-02-08 21:20:58 +08:00
|
|
|
|
2013-03-16 04:31:07 +08:00
|
|
|
# + dap
|
2024-03-19 04:32:23 +08:00
|
|
|
if NETCDF_ENABLE_DAP
|
2011-04-18 02:50:10 +08:00
|
|
|
AM_CPPFLAGS += -I${top_srcdir}/libdap2 -I${top_srcdir}/oc
|
|
|
|
libnetcdf_la_LIBADD += ${top_builddir}/libdap2/libdap2.la
|
2012-08-01 04:34:13 +08:00
|
|
|
libnetcdf_la_LIBADD += ${top_builddir}/oc2/liboc.la
|
2024-03-19 04:32:23 +08:00
|
|
|
endif # NETCDF_ENABLE_DAP
|
2017-03-09 08:01:10 +08:00
|
|
|
|
2024-03-19 04:32:23 +08:00
|
|
|
if NETCDF_ENABLE_DAP4
|
2017-03-09 08:01:10 +08:00
|
|
|
AM_CPPFLAGS += -I${top_srcdir}/libdap4
|
|
|
|
libnetcdf_la_LIBADD += ${top_builddir}/libdap4/libdap4.la
|
2024-03-19 04:32:23 +08:00
|
|
|
endif # NETCDF_ENABLE_DAP4
|
2023-04-26 07:15:06 +08:00
|
|
|
|
2021-11-02 12:37:05 +08:00
|
|
|
AM_CPPFLAGS += -I${top_srcdir}/libncxml
|
2024-03-19 04:32:23 +08:00
|
|
|
if NETCDF_ENABLE_DAP4
|
2021-11-02 12:37:05 +08:00
|
|
|
libnetcdf_la_LIBADD += ${top_builddir}/libncxml/libncxml.la
|
2023-04-26 07:15:06 +08:00
|
|
|
else
|
|
|
|
if ENABLE_S3_INTERNAL
|
|
|
|
libnetcdf_la_LIBADD += ${top_builddir}/libncxml/libncxml.la
|
|
|
|
endif
|
2024-03-19 04:32:23 +08:00
|
|
|
endif # ENABLE_S3_INTERNAL || NETCDF_ENABLE_DAP4
|
2010-06-03 21:24:43 +08:00
|
|
|
|
2010-06-22 21:25:14 +08:00
|
|
|
# NetCDF-4 ...
|
2010-06-03 21:24:43 +08:00
|
|
|
if USE_NETCDF4
|
2010-06-22 21:25:14 +08:00
|
|
|
AM_CPPFLAGS += -I${top_srcdir}/libsrc4
|
2011-09-21 04:39:04 +08:00
|
|
|
libnetcdf_la_LIBADD += ${top_builddir}/libsrc4/libnetcdf4.la
|
2010-06-03 21:24:43 +08:00
|
|
|
endif #USE_NETCDF4
|
|
|
|
|
2024-03-19 04:37:39 +08:00
|
|
|
if NETCDF_ENABLE_NCZARR
|
This PR adds EXPERIMENTAL support for accessing data in the
cloud using a variant of the Zarr protocol and storage
format. This enhancement is generically referred to as "NCZarr".
The data model supported by NCZarr is netcdf-4 minus the user-defined
types and the String type. In this sense it is similar to the CDF-5
data model.
More detailed information about enabling and using NCZarr is
described in the document NUG/nczarr.md and in a
[Unidata Developer's blog entry](https://www.unidata.ucar.edu/blogs/developer/en/entry/overview-of-zarr-support-in).
WARNING: this code has had limited testing, so do use this version
for production work. Also, performance improvements are ongoing.
Note especially the following platform matrix of successful tests:
Platform | Build System | S3 support
------------------------------------
Linux+gcc | Automake | yes
Linux+gcc | CMake | yes
Visual Studio | CMake | no
Additionally, and as a consequence of the addition of NCZarr,
major changes have been made to the Filter API. NOTE: NCZarr
does not yet support filters, but these changes are enablers for
that support in the future. Note that it is possible
(probable?) that there will be some accidental reversions if the
changes here did not correctly mimic the existing filter testing.
In any case, previously filter ids and parameters were of type
unsigned int. In order to support the more general zarr filter
model, this was all converted to char*. The old HDF5-specific,
unsigned int operations are still supported but they are
wrappers around the new, char* based nc_filterx_XXX functions.
This entailed at least the following changes:
1. Added the files libdispatch/dfilterx.c and include/ncfilter.h
2. Some filterx utilities have been moved to libdispatch/daux.c
3. A new entry, "filter_actions" was added to the NCDispatch table
and the version bumped.
4. An overly complex set of structs was created to support funnelling
all of the filterx operations thru a single dispatch
"filter_actions" entry.
5. Move common code to from libhdf5 to libsrc4 so that it is accessible
to nczarr.
Changes directly related to Zarr:
1. Modified CMakeList.txt and configure.ac to support both C and C++
-- this is in support of S3 support via the awd-sdk libraries.
2. Define a size64_t type to support nczarr.
3. More reworking of libdispatch/dinfermodel.c to
support zarr and to regularize the structure of the fragments
section of a URL.
Changes not directly related to Zarr:
1. Make client-side filter registration be conditional, with default off.
2. Hack include/nc4internal.h to make some flags added by Ed be unique:
e.g. NC_CREAT, NC_INDEF, etc.
3. cleanup include/nchttp.h and libdispatch/dhttp.c.
4. Misc. changes to support compiling under Visual Studio including:
* Better testing under windows for dirent.h and opendir and closedir.
5. Misc. changes to the oc2 code to support various libcurl CURLOPT flags
and to centralize error reporting.
6. By default, suppress the vlen tests that have unfixed memory leaks; add option to enable them.
7. Make part of the nc_test/test_byterange.sh test be contingent on remotetest.unidata.ucar.edu being accessible.
Changes Left TO-DO:
1. fix provenance code, it is too HDF5 specific.
2020-06-29 08:02:47 +08:00
|
|
|
AM_CPPFLAGS += -I${top_srcdir}/libnczarr
|
|
|
|
libnetcdf_la_LIBADD += ${top_builddir}/libnczarr/libnczarr.la
|
2023-04-26 07:15:06 +08:00
|
|
|
if ENABLE_S3_AWS
|
2020-08-18 09:15:47 +08:00
|
|
|
libnetcdf_la_LIBADD += ${aws_cpp_sdk_core_LIBS} ${aws_cpp_sdk_s3_LIBS}
|
|
|
|
endif
|
2024-03-19 04:37:39 +08:00
|
|
|
endif #NETCDF_ENABLE_NCZARR
|
This PR adds EXPERIMENTAL support for accessing data in the
cloud using a variant of the Zarr protocol and storage
format. This enhancement is generically referred to as "NCZarr".
The data model supported by NCZarr is netcdf-4 minus the user-defined
types and the String type. In this sense it is similar to the CDF-5
data model.
More detailed information about enabling and using NCZarr is
described in the document NUG/nczarr.md and in a
[Unidata Developer's blog entry](https://www.unidata.ucar.edu/blogs/developer/en/entry/overview-of-zarr-support-in).
WARNING: this code has had limited testing, so do use this version
for production work. Also, performance improvements are ongoing.
Note especially the following platform matrix of successful tests:
Platform | Build System | S3 support
------------------------------------
Linux+gcc | Automake | yes
Linux+gcc | CMake | yes
Visual Studio | CMake | no
Additionally, and as a consequence of the addition of NCZarr,
major changes have been made to the Filter API. NOTE: NCZarr
does not yet support filters, but these changes are enablers for
that support in the future. Note that it is possible
(probable?) that there will be some accidental reversions if the
changes here did not correctly mimic the existing filter testing.
In any case, previously filter ids and parameters were of type
unsigned int. In order to support the more general zarr filter
model, this was all converted to char*. The old HDF5-specific,
unsigned int operations are still supported but they are
wrappers around the new, char* based nc_filterx_XXX functions.
This entailed at least the following changes:
1. Added the files libdispatch/dfilterx.c and include/ncfilter.h
2. Some filterx utilities have been moved to libdispatch/daux.c
3. A new entry, "filter_actions" was added to the NCDispatch table
and the version bumped.
4. An overly complex set of structs was created to support funnelling
all of the filterx operations thru a single dispatch
"filter_actions" entry.
5. Move common code to from libhdf5 to libsrc4 so that it is accessible
to nczarr.
Changes directly related to Zarr:
1. Modified CMakeList.txt and configure.ac to support both C and C++
-- this is in support of S3 support via the awd-sdk libraries.
2. Define a size64_t type to support nczarr.
3. More reworking of libdispatch/dinfermodel.c to
support zarr and to regularize the structure of the fragments
section of a URL.
Changes not directly related to Zarr:
1. Make client-side filter registration be conditional, with default off.
2. Hack include/nc4internal.h to make some flags added by Ed be unique:
e.g. NC_CREAT, NC_INDEF, etc.
3. cleanup include/nchttp.h and libdispatch/dhttp.c.
4. Misc. changes to support compiling under Visual Studio including:
* Better testing under windows for dirent.h and opendir and closedir.
5. Misc. changes to the oc2 code to support various libcurl CURLOPT flags
and to centralize error reporting.
6. By default, suppress the vlen tests that have unfixed memory leaks; add option to enable them.
7. Make part of the nc_test/test_byterange.sh test be contingent on remotetest.unidata.ucar.edu being accessible.
Changes Left TO-DO:
1. fix provenance code, it is too HDF5 specific.
2020-06-29 08:02:47 +08:00
|
|
|
|
2024-03-19 04:40:00 +08:00
|
|
|
if NETCDF_ENABLE_PLUGINS
|
2021-09-03 07:04:26 +08:00
|
|
|
AM_CPPFLAGS += -I${top_srcdir}/libncpoco
|
|
|
|
libnetcdf_la_LIBADD += ${top_builddir}/libncpoco/libncpoco.la
|
2024-03-19 04:40:00 +08:00
|
|
|
endif #NETCDF_ENABLE_PLUGINS
|
2021-09-03 07:04:26 +08:00
|
|
|
|
2017-07-18 08:58:45 +08:00
|
|
|
if ISCYGWIN
|
2017-07-26 04:58:29 +08:00
|
|
|
# Force binary mode for file read/write
|
2017-07-18 08:58:45 +08:00
|
|
|
AM_LDFLAGS += -lbinmode
|
|
|
|
endif
|
|
|
|
|
2010-06-22 21:25:14 +08:00
|
|
|
# We need at least one source file
|
2015-08-16 06:26:35 +08:00
|
|
|
libnetcdf_la_SOURCES = nc_initialize.c
|
2016-01-12 06:20:55 +08:00
|
|
|
EXTRA_DIST=CMakeLists.txt
|